Subversion Repositories DevTools

Rev

Rev 5382 | Rev 6592 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
125 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|      RequestPackageVersionHistoryMetrics.asp      |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0   ' always load the page, dont store
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 rsMetrics
23
Dim parPvId
24
'------------ Constants Declaration -----------
25
'------------ Variable Init -------------------
26
parPvId = Request("pv_id")
27
'----------------------------------------------
28
%>
29
<%
30
'------------------------------------------------------------------------------------------------------------------------
31
' Thus function formulates a query that is intended to find the top 10 packages that have changed the most in a period of
32
' time, limited in scope to those packages that have at least one version in the specified release.
33
' The function relies upon the user of this ASP file having setup the Interval parameter as needed (see RequestReleasePackages.asp)
34
Function formQueryString2
35
 
36
   Dim qs
37
 
5382 dpurdie 38
   qs  = " SELECT pv_id, last_pv_id, pkg_id, pkg_version, v_ext, created_stamp, TO_CHAR( modified_stamp,'DD-Mon-YYYY HH24:MI:SS' ) AS modified_stamp FROM package_versions " _
125 ghuddy 39
       & " CONNECT BY NOCYCLE PRIOR last_pv_id = pv_id            " _
40
       & " START WITH pv_id = :PV_ID                              " _
41
       & " ORDER BY pv_id DESC                                    "
42
 
43
   formQueryString2 = qs
44
End Function
45
 
46
 
47
 
48
'------------------------------------------------------------------------------------------------------------------------
49
%>
50
<%
51
'------------------------ MAIN LINE ---------------------------------
52
'--------------------------------------------------------------------
53
%>
54
<table width="100%" border="0" cellspacing="1" cellpadding="1">
55
   <tr>
56
      <td background="images/bg_form_lightbluedark.gif">
57
         <table width="100%" border="0" cellspacing="1" cellpadding="1">
58
            <tr>
59
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Package Version&nbsp&nbsp</td>
60
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autobuilt&nbsp&nbsp</td>
61
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Lines Of Code&nbsp&nbsp</td>
62
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Unit Tested&nbsp&nbsp</td>
63
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Autotested&nbsp&nbsp</td>
64
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Branches&nbsp&nbsp</td>
65
               <td nowrap class="body_txt" valign="top" background="images/bg_form_lightbluedark.gif">Last Modified&nbsp&nbsp</td>
66
            </tr>
67
 
68
            <%
69
            ' Get the list of ancestor versions
70
            OraDatabase.Parameters.Add "PV_ID", Request("pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
71
 
72
            Set rsTemp = OraDatabase.DbCreateDynaset( formQueryString2, cint(0))
73
 
74
            OraDatabase.Parameters.Remove "PV_ID"
75
 
76
            If rsTemp.RecordCount < 1 Then
77
            %>
78
               <tr>
79
                  <td colspan="7" background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
80
               </tr>
81
            <%
82
            Else
83
 
84
               While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
85
 
86
                  OraDatabase.Parameters.Add "PV_ID", rsTemp("pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
87
 
88
                  Set rsMetrics = OraDatabase.DbCreateDynaset( GetQuery("PackageVersionMetrics.sql"), cint(0))
89
 
90
                  OraDatabase.Parameters.Remove "PV_ID"
91
                  If rsMetrics.RecordCount > 0 Then
92
                  %>
93
                     <tr>
94
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
95
                           <a class="txt_linked" href="dependencies.asp?pv_id=<%=rsTemp("pv_id")%>">
96
                              <%=rsMetrics("pkg_name")%>
97
                              <%=VBNEWLine%><%=rsMetrics("pkg_version")%>
98
                           </a>
99
                           &nbsp&nbsp&nbsp
100
                        </td>
101
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
102
                           <%If rsMetrics("is_autobuildable") = "Y" Then%>Yes<%Else%>No<%End If%>
103
                        </td>
104
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsMetrics("code_lines")%></td>
105
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
106
                           <%If rsMetrics("unit_tested") = "Y" Then%>Yes<%Else%>No<%End If%>
107
                        </td>
108
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
109
                           <%If rsMetrics("autotested") = "Y" Then%>Yes<%Else%>No<%End If%>
110
                        </td>
111
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsMetrics("branches")%></td>
5382 dpurdie 112
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("modified_stamp")%></td>
125 ghuddy 113
                     </tr>
114
                  <%
115
                  End If
116
                  rsTemp.MoveNext
117
                  rsMetrics.Close
118
               WEnd
119
               rsTemp.Close
120
               Set rsTemp = nothing
121
 
122
            End If
123
            %>
124
         </table>
125
      </td>
126
   </tr>
127
</table>
128
<br>
129
 
130
<%
131
Call Destroy_All_Objects
132
%>