Subversion Repositories DevTools

Rev

Rev 6615 | Rev 6618 | 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
'=====================================================
6617 dpurdie 4
'   RequestPackageVersionHistoryMetrics.asp 
125 ghuddy 5
'=====================================================
6
%>
7
<%
8
Option explicit
9
' Good idea to set when using redirect
10
Response.Expires = 0   ' always load the page, dont store
11
%>
12
<!--#include file="common/conf.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/formating.asp"-->
15
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/common_subs.asp"-->
17
<%
18
'------------ Variable Definition -------------
19
Dim rsMetrics
20
Dim parPvId
6615 dpurdie 21
Dim parRtagId
22
Dim parMode
6617 dpurdie 23
Dim parInterval
6615 dpurdie 24
Dim qFile
125 ghuddy 25
'------------ Constants Declaration -----------
26
'------------ Variable Init -------------------
27
parPvId = Request("pv_id")
6615 dpurdie 28
parRtagId = RequestDefault("rtag_id", 0)
29
parMode = RequestDefault("mode", 0)
6617 dpurdie 30
parInterval = RequestDefault("interval", 0)
6615 dpurdie 31
qFile = Iif ( parMode = 1, "PackageVersionMetricsAll.sql", "PackageVersionMetrics.sql") 
125 ghuddy 32
'----------------------------------------------
33
%>
34
<%
35
'------------------------ MAIN LINE ---------------------------------
36
'--------------------------------------------------------------------
6615 dpurdie 37
' Get the list of ancestor versions
38
OraDatabase.Parameters.Add "RTAG_ID", parRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER
39
OraDatabase.Parameters.Add "PV_ID", parPvId,        ORAPARM_INPUT, ORATYPE_NUMBER
40
Set rsMetrics = OraDatabase.DbCreateDynaset( GetQuery(qFile), cint(0))
41
OraDatabase.Parameters.Remove "PV_ID"
42
OraDatabase.Parameters.Remove "RTAG_ID"
43
 
125 ghuddy 44
%>
6613 dpurdie 45
<!-- RequestPackageVersionHistoryMetrics.asp -->
125 ghuddy 46
<table width="100%" border="0" cellspacing="1" cellpadding="1">
6613 dpurdie 47
<tr>
48
  <td>
49
     <table width="100%" border="0" cellspacing="1" cellpadding="1">
50
        <tr class="form_field_bg">
6615 dpurdie 51
           <td nowrap class="body_row" valign="top" >Package Version [<%=rsMetrics.RecordCount%>]</td>
6613 dpurdie 52
           <td nowrap class="body_row" valign="top" >Autobuilt</td>
53
           <td nowrap class="body_row" valign="top" >Build Reason</td>
54
           <td nowrap class="body_row" valign="top" >Lines Of Code</td>
55
           <td nowrap class="body_row" valign="top" >Unit Tested</td>
56
           <td nowrap class="body_row" valign="top" >Autotested</td>
57
           <td nowrap class="body_row" valign="top" >Last Modified</td>
58
        </tr>
125 ghuddy 59
 
6613 dpurdie 60
        <%
125 ghuddy 61
 
6613 dpurdie 62
        If rsMetrics.RecordCount < 1 Then
63
        %>
64
           <tr class="form_field_grey_bg">
6615 dpurdie 65
              <td colspan="7" class="body_row" nowrap>None Found</td>
6613 dpurdie 66
           </tr>
67
        <%
68
        Else
69
           While ((NOT rsMetrics.BOF) AND (NOT rsMetrics.EOF))
6617 dpurdie 70
               Dim trClass : trClass = "form_field_grey_bg"
71
               If parMode > 0 Then
72
                If rsMetrics("inRelease") <> 0 OR CLng(rsMetrics("ageDays")) <= CLng(parInterval) Then
73
                    trClass = "form_field_hilight_bg"
74
                End If
75
               End If
6613 dpurdie 76
              %>
6617 dpurdie 77
                 <tr class="<%=trClass%>">
6613 dpurdie 78
                    <td nowrap class="body_row">
79
                       <a class="txt_linked" href="dependencies.asp?pv_id=<%=rsMetrics("pv_id")%>"><%=rsMetrics("pkg_name")%>&nbsp;<%=rsMetrics("pkg_version")%></a>
80
                    </td>
81
                    <td nowrap class="body_row"><%=IIf(rsMetrics("is_autobuildable") = "Y", "Yes", "No")%></td>
82
                    <td nowrap class="body_row"><%=rsMetrics("reason")%></td>
83
                    <td nowrap class="body_row"><%=rsMetrics("code_lines")%></td>
84
                    <td nowrap class="body_row"><%=IIf(rsMetrics("unit_tested") = "Y", "Yes", "No")%></td>
85
                    <td nowrap class="body_row"><%If IsNull(rsMetrics("autotested")) OR rsMetrics("autotested") <> "Y" Then %>No<%ElseIf rsMetrics("test_count") = "0" Then%>?<%Else%><%=rsMetrics("test_count")%><%End If%></td>
86
                    <td nowrap class="body_row"><%=rsMetrics("modified_stamp")%></td>
87
                 </tr>
88
              <%
89
           rsMetrics.MoveNext
90
           WEnd
91
        End If
92
        rsMetrics.Close
93
        Set rsMetrics = nothing
94
        %>
95
     </table>
96
  </td>
97
</tr>
125 ghuddy 98
</table>
99
<br>
100
<%
101
Call Destroy_All_Objects
102
%>