Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

311 lines
10 KiB

  1. <%@LANGUAGE=Javascript%>
  2. <%
  3. Response.Buffer = false
  4. %>
  5. <!--#INCLUDE FILE='Global_DBUtils.asp'-->
  6. <!--#INCLUDE FILE='Global_ServerUtils.asp'-->
  7. <head>
  8. <link rel="stylesheet" TYPE="text/css" HREF="/main.css">
  9. <link rel="stylesheet" TYPE="text/css" HREF="/CustomStyles.css">
  10. </head>
  11. <body bgcolor='#ffffff' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' tabindex='0'>
  12. <table>
  13. <tr>
  14. <td>
  15. <div id=divLoadingData>
  16. <p Class=clsPTitle>Loading data, please wait . . . </p>
  17. </div>
  18. </td>
  19. <tr>
  20. </table>
  21. <%
  22. var Param1 = new String( Request("Param1") ) //Solved not solved
  23. var Param2 = new String( Request("Param2") ) //Raid/Not raided
  24. var Param3 = new String( Request("Param3") ) //sort field
  25. var Param4 = new String( Request("Param4") ) //sort order
  26. var Param5 = new String( Request("Param5") ) //Used for alias name in sprocs
  27. var Param6 = new String( Request("Param6") ) //generally a time displacement
  28. var Param7 = new String( Request("Param7") ) //This is gonna be a platform
  29. var SP = Request.QueryString( "SP" ) //Get the stored proc to run
  30. var Page = new String( Request.QueryString( "Page" )) //Get the page we are currently on
  31. var PreviousPage = new String( Request.QueryString("PreviousPage") )
  32. var g_DBConn = GetDBConnection ( Application("CRASHDB3" ) ) //get a connection to the DB
  33. var LastIndex = 0 //for paging, specifies the last index id of the last record
  34. var FrameID = Request.QueryString("FrameID")
  35. var Param0 = new String( Request.QueryString( "Param0" ) )
  36. if ( Page.toString() == "undefined" )
  37. Page = -1;
  38. if ( SP == "CUSTOM" )
  39. {
  40. if ( Param0.toString() == "BUCKETDATA" )
  41. {
  42. var query = "SELECT TOP " + Param1 + " bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM "
  43. query += "DBGPortal_BucketDataV3 " + Param2 + " ORDER BY " + Param3 + " " + Param4
  44. }
  45. else
  46. {
  47. var query = "SELECT TOP " + Param1
  48. query += " bFullDump, SKU, Source, BucketID, FilePath, BuildNo, EntryDate, Email, Description from dbgportal_crashdatav3 "
  49. query += Param2
  50. query += " order by " + Param3 + " " + Param4
  51. }
  52. }
  53. else
  54. {
  55. if ( Param0.toString() != "undefined" )
  56. {
  57. Param0 = ",'" + Param0 + "'"
  58. }
  59. else
  60. {
  61. Param0 = ""
  62. }
  63. var query = SP + " '" + Page + "'" + Param0
  64. }
  65. try
  66. {
  67. //Response.Write("Query: " + query + "<BR><BR>" )
  68. var rsResults = g_DBConn.Execute ( query )
  69. }
  70. catch( err )
  71. {
  72. Response.Write("<table><tr><td><p>An error has occurred tyring to execute the query that you have requested. If this is a recurring problem, please mail <a class='clsALinkNormal' href='mailto:[email protected]'>SOlson</a>.<br>Please include the following error details:" )
  73. Response.Write("<br>Err: " + err.description + "<br>" )
  74. Response.Write("QueryString: " + Request.QueryString + "<BR>" )
  75. Response.WRite("Query: " + query + "<BR>" )
  76. Response.Write("</td></tr></table>" )
  77. Response.End()
  78. }
  79. if ( PreviousPage == "undefined" )
  80. PreviousPage = 0
  81. %>
  82. <table style='margin-left:16px' >
  83. <tr>
  84. <td>
  85. <p class='clsPTitle'>Kernel Mode Data</p>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td>
  90. <% if ( Page != "0" && Page != -1 )
  91. Response.Write("<input class='clsButton' type=button value='Previous Page' OnClick='fnPreviousPage()'>")
  92. if ( Page != -1 )
  93. Response.Write("<input class='clsButton' type=button value='Next Page' OnClick='fnNextPage()'>")
  94. %>
  95. <input class='clsButton' type='button' value='Refresh' OnClick="javascript:window.location.reload()" id='button'1 name='button'1>
  96. <input class='clsButton' type='button' value='Show URL' OnClick="javascript:document.all.tbURL.style.display=='block' ? document.all.tbURL.style.display='none' : document.all.tbURL.style.display='block'" id='button'1 name='button'1>
  97. <input id='tbURL' type='text' size='500' style='margin-left:16px;width:530px;display:none' value='http://DBGPortal/DBGPortal_DisplayQuery.asp?<%=Request.QueryString%>'>
  98. </td>
  99. </tr>
  100. </table>
  101. <table id="tblUserBuckets" class="clsTableInfo" border="0" cellpadding="2" cellspacing="1">
  102. <%
  103. fnBuildRSResults( rsResults )
  104. /*
  105. var Fields = GetRecordsetFields( rsResults )
  106. var DisplayedFieldValue //use this if you want to change an item column heading
  107. Response.Write( "<tr>" )
  108. for ( var i = 0 ; i < Fields.length; i++ )
  109. {
  110. switch( Fields[i] )
  111. {
  112. case "SolutionID":
  113. DisplayedFieldValue = "Response ID"
  114. break;
  115. case "iIndex":
  116. DisplayedFieldValue = ""
  117. break;
  118. case "bHasFullDump":
  119. DisplayedFieldValue = "Full Dmp"
  120. break;
  121. case "BuildNo":
  122. Response.Write( "<td style='border-left:white 1px solid' align='left' nowrap class='clsTDInfo'>Build</td>" )
  123. DisplayedFieldValue = "SP"
  124. break;
  125. default:
  126. DisplayedFieldValue = Fields[i]
  127. }
  128. if ( DisplayedFieldValue != "" )
  129. {
  130. if ( i == 0 )
  131. Response.Write( "<td align='left' nowrap class='clsTDInfo'>" + DisplayedFieldValue + "</td>" )
  132. else
  133. Response.Write( "<td style='border-left:white 1px solid' align='left' nowrap class='clsTDInfo'>" + DisplayedFieldValue + "</td>" )
  134. }
  135. }
  136. Response.Write( "</tr>" )
  137. //try
  138. //{
  139. var altColor = "sys-table-cell-bgcolor2"
  140. while ( !rsResults.EOF )
  141. {
  142. if ( altColor == "sys-table-cell-bgcolor1" )
  143. altColor = "sys-table-cell-bgcolor2"
  144. else
  145. altColor = "sys-table-cell-bgcolor1"
  146. Response.Write("<tr>\n")
  147. for ( var i = 0 ; i < Fields.length ; i++ )
  148. {
  149. switch ( Fields[i] )
  150. {
  151. case "CrashTotal":
  152. Response.Write("<td class='" + altColor + "'>" + rsResults("CrashTotal") + "</td>\n" )
  153. break;
  154. case "DriverName":
  155. Response.Write("<td class='" + altColor + "'><a class='clsALinkNormal' href='dbgportal_displayquery.asp?SP=DBGPortal_GetBucketsByDriverName&Param0=" + rsResults("DriverName") + "'>" + rsResults("DriverName") + "</a></td>\n" )
  156. break;
  157. case "FilePath":
  158. Response.Write("<td class='" + altColor + "'><a class='clsALinkNormal' href='dbgportal_displayquery.asp?SP=DBGPortal_GetBucketsByDriverName&Param0=" + rsResults("FilePath") + "'>" + rsResults("FilePath") + "</a></td>\n" )
  159. break;
  160. case "BucketID":
  161. Response.Write("<td class='" + altColor + "'><a class='clsALinkNormal' href=\"DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode( rsResults("BucketID") ) + "\">" + rsResults("BucketID") + "</a></td>\n" )
  162. break;
  163. case "bHasFullDump":
  164. if ( rsResults("bHasFullDump") == "1" )
  165. Response.Write("<td class='" + altColor + "'>Yes</td>\n" )
  166. else
  167. Response.Write("<td class='" + altColor + "'>&nbsp;</td>" )
  168. break;
  169. case "FollowUP":
  170. Response.Write("<td class='" + altColor + "'><a class='clsALinkNormal' href=\"DBGPortal_Main.asp?SP=DBGPortal_GetBucketsByAlias&Page=0&Alias=" + rsResults("FollowUp") + "\">" + rsResults("FollowUp") + "</a></td>\n" )
  171. break;
  172. case "BugID":
  173. if ( String(rsResults("BugID" )).toString() != "null" )
  174. Response.Write( "<td class='" + altColor + "'><a href=\"javascript:fnShowBug(" + rsResults("BugID") + ",'" + Server.URLEncode( rsResults("BucketID") ) + "')\">" + rsResults("BugID") + "</a></td>\n" )
  175. else
  176. Response.Write("<td class='" + altColor + "'>None</td>\n" )
  177. break;
  178. case "BuildNo":
  179. var BuildNumber = new String( rsResults("BuildNo" ) )
  180. var SP = BuildNumber.substr( 4, 4 )
  181. var BuildNumber = BuildNumber.substr( 0, 4 )
  182. Response.Write("<td valign='center' nowrap class='" + altColor + "'>" + BuildNumber + "</td>")
  183. Response.Write("<td valign='center' nowrap class='" + altColor + "'>" + SP + "</td>")
  184. break;
  185. case "SolutionID":
  186. if ( String(rsResults("SolutionID" )).toString() != "null" )
  187. Response.Write("<td class='" + altColor + "'><a class='clsALinkNormal' href='#none' onclick=\"window.open('http://oca.microsoft.com/en/Response.asp?SID=" + rsResults("SolutionID") + "')\">" + rsResults("SolutionID") + "</a></td>\n" )
  188. else
  189. Response.Write("<td class='" + altColor + "'>None</td>\n" )
  190. break;
  191. case "Source":
  192. var Source = new String( rsResults("Source") )
  193. if ( Source == "1" )
  194. Response.Write("<td valign='center' nowrap class='" + altColor + "'>Web Site</td>")
  195. else if ( Source == "2" )
  196. Response.Write("<td valign='center' nowrap class='" + altColor + "'>CER Report</td>")
  197. else if ( Source == "0" )
  198. Response.Write("<td valign='center' nowrap class='" + altColor + "'>CMD DBG</td>")
  199. else if ( Source == "5" )
  200. Response.Write("<td valign='center' nowrap class='" + altColor + "'>Manual Upload</td>")
  201. else if ( Source == "6" )
  202. Response.Write("<td valign='center' nowrap class='" + altColor + "'>Stress Upload</td>")
  203. else
  204. Response.Write("<td valign='center' nowrap class='" + altColor + "'>Unknown[" + Source + "]</td>")
  205. break;
  206. case "iIndex":
  207. LastIndex = new String(rsResults("iIndex" ) )
  208. break;
  209. default:
  210. Response.Write("<td class='" + altColor + "'>" + rsResults(Fields[i] ) + "</td>\n" )
  211. }
  212. }
  213. rsResults.MoveNext()
  214. }
  215. */
  216. %>
  217. </table>
  218. <br>
  219. <br>
  220. <script language='javascript'>
  221. divLoadingData.style.display='none'
  222. var Finalpage= '<%=LastIndex%>'
  223. var Firstpage = '<%=Page%>'
  224. <%
  225. if ( !isNaN( FrameID ) )
  226. { %>
  227. //This is to resize the iframe so that it will fit in properly in teh window
  228. try
  229. {
  230. window.parent.parent.frames("SepBody").document.all.iframe1[<%=FrameID%>].style.height = window.document.body.scrollHeight + 100
  231. }
  232. catch( err )
  233. {
  234. }
  235. <%}%>
  236. function fnShowBug( BugID, BucketID )
  237. {
  238. var BucketID = escape( BucketID )
  239. BucketID = BucketID.replace ( /\+/gi, "%2b" )
  240. window.open( "DBGPortal_OpenRaidBug.asp?BugID=" + BugID + "&BucketID=" + BucketID )
  241. }
  242. function fnPreviousPage( )
  243. {
  244. window.history.back()
  245. //window.navigate( "dbgportal_DisplayQuery.asp?SP=<%=SP%>&Page=" + Firstpage )
  246. }
  247. function fnNextPage( )
  248. {
  249. window.navigate( "dbgportal_DisplayQuery.asp?SP=<%=SP%>&Page=" + Finalpage + "&PreviousPage=" + Firstpage + "&FrameID=<%=Request.QueryString("FrameID")%>")
  250. }
  251. </script>
  252. </body>