| 5478 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' unused_packages.asp
|
|
|
5 |
' Display unused packages in the current release
|
|
|
6 |
' Does not include packages marked as deployable ?
|
|
|
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 |
Const allowNoPackage = TRUE ' Allow page display without pvid being present
|
|
|
14 |
Server.ScriptTimeout=300 ' To enable the script timeout to 5 mins
|
|
|
15 |
%>
|
|
|
16 |
<!--#include file="common/conf.asp"-->
|
|
|
17 |
<!--#include file="common/globals.asp"-->
|
|
|
18 |
<!--#include file="common/formating.asp"-->
|
|
|
19 |
<!--#include file="common/qstr.asp"-->
|
|
|
20 |
<!--#include file="common/common_subs.asp"-->
|
|
|
21 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
22 |
<!--#include file="common/_package_common.asp"-->
|
|
|
23 |
<!--#include file="common/release_changed.asp"-->
|
| 6881 |
dpurdie |
24 |
<!--#include file="_tabs.asp"-->
|
| 5478 |
dpurdie |
25 |
<%
|
|
|
26 |
'------------ ACCESS CONTROL ------------------
|
|
|
27 |
%>
|
| 6181 |
dpurdie |
28 |
<!--#include file="_access_control_login_optional.asp"-->
|
| 5478 |
dpurdie |
29 |
<!--#include file="_access_control_general.asp"-->
|
|
|
30 |
<%
|
|
|
31 |
'------------ Variable Definition -------------
|
|
|
32 |
Dim rsQry
|
|
|
33 |
Dim enableRemoval : enableRemoval = FALSE
|
|
|
34 |
Dim enabledText : enabledText = "disabled "
|
| 6123 |
dpurdie |
35 |
Dim parMode : parMode = QStrParDefault("mode", 0)
|
|
|
36 |
Dim modeCb1 : modeCb1 = iif ( parMode AND 1, " checked", "" )
|
|
|
37 |
Dim modeCb2 : modeCb2 = iif ( parMode AND 2, " checked", "" )
|
|
|
38 |
Dim modeCb3 : modeCb3 = iif ( parMode AND 4, " checked", "" )
|
| 5478 |
dpurdie |
39 |
|
|
|
40 |
'------------ Constants Declaration -----------
|
|
|
41 |
'------------ Variable Init -------------------
|
|
|
42 |
'----------------------------------------------
|
|
|
43 |
'------------------------- MAIN LINE ---------------------------
|
|
|
44 |
|
|
|
45 |
If Request("action") = "RemovePackages" AND Request("list_pv_id") <> "" Then
|
|
|
46 |
Dim pvidArray, nPvId
|
|
|
47 |
pvidArray = Split(Request("list_pv_id"), ",")
|
|
|
48 |
For Each nPvId in pvidArray
|
|
|
49 |
|
|
|
50 |
nPvId = Trim(nPvId)
|
|
|
51 |
|
|
|
52 |
Dim objRC: Set objRC = New ReleaseChanged
|
|
|
53 |
Call objRC.Get_Package_Info (parRtag_id,nPvId)
|
|
|
54 |
Dim bReleased: bReleased = objRC.IsReleased(parRtag_id,nPvId)
|
|
|
55 |
|
|
|
56 |
OraDatabase.Parameters.Add "PV_ID", nPvId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
57 |
OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
58 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
59 |
OraDatabase.Parameters.Add "RETURN_CODE", NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
|
|
|
60 |
OraDatabase.Parameters.Add "FORCE_REMOVE","N", ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
61 |
|
|
|
62 |
objEH.TryORA ( OraSession )
|
|
|
63 |
On Error Resume Next
|
|
|
64 |
|
|
|
65 |
OraDatabase.ExecuteSQL _
|
|
|
66 |
"BEGIN "&_
|
|
|
67 |
" :RETURN_CODE := PK_ENVIRONMENT.REMOVE_PACKAGE ( :PV_ID, :RTAG_ID, :USER_ID, :FORCE_REMOVE );"&_
|
|
|
68 |
"END; "
|
|
|
69 |
|
|
|
70 |
objEH.CatchORA ( OraSession )
|
|
|
71 |
|
|
|
72 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
73 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
74 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 5952 |
dpurdie |
75 |
OraDatabase.Parameters.Remove "RETURN_CODE"
|
| 5478 |
dpurdie |
76 |
OraDatabase.Parameters.Remove "FORCE_REMOVE"
|
|
|
77 |
|
|
|
78 |
If Not objEH.LastOraFailed Then
|
|
|
79 |
If bReleased Then
|
|
|
80 |
Call objRC.Run_ReleaseChanged(parRtag_id,nPvId,enumRELEASE_CHANGE_MODE_PKG_REMOVED,false)
|
|
|
81 |
End If
|
|
|
82 |
End If
|
|
|
83 |
|
|
|
84 |
Set objRC = Nothing
|
|
|
85 |
|
|
|
86 |
Next
|
|
|
87 |
End If
|
|
|
88 |
'---------------------------------------------------------------
|
|
|
89 |
%>
|
|
|
90 |
<html>
|
|
|
91 |
<head>
|
|
|
92 |
<title><%=Title(parRtag_id)%></title>
|
|
|
93 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
94 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
95 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
96 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
97 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
98 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
99 |
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
|
| 6873 |
dpurdie |
100 |
<%bCsvExport = True%>
|
| 5478 |
dpurdie |
101 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
102 |
<!-- TIPS -->
|
| 6579 |
dpurdie |
103 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
104 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
| 5478 |
dpurdie |
105 |
<!-- DROPDOWN MENUS -->
|
|
|
106 |
<!--#include file="_menu_def.asp"-->
|
| 6579 |
dpurdie |
107 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 6123 |
dpurdie |
108 |
<script>
|
|
|
109 |
function updateDisplay()
|
|
|
110 |
{
|
|
|
111 |
function getCbValue(n){
|
|
|
112 |
var el = document.getElementById(n);
|
|
|
113 |
if (el && el.checked) {
|
|
|
114 |
return parseInt(el.value);
|
|
|
115 |
}
|
|
|
116 |
return 0;
|
|
|
117 |
}
|
|
|
118 |
var all = getCbValue('cb1') + getCbValue('cb2') + getCbValue('cb3');
|
| 7246 |
dpurdie |
119 |
//console.log ('all:', all );
|
| 6123 |
dpurdie |
120 |
location.href='<%=ScriptName%>?rtag_id=<%=parRtag_id%>&mode=' + all;
|
|
|
121 |
}
|
|
|
122 |
</script>
|
| 5478 |
dpurdie |
123 |
</head>
|
| 5481 |
dpurdie |
124 |
<body bgcolor="White" text="Black" leftmargin=0 topmargin=0 onLoad="divProgressBar.style.visibility='hidden'">
|
| 5478 |
dpurdie |
125 |
<!-- HEADER -->
|
|
|
126 |
<!--#include file="_header.asp"-->
|
|
|
127 |
<!-- BODY ---->
|
|
|
128 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
129 |
<tr>
|
| 6876 |
dpurdie |
130 |
<td class='bg_bage'>
|
| 5478 |
dpurdie |
131 |
<!-- LEFT -->
|
|
|
132 |
<!--#include file="_environment.asp"-->
|
|
|
133 |
</td>
|
|
|
134 |
<td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
|
|
135 |
<td valign="top" width="100%">
|
|
|
136 |
<!-- MIDDLE -->
|
|
|
137 |
<%
|
|
|
138 |
' Determine if the current user can remove packages from this release
|
|
|
139 |
If releaseIsWritable(ReleaseMode) Then
|
|
|
140 |
enableRemoval = TRUE
|
|
|
141 |
enabledText = ""
|
|
|
142 |
End If
|
|
|
143 |
|
|
|
144 |
Dim Query_String
|
|
|
145 |
Query_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )
|
|
|
146 |
OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 6123 |
dpurdie |
147 |
OraDatabase.Parameters.Add "SMODE", parMode, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 5478 |
dpurdie |
148 |
%>
|
|
|
149 |
<form method="post" name="removePackages">
|
| 6873 |
dpurdie |
150 |
<table class="embedded_table etable" width="10%">
|
|
|
151 |
<thead>
|
|
|
152 |
<th width="1%" nowrap class="body_colb noCsv"> </th>
|
|
|
153 |
<th width="1%" nowrap class="body_colb">Package Name and Version </th>
|
|
|
154 |
<th width="1%" nowrap class="body_colb">Released </th>
|
|
|
155 |
<th width="1%" nowrap class="body_colb">Added to Release </th>
|
|
|
156 |
<th width="1%" nowrap class="body_colb noCsv"></th>
|
|
|
157 |
</thead>
|
| 5478 |
dpurdie |
158 |
<tr>
|
|
|
159 |
<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
160 |
</tr>
|
|
|
161 |
<%
|
|
|
162 |
Dim currView_id
|
|
|
163 |
currView_id = -1
|
|
|
164 |
Dim rsRep
|
|
|
165 |
Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
|
| 5952 |
dpurdie |
166 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 6123 |
dpurdie |
167 |
OraDatabase.Parameters.Remove "SMODE"
|
| 5478 |
dpurdie |
168 |
|
|
|
169 |
If rsRep.RecordCount = 0 Then
|
|
|
170 |
With Response
|
|
|
171 |
.write "<tr>"
|
|
|
172 |
.write "<td colspan='5' class='body_row'>Found 0 records</td>"
|
|
|
173 |
.write "</tr>"
|
|
|
174 |
End With
|
|
|
175 |
End If
|
|
|
176 |
|
|
|
177 |
While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
|
|
|
178 |
' -------- GROUP BY BASE VIEW -----------------
|
|
|
179 |
If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
|
|
|
180 |
%>
|
|
|
181 |
<tr>
|
| 6873 |
dpurdie |
182 |
<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
| 5478 |
dpurdie |
183 |
<td></td>
|
|
|
184 |
</tr>
|
|
|
185 |
<tr>
|
|
|
186 |
<td nowrap class="body_scol"><%=rsRep("view_name")%></td>
|
|
|
187 |
<td class="body_scol"></td>
|
|
|
188 |
<td class="body_scol"></td>
|
|
|
189 |
<td class="body_scol"></td>
|
|
|
190 |
<td class="body_scol"></td>
|
|
|
191 |
</tr>
|
|
|
192 |
<%
|
|
|
193 |
currView_id = CDbl(rsRep("view_id"))
|
|
|
194 |
End If
|
|
|
195 |
' -------- END GROUP ------------------------
|
|
|
196 |
%>
|
| 6873 |
dpurdie |
197 |
<tr class='csvData'>
|
| 5478 |
dpurdie |
198 |
<td class="body_row"></td>
|
|
|
199 |
<td nowrap class="body_row"><a href="used_by.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=parRtag_id%>" class="txt_linked"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></a></td>
|
| 6610 |
dpurdie |
200 |
<td nowrap class="body_row"><%=DisplayDate( rsRep("modified_stamp") )%> by <%=emailField(rsRep("modifier"),rsRep("modifier_email"))%> </td>
|
|
|
201 |
<td nowrap class="body_row"><%=DisplayDate( rsRep("insert_stamp") )%> by <%=emailField(rsRep("insertor"),rsRep("insertor_email"))%> </td>
|
| 5478 |
dpurdie |
202 |
<td nowrap class="body_row"><input type="checkbox" name="list_pv_id" <%=enabledText%> value="<%=rsRep("pv_id")%>"></td>
|
|
|
203 |
</tr>
|
|
|
204 |
<% rsRep.MoveNext
|
|
|
205 |
WEnd
|
| 5952 |
dpurdie |
206 |
rsRep.Close
|
|
|
207 |
Set rsRep = Nothing
|
| 5478 |
dpurdie |
208 |
%>
|
|
|
209 |
<tr>
|
|
|
210 |
<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
211 |
</tr>
|
|
|
212 |
<tr>
|
| 6123 |
dpurdie |
213 |
<td class="body_scol" colspan="1" ><%=ProgressBar()%></td>
|
|
|
214 |
<td class="body_scol" colspan="4" style="text-align:right">
|
|
|
215 |
<fieldset class="fset" align="left" style="border: 1px groove;display: inline;">
|
|
|
216 |
<legend style="text-align: left;">Hide</legend>
|
|
|
217 |
<input id=cb1 type="checkbox" value=1 <%=modeCb1%> onclick="return updateDisplay();">Products
|
|
|
218 |
<input id=cb2 type="checkbox" value=2 <%=modeCb2%> onclick="return updateDisplay();">3rdParty
|
|
|
219 |
<input id=cb3 type="checkbox" value=4 <%=modeCb3%> onclick="return updateDisplay();">Deployable
|
|
|
220 |
</fieldset>
|
| 5481 |
dpurdie |
221 |
<input type="submit" value="Remove from Release" <%=enabledText%> onclick="return vixConfirm('Remove all selected packages from this Release',{post: 'removePackages', progress:'#divProgressBar'})">
|
| 5478 |
dpurdie |
222 |
</td>
|
|
|
223 |
</tr>
|
|
|
224 |
<tr>
|
|
|
225 |
<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
226 |
</tr>
|
|
|
227 |
<tr>
|
|
|
228 |
<td colspan="5" class=body_txt>
|
|
|
229 |
These packages are not used within this Release. There is no package that lists any of these packages as a dependent.
|
|
|
230 |
<p>The named packages can be removed without breaking the build, although they may be required for test purposes.
|
| 6123 |
dpurdie |
231 |
<p>Certain classes of package may be hidden:
|
|
|
232 |
<br>Packages in the 'PRODUCTS' or 'AUTO PRODUCTS' are often assumed to be used.
|
|
|
233 |
<br>Packages in the '3RDPARTY_PRODUCTS' are often artfacts of Deploment Manager.
|
|
|
234 |
<br>Packages marked as 'Deployable' may be assumed to be used.
|
|
|
235 |
<br>Packages that are imported as part of an SDK are not shown.
|
| 5478 |
dpurdie |
236 |
<p>Removing one or more packages may result in other packages nolonger being used.
|
|
|
237 |
</td>
|
|
|
238 |
</tr>
|
|
|
239 |
</table>
|
|
|
240 |
<input type="hidden" name="action" value="RemovePackages">
|
|
|
241 |
</form>
|
|
|
242 |
<!-- End of Middle -->
|
|
|
243 |
</td>
|
|
|
244 |
</tr>
|
|
|
245 |
</table>
|
|
|
246 |
<!-- FOOTER -->
|
|
|
247 |
<!--#include file="_footer.asp"-->
|
|
|
248 |
</body>
|
|
|
249 |
</html>
|