Subversion Repositories DevTools

Rev

Rev 5506 | Rev 6613 | 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">Last Modified&nbsp&nbsp</td>
65
            </tr>
66
 
67
            <%
68
            ' Get the list of ancestor versions
69
            OraDatabase.Parameters.Add "PV_ID", Request("pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
70
 
71
            Set rsTemp = OraDatabase.DbCreateDynaset( formQueryString2, cint(0))
72
 
73
            OraDatabase.Parameters.Remove "PV_ID"
74
 
75
            If rsTemp.RecordCount < 1 Then
76
            %>
77
               <tr>
78
                  <td colspan="7" background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
79
               </tr>
80
            <%
81
            Else
82
 
83
               While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
84
 
85
                  OraDatabase.Parameters.Add "PV_ID", rsTemp("pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
86
 
87
                  Set rsMetrics = OraDatabase.DbCreateDynaset( GetQuery("PackageVersionMetrics.sql"), cint(0))
88
 
89
                  OraDatabase.Parameters.Remove "PV_ID"
90
                  If rsMetrics.RecordCount > 0 Then
91
                  %>
92
                     <tr>
93
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
94
                           <a class="txt_linked" href="dependencies.asp?pv_id=<%=rsTemp("pv_id")%>">
95
                              <%=rsMetrics("pkg_name")%>
96
                              <%=VBNEWLine%><%=rsMetrics("pkg_version")%>
97
                           </a>
98
                           &nbsp&nbsp&nbsp
99
                        </td>
100
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
101
                           <%If rsMetrics("is_autobuildable") = "Y" Then%>Yes<%Else%>No<%End If%>
102
                        </td>
103
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsMetrics("code_lines")%></td>
104
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
105
                           <%If rsMetrics("unit_tested") = "Y" Then%>Yes<%Else%>No<%End If%>
106
                        </td>
107
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif">
6592 dpurdie 108
                            <%If IsNull(rsMetrics("autotested")) OR rsMetrics("autotested") <> "Y" Then %>No<%ElseIf rsMetrics("test_count") = "0" Then%>?<%Else%><%=rsMetrics("test_count")%><%End If%>
125 ghuddy 109
                        </td>
5382 dpurdie 110
                        <td nowrap class="body_txt" background="images/bg_form_lightgray.gif"><%=rsTemp("modified_stamp")%></td>
125 ghuddy 111
                     </tr>
112
                  <%
113
                  End If
114
                  rsTemp.MoveNext
115
                  rsMetrics.Close
116
               WEnd
117
               rsTemp.Close
118
               Set rsTemp = nothing
119
 
120
            End If
121
            %>
122
         </table>
123
      </td>
124
   </tr>
125
</table>
126
<br>
127
 
128
<%
129
Call Destroy_All_Objects
130
%>