Subversion Repositories DevTools

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 125
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|	           		RequestProjectRelease.asp     	 |
5
'|            RequestProjectRelease.asp              |
6
'|                                                   |
6
'|                                                   |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
' Good idea to set when using redirect
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
12
Response.Expires = 0   ' always load the page, dont store
13
%>
13
%>
14
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<%
19
<%
20
'------------ Variable Definition -------------
20
'------------ Variable Definition -------------
21
Dim rsTemp
21
Dim rsTemp
22
Dim PageInfoHash
22
Dim PageInfoHash
23
Dim	Query_String
23
Dim Query_String
24
Dim	Auto
24
Dim Auto
25
'------------ Constants Declaration -----------
25
'------------ Constants Declaration -----------
26
'------------ Variable Init -------------------
26
'------------ Variable Init -------------------
27
Set PageInfoHash = CreateObject("Scripting.Dictionary")
27
Set PageInfoHash = CreateObject("Scripting.Dictionary")
28
'----------------------------------------------
28
'----------------------------------------------
29
%>
29
%>
30
<%
30
<%
31
'------------------------------------------------------------------------------------------------------------------------
31
'------------------------------------------------------------------------------------------------------------------------
-
 
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
 
-
 
43
   OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
-
 
44
 
-
 
45
   rsQuery_String = "SELECT rm.rtag_id"&_
-
 
46
                    "  FROM projects p,"&_
-
 
47
                    "       release_metrics rm,"&_
-
 
48
                    "       release_tags rt"&_
-
 
49
                    " WHERE p.proj_id = rt.proj_id"&_
-
 
50
                    "   AND rm.rtag_id = rt.rtag_id"&_
-
 
51
                    "   AND p.proj_id = :PROJ_ID"
-
 
52
 
-
 
53
   Set rsQry = OraDatabase.DbCreateDynaset( rsQuery_String, cint(0))
-
 
54
 
-
 
55
   While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
56
      OraDatabase.Parameters.Add "RTAG_ID",         rsQry("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
57
 
-
 
58
      OraDatabase.ExecuteSQL "BEGIN  PK_RMAPI.UPDATE_RELEASE_METRICS ( :RTAG_ID ); END;"
-
 
59
 
-
 
60
      OraDatabase.Parameters.Remove "RTAG_ID"
-
 
61
      rsQry.MoveNext
-
 
62
   WEnd
-
 
63
 
-
 
64
   OraDatabase.Parameters.Remove "PROJ_ID"
-
 
65
 
-
 
66
   rsQry.Close
-
 
67
   Set rsQry = nothing
-
 
68
End Sub
-
 
69
 
32
'------------------------------------------------------------------------------------------------------------------------
70
'------------------------------------------------------------------------------------------------------------------------
33
%>
71
%>
34
<%
72
<%
35
'------------------------ MAIN LINE ---------------------------------
73
'------------------------ MAIN LINE ---------------------------------
-
 
74
Call UpdateReleaseMetrics
36
'--------------------------------------------------------------------
75
'--------------------------------------------------------------------
37
%>
76
%>
38
<table width="100%" border="0" cellspacing="1" cellpadding="1">
77
<table width="100%" border="0" cellspacing="1" cellpadding="1">
39
	<tr>
78
   <tr>
40
		<td background="images/bg_form_lightbluedark.gif">		
79
      <td background="images/bg_form_lightbluedark.gif">
41
			<table width="100%" border="0" cellspacing="1" cellpadding="3">
80
         <table width="100%" border="0" cellspacing="1" cellpadding="3">
42
				<tr> 
81
            <tr>
43
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Release</td>
82
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Release</td>
44
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Last Autobuild<br>Completed</td>
83
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Last Autobuild<br>Completed</td>
45
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autobuilt Packages</td>
84
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autobuilt Packages</td>
46
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Lines Of Code</td>
85
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Lines Of Code</td>
47
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Unit Tested</td>
86
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Unit Tested</td>
48
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autotested</td>
87
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autotested</td>
49
					<td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Branches</td>
-
 
50
				</tr>
88
            </tr>
51
 
89
 
52
				<%
90
            <%
53
				OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
91
            OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
54
				
92
 
55
				Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("ReleaseMetrics.sql"), cint(0))
93
            Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("ReleaseMetrics.sql"), cint(0))
56
				
94
 
57
				OraDatabase.Parameters.Remove "PROJ_ID"
95
            OraDatabase.Parameters.Remove "PROJ_ID"
58
 
96
 
59
				If rsTemp.RecordCount < 1 Then
97
            If rsTemp.RecordCount < 1 Then%>
60
				%>
-
 
61
				<tr> 
98
               <tr>
62
					<td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
99
                  <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
63
				</tr>
100
               </tr>
64
				<%
-
 
65
				Else
101
            <%Else
66
				
102
 
67
				While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
103
               While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
-
 
104
 
68
				Auto=FormatPercent(rsTemp("autobuilt")/rsTemp("total_packages"), 2)
105
                  Auto=FormatPercent(rsTemp("autobuilt")/rsTemp("total_packages"), 2)
69
				%>
106
                  %>
70
				
107
 
71
        <tr> 
108
                  <tr>
72
          <td background="images/bg_form_lightgray.gif" nowrap class="body_txt">
109
                     <td background="images/bg_form_lightgray.gif" nowrap class="body_txt">
73
						<SPAN id="IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>" style="display:block;">
110
                        <SPAN id="IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>" style="display:block;">
74
							<a href="javascript:;" class="txt_linked" onClick="RequestReleasePackages('?rtag_id=<%=rsTemp("rtag_id")%>', '<%=rsTemp("rtag_id")%>');"><img src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3"><img src="images/i_world.gif" border="0" align="absmiddle" hspace="3"><%=rsTemp("rtag_name")%></a>
111
                           <a href="javascript:;" class="txt_linked" onClick="RequestReleasePackages('?rtag_id=<%=rsTemp("rtag_id")%>', '<%=rsTemp("rtag_id")%>');">
-
 
112
                              <img src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3">
-
 
113
                              <img src="images/i_world.gif" border="0" align="absmiddle" hspace="3">
-
 
114
                              <%=rsTemp("rtag_name")%>
-
 
115
                           </a>
75
						</SPAN>							
116
                        </SPAN>
76
						<SPAN id="IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>" style="display:none;">
117
                        <SPAN id="IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>" style="display:none;">
77
							<a href="javascript:;" class="txt_linked" onClick="ToggleDisplay( 'DIVRTAG_<%=rsTemp("rtag_id")%>', 'IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>', 'IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>');"><img src="images/bt_minus.gif" border="0" align="absmiddle" hspace="3"><img src="images/i_world.gif" border="0" align="absmiddle" hspace="3"><%=rsTemp("rtag_name")%></a>
118
                           <a href="javascript:;" class="txt_linked" onClick="ToggleDisplay( 'DIVRTAG_<%=rsTemp("rtag_id")%>', 'IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>', 'IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>');">
-
 
119
                              <img src="images/bt_minus.gif" border="0" align="absmiddle" hspace="3">
-
 
120
                              <img src="images/i_world.gif" border="0" align="absmiddle" hspace="3">
-
 
121
                              <%=rsTemp("rtag_name")%>
-
 
122
                           </a>
78
						</SPAN>
123
                        </SPAN>
79
					</td>
124
                     </td>
80
					<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("last_build_time")%></td>
125
                     <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("last_build_time")%></td>
81
					<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("autobuilt")%>/<%=rsTemp("total_packages")%> (<%=Auto%>)</td>
126
                     <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("autobuilt")%>/<%=rsTemp("total_packages")%> (<%=Auto%>)</td>
82
					<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("lines_of_code")%></td>
127
                     <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("lines_of_code")%></td>
83
					<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("unit_tested")%></td>
128
                     <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("unit_tested")%></td>
84
					<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("autotested")%></td>
129
                     <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("autotested")%></td>
85
					<td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("branches")%></td>
-
 
86
        </tr>
130
                  </tr>
87
				<tr> 
131
                  <tr>
88
					<td nowrap class="body_txt" colspan="6">
132
                     <td nowrap class="body_txt" colspan="6">
89
					  <DIV id="DIVRTAG_<%=rsTemp("rtag_id")%>" style="display:none;"><%=enumLOADING%></DIV>
133
                        <DIV id="DIVRTAG_<%=rsTemp("rtag_id")%>" style="display:none;"><%=enumLOADING%></DIV>
90
					</td>
134
                     </td>
91
				</tr>
135
                  </tr>
92
        
136
 
93
				<%rsTemp.MoveNext	
137
                  <%rsTemp.MoveNext
94
				WEnd
138
               WEnd
95
				rsTemp.Close
139
               rsTemp.Close
96
				Set rsTemp = nothing
140
               Set rsTemp = nothing
97
				
141
 
98
				End If
142
            End If%>
99
				%>
-
 
100
			</table>
143
         </table>
101
    </td>						
144
    </td>
102
  </tr>
145
  </tr>
103
</table>
146
</table>
104
<br>
147
<br>
105
						
148
 
106
<%
149
<%
107
Call Destroy_All_Objects
150
Call Destroy_All_Objects
108
%>						
-
 
109
151
%>
-
 
152