| Line 1... |
Line 1... |
| 1 |
<%@LANGUAGE="VBSCRIPT"%>
|
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 2 |
<%
|
2 |
<%
|
| 3 |
'=====================================================
|
3 |
'=====================================================
|
| 4 |
'| |
|
- |
|
| - |
|
4 |
'
|
| 5 |
'| RequestTop10ChangesInLastWeek.asp |
|
5 |
' RequestTop10Changes.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
|
| Line 21... |
Line 21... |
| 21 |
Dim rsTemp
|
21 |
Dim rsTemp
|
| 22 |
Dim parInterval
|
22 |
Dim parInterval
|
| 23 |
Dim BaseId
|
23 |
Dim BaseId
|
| 24 |
'------------ Constants Declaration -----------
|
24 |
'------------ Constants Declaration -----------
|
| 25 |
'------------ Variable Init -------------------
|
25 |
'------------ Variable Init -------------------
|
| 26 |
parInterval = Request("Interval")
|
26 |
parInterval = RequestDefault("Interval", 7)
|
| 27 |
'----------------------------------------------
|
27 |
'----------------------------------------------
|
| 28 |
%>
|
28 |
%>
|
| 29 |
<%
|
29 |
<%
|
| 30 |
'------------------------------------------------------------------------------------------------------------------------
|
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
|
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.
|
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)
|
33 |
' The function relies upon the user of this ASP file having setup the Interval parameter as needed (see RequestReleasePackages.asp)
|
| 34 |
Function formQueryString
|
34 |
Function formQueryString
|
| 35 |
|
35 |
|
| 36 |
Dim qs
|
36 |
Dim qs
|
| 37 |
Dim date_Interval_expression
|
- |
|
| 38 |
|
- |
|
| 39 |
' Insert the correct date interval condition
|
- |
|
| 40 |
Select Case parInterval
|
- |
|
| 41 |
Case 1
|
- |
|
| 42 |
date_Interval_expression = " AND changed_package_versions.MODIFIED_STAMP > (ORA_SYSDATE - interval '7' day)"
|
- |
|
| 43 |
Case 2
|
- |
|
| 44 |
date_Interval_expression = " AND changed_package_versions.MODIFIED_STAMP > (ORA_SYSDATE - interval '30' day)"
|
- |
|
| 45 |
Case 3
|
- |
|
| 46 |
date_Interval_expression = " AND changed_package_versions.MODIFIED_STAMP > (ORA_SYSDATE - interval '90' day)"
|
- |
|
| 47 |
Case 4
|
- |
|
| 48 |
date_Interval_expression = ""
|
- |
|
| 49 |
Case Else
|
- |
|
| 50 |
Call RaiseMsg(enum_MSG_ERROR, "Internal Error, date interval not specified.")
|
- |
|
| 51 |
End Select
|
- |
|
| 52 |
|
37 |
|
| 53 |
' For each package ID in a release
|
38 |
' For each package ID in a release
|
| 54 |
' For each package version across all projects and releases (have to do this due to schema limitations)
|
39 |
' For each package version across all projects and releases (have to do this due to schema limitations)
|
| 55 |
' If the package version extension is the same as that being used currently in the release
|
40 |
' If the package version extension is the same as that being used currently in the release
|
| 56 |
' If the package version is locked, and is not a ripple
|
41 |
' If the package version is locked, and is not a ripple
|
| 57 |
' Increment a count for this package ID
|
42 |
' Increment a count for this package ID
|
| 58 |
' Return the 10 package IDs with the highest counts
|
43 |
' Return the 10 package IDs with the highest counts
|
| 59 |
qs = " SELECT ordered_changed.pkg_id, ordered_changed.pkg_name || pv_outer.v_ext as pkg_name, pv_outer.pv_id, pv_outer.pkg_version, ordered_changed.NumberOfChanges" _
|
44 |
qs = " SELECT ordered_changed.pkg_id, ordered_changed.pkg_name || pv_outer.v_ext as pkg_name, pv_outer.v_ext, pv_outer.pv_id, pv_outer.pkg_version, ordered_changed.NumberOfChanges" _
|
| 60 |
& " FROM RELEASE_CONTENT rc_outer, PACKAGE_VERSIONS pv_outer, " _
|
45 |
& " FROM RELEASE_CONTENT rc_outer, PACKAGE_VERSIONS pv_outer, " _
|
| 61 |
& " ( " _
|
46 |
& " ( " _
|
| 62 |
& " SELECT * FROM ( " _
|
47 |
& " SELECT * FROM ( " _
|
| 63 |
& " SELECT changed.pkg_name, changed.pkg_id, COUNT(changed.pkg_name) as NumberOfChanges FROM ( " _
|
48 |
& " SELECT changed.pkg_name, changed.pkg_id, COUNT(changed.pkg_name) as NumberOfChanges FROM ( " _
|
| 64 |
& " SELECT PACKAGES.pkg_name, PACKAGES.pkg_id " _
|
49 |
& " SELECT PACKAGES.pkg_name, PACKAGES.pkg_id " _
|
| 65 |
& " FROM PACKAGE_VERSIONS changed_package_versions, PACKAGES " _
|
50 |
& " FROM PACKAGE_VERSIONS changed_package_versions, PACKAGES " _
|
| 66 |
& " WHERE changed_package_versions.pkg_id = PACKAGES.pkg_id " & date_Interval_expression _
|
51 |
& " WHERE changed_package_versions.pkg_id = PACKAGES.pkg_id " _
|
| - |
|
52 |
& " AND changed_package_versions.MODIFIED_STAMP >= (ORA_SYSDATE - :DAYS) " _
|
| 67 |
& " AND changed_package_versions.build_type <> 'Y' " _
|
53 |
& " AND changed_package_versions.build_type <> 'Y' " _
|
| 68 |
& " AND changed_package_versions.dlocked = 'Y' " _
|
54 |
& " AND changed_package_versions.dlocked = 'Y' " _
|
| 69 |
& " AND changed_package_versions.pkg_id IN ( " _
|
55 |
& " AND changed_package_versions.pkg_id IN ( " _
|
| 70 |
& " SELECT pkg_id FROM PACKAGE_VERSIONS WHERE pv_id IN ( " _
|
56 |
& " SELECT pkg_id FROM PACKAGE_VERSIONS WHERE pv_id IN ( " _
|
| 71 |
& " SELECT pv_id " _
|
57 |
& " SELECT pv_id " _
|
| Line 80... |
Line 66... |
| 80 |
& " AND RELEASE_CONTENT.rtag_id = :rtag_id " _
|
66 |
& " AND RELEASE_CONTENT.rtag_id = :rtag_id " _
|
| 81 |
& " ) " _
|
67 |
& " ) " _
|
| 82 |
& " ) changed " _
|
68 |
& " ) changed " _
|
| 83 |
& " GROUP BY changed.pkg_name, changed.pkg_id " _
|
69 |
& " GROUP BY changed.pkg_name, changed.pkg_id " _
|
| 84 |
& " ORDER BY NumberOfChanges DESC " _
|
70 |
& " ORDER BY NumberOfChanges DESC " _
|
| 85 |
& " ) WHERE ROWNUM < 11 " _
|
71 |
& " ) WHERE ROWNUM < 21 " _
|
| 86 |
& " ) ordered_changed " _
|
72 |
& " ) ordered_changed " _
|
| 87 |
& " WHERE " _
|
73 |
& " WHERE " _
|
| 88 |
& " ordered_changed.pkg_id = pv_outer.pkg_id " _
|
74 |
& " ordered_changed.pkg_id = pv_outer.pkg_id " _
|
| 89 |
& " AND rc_outer.rtag_id = :rtag_id " _
|
75 |
& " AND rc_outer.rtag_id = :rtag_id " _
|
| 90 |
& " AND rc_outer.pv_id = pv_outer.pv_id " _
|
76 |
& " AND rc_outer.pv_id = pv_outer.pv_id " _
|
| 91 |
& " order by upper(pkg_name) "
|
77 |
& " order by upper(pkg_name) "
|
| 92 |
|
78 |
|
| 93 |
formQueryString = qs
|
79 |
formQueryString = qs
|
| 94 |
End Function
|
80 |
End Function
|
| 95 |
|
81 |
|
| 96 |
|
- |
|
| 97 |
|
- |
|
| 98 |
'------------------------------------------------------------------------------------------------------------------------
|
82 |
'------------------------------------------------------------------------------------------------------------------------
|
| 99 |
%>
|
83 |
%>
|
| 100 |
<%
|
84 |
<%
|
| 101 |
'------------------------ MAIN LINE ---------------------------------
|
85 |
'------------------------ MAIN LINE ---------------------------------
|
| 102 |
'--------------------------------------------------------------------
|
86 |
'--------------------------------------------------------------------
|
| 103 |
OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
87 |
OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
88 |
OraDatabase.Parameters.Add "DAYS", parInterval, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 104 |
Set rsTemp = OraDatabase.DbCreateDynaset( formQueryString, cint(0))
|
89 |
Set rsTemp = OraDatabase.DbCreateDynaset( formQueryString, cint(0))
|
| - |
|
90 |
OraDatabase.Parameters.Remove "DAYS"
|
| 105 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
91 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 106 |
%>
|
92 |
%>
|
| 107 |
<!-- RequestTop10Changes.asp -->
|
93 |
<!-- RequestTop10Changes.asp -->
|
| 108 |
<table width="100%" border="0" cellspacing="1" cellpadding="1">
|
94 |
<table width="100%" border="0" cellspacing="1" cellpadding="1">
|
| 109 |
|
95 |
|
| Line 123... |
Line 109... |
| 123 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
109 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| 124 |
BaseId = "TOP10_I" & parInterval & "_" & Request("rtag_id") & "_" & rsTemp("pv_id")
|
110 |
BaseId = "TOP10_I" & parInterval & "_" & Request("rtag_id") & "_" & rsTemp("pv_id")
|
| 125 |
%>
|
111 |
%>
|
| 126 |
<tr class="form_field_grey_bg">
|
112 |
<tr class="form_field_grey_bg">
|
| 127 |
<td nowrap class="body_row">
|
113 |
<td nowrap class="body_row">
|
| 128 |
<a href="javascript://rtag_id=<%=Request("rtag_id")%>&pv_id=<%=rsTemp("pv_id")%>;" class="txt_linked" onClick="ToggleLoadControl('<%=BaseId%>','RequestPackageVersionHistoryMetrics.asp?rtag_id=<%=Request("rtag_id")%>&pv_id=<%=rsTemp("pv_id")%>&mode=1');"><img id='IMG_<%=BaseId%>' src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3"><img src="images/i_world.gif" border="0" align="absmiddle" hspace="3"><%=rsTemp("pkg_name")%></a>
|
114 |
<a href="javascript://rtag_id=<%=Request("rtag_id")%>&pv_id=<%=rsTemp("pv_id")%>;" class="txt_linked" onClick="ToggleLoadControl('<%=BaseId%>','RequestPackageVersionHistoryMetrics.asp?rtag_id=<%=Request("rtag_id")%>&pv_id=<%=rsTemp("pv_id")%>&mode=1&interval=<%=parInterval%>');"><img id='IMG_<%=BaseId%>' src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3"><img src="images/i_world.gif" border="0" align="absmiddle" hspace="3"></a>
|
| - |
|
115 |
<a href ="view_by_version.asp?pkg_id=<%=rsTemp("pkg_id")%>&fpkgversion=*<%=rsTemp("v_ext")%>"><%=rsTemp("pkg_name")%></a>
|
| 129 |
</td>
|
116 |
</td>
|
| 130 |
<td nowrap class="body_row">
|
117 |
<td nowrap class="body_row">
|
| 131 |
<%=rsTemp("NumberOfChanges")%>
|
118 |
<%=rsTemp("NumberOfChanges")%>
|
| 132 |
</td>
|
119 |
</td>
|
| 133 |
</tr>
|
120 |
</tr>
|