| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
| 125 |
ghuddy |
5 |
'| RequestProjectRelease.asp |
|
| 119 |
ghuddy |
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
' Good idea to set when using redirect
|
| 125 |
ghuddy |
12 |
Response.Expires = 0 ' always load the page, dont store
|
| 119 |
ghuddy |
13 |
%>
|
|
|
14 |
<!--#include file="common/conf.asp"-->
|
|
|
15 |
<!--#include file="common/globals.asp"-->
|
|
|
16 |
<!--#include file="common/formating.asp"-->
|
|
|
17 |
<!--#include file="common/qstr.asp"-->
|
|
|
18 |
<!--#include file="common/common_subs.asp"-->
|
|
|
19 |
<%
|
|
|
20 |
'------------ Variable Definition -------------
|
|
|
21 |
Dim rsTemp
|
|
|
22 |
Dim PageInfoHash
|
| 125 |
ghuddy |
23 |
Dim Query_String
|
|
|
24 |
Dim Auto
|
| 119 |
ghuddy |
25 |
'------------ Constants Declaration -----------
|
|
|
26 |
'------------ Variable Init -------------------
|
|
|
27 |
Set PageInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
28 |
'----------------------------------------------
|
|
|
29 |
%>
|
|
|
30 |
<%
|
|
|
31 |
'------------------------------------------------------------------------------------------------------------------------
|
| 125 |
ghuddy |
32 |
' This code is temporary and can be taken out at some point in the future (eg. 3 months from now. ie. Dec2008). Its purpose
|
|
|
33 |
' is to ensure that the release level metrics are up-to-date when a user expands the project link on the Release Metrics. The
|
|
|
34 |
' SQL queries and database PK_RMAPI update_release_metrics function have been updated to fix errors in the original solution
|
|
|
35 |
' but we would have to wait for the build tool to build at least one package in each release in each project before the
|
|
|
36 |
' release level metrics would be correct. So, instead, we force the re-computation of those metrics now. It doesn't take long
|
|
|
37 |
' even on a large project like Stockholm, so it is no big deal.
|
|
|
38 |
Sub UpdateReleaseMetrics
|
|
|
39 |
Dim rsQry
|
|
|
40 |
Dim rsQuery_String
|
|
|
41 |
Dim rtagid
|
|
|
42 |
|
| 129 |
ghuddy |
43 |
On Error Resume Next
|
|
|
44 |
|
| 125 |
ghuddy |
45 |
OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
46 |
|
|
|
47 |
rsQuery_String = "SELECT rm.rtag_id"&_
|
|
|
48 |
" FROM projects p,"&_
|
|
|
49 |
" release_metrics rm,"&_
|
|
|
50 |
" release_tags rt"&_
|
|
|
51 |
" WHERE p.proj_id = rt.proj_id"&_
|
|
|
52 |
" AND rm.rtag_id = rt.rtag_id"&_
|
|
|
53 |
" AND p.proj_id = :PROJ_ID"
|
|
|
54 |
|
|
|
55 |
Set rsQry = OraDatabase.DbCreateDynaset( rsQuery_String, cint(0))
|
|
|
56 |
|
|
|
57 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
58 |
OraDatabase.Parameters.Add "RTAG_ID", rsQry("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
59 |
|
| 129 |
ghuddy |
60 |
objEH.TryORA ( OraSession )
|
|
|
61 |
|
| 125 |
ghuddy |
62 |
OraDatabase.ExecuteSQL "BEGIN PK_RMAPI.UPDATE_RELEASE_METRICS ( :RTAG_ID ); END;"
|
|
|
63 |
|
| 129 |
ghuddy |
64 |
objEH.CatchORA ( OraSession )
|
|
|
65 |
|
| 125 |
ghuddy |
66 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
67 |
rsQry.MoveNext
|
|
|
68 |
WEnd
|
|
|
69 |
|
|
|
70 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
|
|
71 |
|
|
|
72 |
rsQry.Close
|
|
|
73 |
Set rsQry = nothing
|
|
|
74 |
End Sub
|
|
|
75 |
|
| 119 |
ghuddy |
76 |
'------------------------------------------------------------------------------------------------------------------------
|
|
|
77 |
%>
|
|
|
78 |
<%
|
|
|
79 |
'------------------------ MAIN LINE ---------------------------------
|
| 125 |
ghuddy |
80 |
Call UpdateReleaseMetrics
|
| 119 |
ghuddy |
81 |
'--------------------------------------------------------------------
|
|
|
82 |
%>
|
|
|
83 |
<table width="100%" border="0" cellspacing="1" cellpadding="1">
|
| 125 |
ghuddy |
84 |
<tr>
|
|
|
85 |
<td background="images/bg_form_lightbluedark.gif">
|
|
|
86 |
<table width="100%" border="0" cellspacing="1" cellpadding="3">
|
|
|
87 |
<tr>
|
|
|
88 |
<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Release</td>
|
|
|
89 |
<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Last Autobuild<br>Completed</td>
|
|
|
90 |
<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autobuilt Packages</td>
|
|
|
91 |
<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Lines Of Code</td>
|
|
|
92 |
<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Unit Tested</td>
|
|
|
93 |
<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autotested</td>
|
|
|
94 |
</tr>
|
| 119 |
ghuddy |
95 |
|
| 125 |
ghuddy |
96 |
<%
|
|
|
97 |
OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| 119 |
ghuddy |
98 |
|
| 125 |
ghuddy |
99 |
Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("ReleaseMetrics.sql"), cint(0))
|
|
|
100 |
|
|
|
101 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
|
|
102 |
|
|
|
103 |
If rsTemp.RecordCount < 1 Then%>
|
|
|
104 |
<tr>
|
|
|
105 |
<td background="images/bg_form_lightgray.gif" nowrap> </td>
|
|
|
106 |
</tr>
|
|
|
107 |
<%Else
|
|
|
108 |
|
|
|
109 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
110 |
|
|
|
111 |
Auto=FormatPercent(rsTemp("autobuilt")/rsTemp("total_packages"), 2)
|
|
|
112 |
%>
|
|
|
113 |
|
|
|
114 |
<tr>
|
|
|
115 |
<td background="images/bg_form_lightgray.gif" nowrap class="body_txt">
|
|
|
116 |
<SPAN id="IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>" style="display:block;">
|
|
|
117 |
<a href="javascript:;" class="txt_linked" onClick="RequestReleasePackages('?rtag_id=<%=rsTemp("rtag_id")%>', '<%=rsTemp("rtag_id")%>');">
|
|
|
118 |
<img src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3">
|
|
|
119 |
<img src="images/i_world.gif" border="0" align="absmiddle" hspace="3">
|
|
|
120 |
<%=rsTemp("rtag_name")%>
|
|
|
121 |
</a>
|
|
|
122 |
</SPAN>
|
|
|
123 |
<SPAN id="IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>" style="display:none;">
|
|
|
124 |
<a href="javascript:;" class="txt_linked" onClick="ToggleDisplay( 'DIVRTAG_<%=rsTemp("rtag_id")%>', 'IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>', 'IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>');">
|
|
|
125 |
<img src="images/bt_minus.gif" border="0" align="absmiddle" hspace="3">
|
|
|
126 |
<img src="images/i_world.gif" border="0" align="absmiddle" hspace="3">
|
|
|
127 |
<%=rsTemp("rtag_name")%>
|
|
|
128 |
</a>
|
|
|
129 |
</SPAN>
|
|
|
130 |
</td>
|
|
|
131 |
<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("last_build_time")%></td>
|
|
|
132 |
<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("autobuilt")%>/<%=rsTemp("total_packages")%> (<%=Auto%>)</td>
|
|
|
133 |
<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("lines_of_code")%></td>
|
|
|
134 |
<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("unit_tested")%></td>
|
|
|
135 |
<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("autotested")%></td>
|
|
|
136 |
</tr>
|
|
|
137 |
<tr>
|
|
|
138 |
<td nowrap class="body_txt" colspan="6">
|
|
|
139 |
<DIV id="DIVRTAG_<%=rsTemp("rtag_id")%>" style="display:none;"><%=enumLOADING%></DIV>
|
|
|
140 |
</td>
|
|
|
141 |
</tr>
|
|
|
142 |
|
|
|
143 |
<%rsTemp.MoveNext
|
|
|
144 |
WEnd
|
|
|
145 |
rsTemp.Close
|
|
|
146 |
Set rsTemp = nothing
|
|
|
147 |
|
|
|
148 |
End If%>
|
|
|
149 |
</table>
|
|
|
150 |
</td>
|
| 119 |
ghuddy |
151 |
</tr>
|
|
|
152 |
</table>
|
|
|
153 |
<br>
|
| 125 |
ghuddy |
154 |
|
| 119 |
ghuddy |
155 |
<%
|
|
|
156 |
Call Destroy_All_Objects
|
| 125 |
ghuddy |
157 |
%>
|