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.

329 lines
8.9 KiB

  1. <%@LANGUAGE = Javascript%>
  2. <!--#INCLUDE FILE='Global_DBUtils.asp' -->
  3. <!--#include file='global_serverutils.asp'-->
  4. <%
  5. var Page = new String( Request.QueryString( "Page" )) //Get the page we are currently on
  6. var LastIndex = 0 //for paging, specifies the last index id of the last record
  7. var Param0 = new String( Request.QueryString( "Param0" ) )
  8. if( Param0.toString() == "undefined" )
  9. Param0 = ""
  10. else
  11. Param0 = "," + Param0
  12. if ( Page.toString() == "undefined" )
  13. Page = -1;
  14. Response.Buffer = false
  15. var Alias = Request.QueryString("Alias")
  16. var FrameID = Request.QueryString("FrameID" )
  17. if ( Session("Authenticated") != "Yes" )
  18. Response.Redirect("privacy/authentication.asp?../DBGPortal_Main.asp?" + Request.QueryString() )
  19. %>
  20. <head>
  21. <link rel="stylesheet" TYPE="text/css" HREF="/main.css">
  22. <link rel="stylesheet" TYPE="text/css" HREF="/CustomStyles.css">
  23. </head>
  24. <body bgcolor='#ffffff' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' tabindex='0'>
  25. <table>
  26. <tr>
  27. <td>
  28. <div id=divLoadingData>
  29. <p Class=clsPTitle>Loading data for <%=Alias%>, please wait . . . </p>
  30. </div>
  31. </td>
  32. <tr>
  33. </table>
  34. <table border='0' width="100%">
  35. <tr>
  36. <td colspan='2'>
  37. <p class=clsPTitle>Followup - <%=Alias%></p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>
  42. <p>
  43. <object height=180 width=190 CLASSID="clsid:0002E500-0000-0000-C000-000000000046" ID="objUserChart" VIEWASTEXT>
  44. <table>
  45. <tr>
  46. <td class='clsTDWarning'>
  47. <b>Warning: Could not build chart</b>
  48. </td>
  49. <tr>
  50. <td class=clsTDWarning>
  51. <p>In order to display the crash histrogram, you must download the <a href="\\products\public\Products\Applications\User\OfficeXP\Internal\cd1\owc10.msi">Office Web Components</a>. </p>
  52. </td>
  53. </tr>
  54. </table>
  55. </object>
  56. &nbsp;&nbsp;&nbsp;
  57. <object height=180 width=190 CLASSID="clsid:0002E500-0000-0000-C000-000000000046" ID="objProgressChart" VIEWASTEXT>
  58. <table>
  59. <tr>
  60. <td class='clsTDWarning'>
  61. <b>Warning: Could not build chart</b>
  62. </td>
  63. <tr>
  64. <td class=clsTDWarning>
  65. <p>In order to display the crash histrogram, you must download the <a href="\\products\public\Products\Applications\User\OfficeXP\Internal\cd1\owc10.msi">Office Web Components</a>. </p>
  66. </td>
  67. </tr>
  68. </table>
  69. </object>
  70. </p>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>
  75. <input style='margin-left:15px' class='clsButton' type='button' value='<< Add followup' OnClick='fnAddFollowUptoView()' id='button'1 name='button'1>
  76. <% if ( Page != "0" && Page != -1 )
  77. Response.Write("<input class='clsButton' type=button value='Previous Page' OnClick='fnPreviousPage()'>")
  78. if ( Page != -1 )
  79. Response.Write("<input class='clsButton' type=button value='Next Page' OnClick='fnNextPage()'>")
  80. %>
  81. <input class='clsButton' type='button' value='Refresh' OnClick="javascript:window.location.reload()" id='button'1 name='button'1>
  82. <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'">
  83. <input id='tbURL' type='text' size='500' style='margin-left:16px;width:530px;display:none' value='http://DBGPortal/DBGPortal_Main.asp?<%=Request.QueryString%>'>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td valign='top' >
  88. <table id="tblUserBuckets" width="100%" class="clsTableInfo" border="0" cellpadding="2" cellspacing="1">
  89. <%
  90. var SP = Request.QueryString("SP" )
  91. var GroupFlag = new String( Request.QueryString("GroupFlag") )
  92. if ( GroupFlag.toString() == "undefined" )
  93. GroupFlag = 0;
  94. //Response.Write( Request.QueryString() )
  95. var altColor = "sys-table-cell-bgcolor2"
  96. var g_DBConn = GetDBConnection ( Application("CRASHDB3") )
  97. var Query = SP + " '" + Page + "', '" + Alias + "'" + "," + GroupFlag + Param0
  98. //Response.Write("Query: " + Query )
  99. var rsBuckets = g_DBConn.Execute( Query )
  100. fnBuildRSResults( rsBuckets )
  101. try
  102. {
  103. //var rsBuckets = g_DBConn.Execute( "DBGPortal_GetBucketsByAlias '" + Alias + "'" )
  104. //var rsBuckets = g_DBConn.Execute( SP + " 0, '" + Alias + "'" )
  105. var rsStats = g_DBConn.Execute("DBGPortal_GetBucketStatsByAlias '" + Alias + "'," + GroupFlag )
  106. }
  107. catch( err )
  108. {
  109. }
  110. %>
  111. </table>
  112. </td>
  113. </tr>
  114. <tr>
  115. <td rowspan="2" align="left">
  116. <p>
  117. <object style='margin-right:15px' height=650 width="100%" CLASSID="clsid:0002E500-0000-0000-C000-000000000046" ID="objCrashChart" VIEWASTEXT>
  118. <table>
  119. <tr>
  120. <td class='clsTDWarning'>
  121. <b>Warning: Could not build chart</b>
  122. </td>
  123. <tr>
  124. <td class=clsTDWarning>
  125. <p>In order to display the crash histrogram, you must download the <a href="\\products\public\Products\Applications\User\OfficeXP\Internal\cd1\owc10.msi">Office Web Components</a>. </p>
  126. </td>
  127. </tr>
  128. </table>
  129. </object>
  130. </p>
  131. </td>
  132. </tr>
  133. </table>
  134. <%
  135. //do some math on these numbers, should move this off to the sproc
  136. var total = new Number( rsStats("Total") )
  137. var AliasTotal = new Number( rsStats("AliasTotal") )
  138. var Percent = parseInt((AliasTotal/total) * 100, 10 )
  139. if ( Percent < 1 )
  140. Percent= 1
  141. var LeftOver = (parseInt( 100 - Percent, 10 )) /100
  142. var Percent = Percent / 100
  143. var Solved = parseInt( rsStats("Solved" ) ) / AliasTotal
  144. var Raided = parseInt( rsStats("Raided" ) ) / AliasTotal
  145. var Untouched = parseInt( rsStats("Untouched" ) ) / AliasTotal
  146. %>
  147. <script language='javascript'>
  148. try
  149. {
  150. window.parent.parent.frames("SepBody").document.all.iframe1[<%=Request.Querystring("FrameID")%>].style.height = window.document.body.scrollHeight + 100
  151. }
  152. catch( err )
  153. {
  154. }
  155. divLoadingData.style.display='none'
  156. var Finalpage= '<%=LastIndex%>'
  157. var Firstpage = '<%=Page%>'
  158. function fnPreviousPage( )
  159. {
  160. window.history.back()
  161. //window.navigate( "dbgportal_DisplayQuery.asp?SP=<%=SP%>&Page=" + Firstpage )
  162. }
  163. function fnNextPage( )
  164. {
  165. window.navigate( "dbgportal_Main.asp?SP=<%=SP%>&Page=" + Finalpage + "&Alias=<%=Alias%>&GroupFlag=<%=GroupFlag%>&FrameID=<%=FrameID%>" )
  166. }
  167. function fnShowBug( BugID, BucketID )
  168. {
  169. var BucketID = escape( BucketID )
  170. BucketID = BucketID.replace ( /\+/gi, "%2b" )
  171. window.open( "DBGPortal_OpenRaidBug.asp?BugID=" + BugID + "&BucketID=" + BucketID )
  172. }
  173. function fnAddFollowUptoView()
  174. {
  175. if ( <%=GroupFlag%> )
  176. window.parent.parent.frames("sepLeftNav").fnAddElement( "<%=Alias%>", "tblSelectedGroups" )
  177. else
  178. window.parent.parent.frames("sepLeftNav").fnAddElement( "<%=Alias%>", "tblSelectedFollowups" )
  179. }
  180. try
  181. {
  182. objUserChart.Clear()
  183. var objChart = objUserChart.Charts.Add()
  184. var c = objUserChart.Constants
  185. objChart.Type=c.chChartTypePieExploded
  186. objSeries1 = objChart.SeriesCollection.Add()
  187. objSeries1.SetData( c.chDimCategories, c.chDataLiteral, "<%=Alias%> Overall" )
  188. objSeries1.SetData( c.chDimValues, c.chDataLiteral, "<%=Percent%>\t<%=LeftOver%>" )
  189. objChart.FirstSliceAngle = 90
  190. objChart.HasTitle = true
  191. objChart.Title.Caption = "FollowUp Own %"
  192. var DataLabel = objSeries1.DataLabelsCollection.Add()
  193. DataLabel.NumberFormat = "0%"
  194. DataLabel.Position = c.chLabelPositionRight
  195. objChart.HasLegend=true
  196. }
  197. catch ( err )
  198. {
  199. }
  200. try
  201. {
  202. var tbl = document.all.tblUserBuckets.rows
  203. var Buckets = ""
  204. var Counts = ""
  205. var GraphLength = 25
  206. if ( (tbl.length - 1 ) < GraphLength )
  207. GraphLength = tbl.length - 1
  208. for( i = 1 ; i <= GraphLength ; i++ )
  209. {
  210. Buckets = tbl[i].cells[1].innerText + "\t" + Buckets
  211. Counts = String( tbl[i].cells[2].innerText ) + "\t" + Counts
  212. }
  213. objCrashChart.Clear()
  214. var objChart = objCrashChart.Charts.Add()
  215. var c = objUserChart.Constants
  216. objChart.Type=c.chChartTypeBarStacked
  217. //objChart.Type=c.chChartTypeColumnStacked
  218. objSeries1 = objChart.SeriesCollection.Add()
  219. objSeries1.SetData( c.chDimCategories, c.chDataLiteral, Buckets )
  220. objSeries1.SetData( c.chDimValues, c.chDataLiteral, Counts )
  221. }
  222. catch( err )
  223. {
  224. }
  225. try
  226. {
  227. objProgressChart.Clear()
  228. var objChart = objProgressChart.Charts.Add()
  229. objChart.Type=c.chChartTypePieExploded
  230. objSeries1 = objChart.SeriesCollection.Add()
  231. objSeries1.SetData( c.chDimCategories, c.chDataLiteral, "Has Response Has Bug Untouched" )
  232. objSeries1.SetData( c.chDimValues, c.chDataLiteral, "<%=Solved%>\t<%=Raided%>\t<%=Untouched%>" )
  233. objChart.HasLegend=true
  234. objChart.HasTitle = true
  235. objChart.Title.Caption = "Owner Activity"
  236. objChart.FirstSliceAngle = 90
  237. //objChart.SeriesCollection(0).Explosion = 25
  238. var DataLabel = objSeries1.DataLabelsCollection.Add()
  239. DataLabel.NumberFormat = "0%"
  240. DataLabel.Position = 5
  241. }
  242. catch( err )
  243. {
  244. }
  245. </script>
  246. </body>