| 6699 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| Edit/View Build Configuration |
|
|
|
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 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
20 |
<%
|
|
|
21 |
' Make sure rtag_id is always present
|
|
|
22 |
If Request("rtag_id") = "" Then
|
|
|
23 |
Call Destroy_All_Objects
|
|
|
24 |
Response.Redirect("index.asp")
|
|
|
25 |
End If
|
|
|
26 |
|
|
|
27 |
' Set rfile parameter. This is a return page after Login
|
|
|
28 |
Call objPMod.StoreParameter ( "rfile", "form_view_release_licencing.asp" )
|
|
|
29 |
'------------ ACCESS CONTROL ------------------
|
|
|
30 |
%>
|
|
|
31 |
<!--#include file="_access_control_login.asp"-->
|
|
|
32 |
<!--#include file="_access_control_general.asp"-->
|
|
|
33 |
<!--#include file="_access_control_project.asp"-->
|
|
|
34 |
<%
|
|
|
35 |
'------------ Variable Definition -------------
|
|
|
36 |
Dim bShowAll
|
|
|
37 |
Dim bShowAny
|
|
|
38 |
Dim sPrevPage
|
|
|
39 |
Dim bOrdered
|
|
|
40 |
Dim sOrderCheck
|
|
|
41 |
Dim sAllCheck
|
|
|
42 |
Dim sAnyCheck
|
|
|
43 |
'------------ Constants Declaration -----------
|
|
|
44 |
'------------ Variable Init -------------------
|
|
|
45 |
bShowAll = Request("ShowAll")
|
|
|
46 |
bShowAny = Request("ShowAny")
|
|
|
47 |
bOrdered = Request("ordered") <> ""
|
|
|
48 |
|
|
|
49 |
If bOrdered Then sOrderCheck = " Checked "
|
|
|
50 |
If bShowAny <> "" Then sAnyCheck = " Checked "
|
|
|
51 |
If bShowAll <> "" Then sAllCheck = " Checked "
|
|
|
52 |
|
|
|
53 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
54 |
' release_licencing_query_string
|
|
|
55 |
'
|
|
|
56 |
' DESCRIPTION
|
|
|
57 |
' Constructs a query string using the provided release tag, designed to elicit
|
|
|
58 |
' a list of PV_ID's, thier package names, versions and extensions, and licencing
|
|
|
59 |
' associations from the release. Only those PV_IDs with one or more licencing
|
|
|
60 |
' associations are returned.
|
|
|
61 |
'
|
|
|
62 |
' INPUTS
|
|
|
63 |
' NNrtag_id : The release tag to be used in the query string
|
|
|
64 |
'
|
|
|
65 |
Function release_licencing_query_string(NNrtag_id)
|
|
|
66 |
|
|
|
67 |
release_licencing_query_string = _
|
|
|
68 |
"WITH AllPkgLic AS " &_
|
|
|
69 |
" (SELECT pkg_id, " &_
|
|
|
70 |
" listagg(name, ',') within GROUP ( " &_
|
|
|
71 |
" ORDER BY name) AS Name " &_
|
|
|
72 |
" FROM " &_
|
|
|
73 |
" (SELECT pv.pkg_id, " &_
|
|
|
74 |
" ld.name, " &_
|
|
|
75 |
" row_number() over (partition BY pv.pkg_id, ld.name order by pv.pkg_id) AS rn " &_
|
|
|
76 |
" FROM LICENCING lg, " &_
|
|
|
77 |
" LICENCES ld , " &_
|
|
|
78 |
" package_versions pv " &_
|
|
|
79 |
" WHERE lg.pv_id = pv.pv_id " &_
|
|
|
80 |
" AND lg.LICENCE = ld.LICENCE " &_
|
|
|
81 |
" ) " &_
|
|
|
82 |
" WHERE rn = 1 " &_
|
|
|
83 |
" GROUP BY pkg_id " &_
|
|
|
84 |
" ), " &_
|
|
|
85 |
" AllPvIDs AS " &_
|
|
|
86 |
" ( SELECT DISTINCT * " &_
|
|
|
87 |
" FROM " &_
|
|
|
88 |
" ( SELECT pv_id FROM RELEASE_CONTENT rc WHERE rc.rtag_id = :rtag_id " &_
|
|
|
89 |
" UNION " &_
|
|
|
90 |
" SELECT pv_id FROM work_in_progress wip WHERE wip.rtag_id = :rtag_id " &_
|
|
|
91 |
" UNION " &_
|
|
|
92 |
" SELECT pv_id " &_
|
|
|
93 |
" FROM planned pl " &_
|
|
|
94 |
" WHERE pl.rtag_id = :rtag_id " &_
|
|
|
95 |
" AND (pl.operation IS NULL " &_
|
|
|
96 |
" OR pl.operation = 'R') " &_
|
|
|
97 |
" ) " &_
|
|
|
98 |
" ) " &_
|
|
|
99 |
"SELECT DISTINCT pv.pv_id, " &_
|
|
|
100 |
" pkg.pkg_name, " &_
|
|
|
101 |
" pv.pkg_version, " &_
|
|
|
102 |
" pv.v_ext, " &_
|
|
|
103 |
" pv.pv_description, " &_
|
|
|
104 |
" lcs.name AS licenceName , " &_
|
|
|
105 |
" CASE " &_
|
|
|
106 |
" WHEN al.NAME IS NOT NULL " &_
|
|
|
107 |
" AND lcs.name IS NOT NULL " &_
|
|
|
108 |
" AND ( lcs.name = al.NAME ) " &_
|
|
|
109 |
" THEN NULL " &_
|
|
|
110 |
" ELSE al.NAME " &_
|
|
|
111 |
" END AS OTHERLICENSES " &_
|
|
|
112 |
"FROM AllPvIDs rc, " &_
|
|
|
113 |
" package_versions pv, " &_
|
|
|
114 |
" packages pkg, " &_
|
|
|
115 |
" licencing lcng, " &_
|
|
|
116 |
" licences lcs, " &_
|
|
|
117 |
" AllPkgLic al " &_
|
|
|
118 |
"WHERE pv.pv_id = rc.pv_id " &_
|
|
|
119 |
"AND pkg.pkg_id = pv.pkg_id " &_
|
|
|
120 |
"AND pv.pv_id = lcng.pv_id (+) " &_
|
|
|
121 |
"AND lcng.licence = lcs.licence (+) " &_
|
|
|
122 |
"AND pv.pkg_id = al.pkg_id(+) " &_
|
|
|
123 |
"AND ((lcng.licence is not null) OR ('" & bShowAll & "' is not null) OR ( (al.name is not null) AND ('" & bShowAny & "' is not null) )) "
|
|
|
124 |
|
|
|
125 |
If bOrdered Then
|
|
|
126 |
release_licencing_query_string = release_licencing_query_string &_
|
|
|
127 |
"ORDER BY Upper(licenceName), Upper( pkg.pkg_name), " &_
|
|
|
128 |
" Upper(pv.pkg_version) "
|
|
|
129 |
Else
|
|
|
130 |
|
|
|
131 |
release_licencing_query_string = release_licencing_query_string &_
|
|
|
132 |
"ORDER BY Upper( pkg.pkg_name), " &_
|
|
|
133 |
" Upper(pv.pkg_version) "
|
|
|
134 |
End If
|
|
|
135 |
End Function
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
139 |
' PV_ID_ListHTML
|
|
|
140 |
'
|
|
|
141 |
' DESCRIPTION
|
|
|
142 |
' Constructs the HTML to render the rows of package names, versions and extensions, and licences
|
|
|
143 |
'
|
|
|
144 |
Function PV_ID_ListHTML
|
|
|
145 |
Dim rsQry
|
|
|
146 |
Dim html_string
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
OraDatabase.Parameters.Add "RTAG_ID", parRtag_Id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
150 |
Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
|
|
|
151 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
152 |
|
|
|
153 |
'--- Render rows ---
|
|
|
154 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
155 |
|
|
|
156 |
' BEGIN ROW
|
|
|
157 |
html_string = html_string & "<tr class='csvData'>"
|
|
|
158 |
|
|
|
159 |
' PACKAGE NAME
|
|
|
160 |
html_string = html_string & "<td nowrap class='body_rowg'>"
|
|
|
161 |
html_string = html_string & "<a href=dependencies.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtag_Id & ">" & rsQry("pkg_name") & "</a>"
|
|
|
162 |
html_string = html_string & "</td>"
|
|
|
163 |
|
|
|
164 |
' PACKAGE VERSION
|
|
|
165 |
If IsNull(rsQry("v_ext")) Then
|
|
|
166 |
html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_version") & "</td>"
|
|
|
167 |
Else
|
|
|
168 |
html_string = html_string & "<td nowrap class='body_rowg'>" & Left(rsQry("pkg_version"), Len(rsQry("pkg_version")) - Len(rsQry("v_ext")) ) & "</td>"
|
|
|
169 |
End If
|
|
|
170 |
|
|
|
171 |
' PACKAGE EXTENSION
|
|
|
172 |
html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("v_ext") & "</td>"
|
|
|
173 |
|
|
|
174 |
' PACKAGE Short Description
|
|
|
175 |
html_string = html_string & "<td class='body_rowg'>" & rsQry("pv_description") & "</td>"
|
|
|
176 |
|
|
|
177 |
' LICENCE NAME
|
|
|
178 |
html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("licenceName") & "</td>"
|
|
|
179 |
|
|
|
180 |
' Other Licences
|
|
|
181 |
html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("otherlicenses") & "</td>"
|
|
|
182 |
|
|
|
183 |
' Edit License
|
|
|
184 |
Dim sonclick
|
|
|
185 |
sonclick="""MM_openVixIFrame('_wform_change_licence.asp?pv_id="& rsQry("pv_id") &"&rtag_id="& parRtag_id &"','Change License')"""
|
|
|
186 |
Dim data
|
|
|
187 |
|
|
|
188 |
If canActionControlInProject ("EditPackageLicence") OR canActionControl("MSMaintainer") Then
|
|
|
189 |
data = "<a href='javascript:;' onClick=" & sonclick & " class='body_txt'>" &_
|
|
|
190 |
"<img src='images/i_edit.gif' width='12' height='12' border='0'>" &_
|
|
|
191 |
"</a>"
|
|
|
192 |
Else
|
|
|
193 |
data = "<img src='images/i_edit_disable.gif' width='12' height='12' border='0'>"
|
|
|
194 |
End If
|
|
|
195 |
|
|
|
196 |
html_string = html_string & "<td nowrap class='body_rowg'>" & data & "</td>"
|
|
|
197 |
|
|
|
198 |
' END ROW
|
|
|
199 |
html_string = html_string & "</tr>"
|
|
|
200 |
|
|
|
201 |
rsQry.MoveNext
|
|
|
202 |
|
|
|
203 |
' ROW SEPERATOR
|
|
|
204 |
If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
|
|
|
205 |
html_string = html_string & "<tr><td colspan='8' style='border-bottom: 1pt solid #dad7c8;'></td></tr>"
|
|
|
206 |
End If
|
|
|
207 |
Loop
|
|
|
208 |
|
|
|
209 |
' destroy objects
|
|
|
210 |
rsQry.Close()
|
|
|
211 |
Set rsQry = nothing
|
|
|
212 |
|
|
|
213 |
' return result
|
|
|
214 |
PV_ID_ListHTML = html_string
|
|
|
215 |
End Function
|
|
|
216 |
|
|
|
217 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
218 |
|
|
|
219 |
'----------------------------------------------
|
|
|
220 |
Sub LeftPanelContent
|
|
|
221 |
objFormComponent.FormName = "FormName"
|
|
|
222 |
objFormComponent.Method = "get"
|
|
|
223 |
objFormComponent.Action = ScriptName
|
|
|
224 |
Call objFormComponent.FormStart()
|
|
|
225 |
%>
|
|
|
226 |
|
|
|
227 |
<fieldset class="body_rowg fset">
|
|
|
228 |
<legend>Options</legend>
|
|
|
229 |
<input name="ordered" type="checkbox" class="form_btn" <%=sOrderCheck%> value=1 onChange="this.form.submit()">Ordered
|
|
|
230 |
<br><input name="showAny" type="checkbox" class="form_btn" <%=sAnyCheck%> value=1 onChange="this.form.submit()">Show Any<%=Quick_Help("h_showAny")%>
|
|
|
231 |
<br><input name="showAll" type="checkbox" class="form_btn" <%=sAllCheck%> value=1 onChange="this.form.submit()">Show All<%=Quick_Help("h_showAll")%>
|
|
|
232 |
<br><input name="rtag_id" type="hidden" value=<%=parRtag_Id%>
|
|
|
233 |
</fieldset>
|
|
|
234 |
<%
|
|
|
235 |
Call objFormComponent.FormEnd()
|
|
|
236 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
237 |
%>
|
|
|
238 |
<%
|
|
|
239 |
End Sub
|
|
|
240 |
'----------------------------------------------
|
|
|
241 |
Sub MainPanelContent
|
|
|
242 |
%>
|
|
|
243 |
<table class="embedded_table" style="margin-bottom:20px" width="90%">
|
|
|
244 |
<tr>
|
|
|
245 |
<td>
|
|
|
246 |
<!-- Box Title -->
|
|
|
247 |
<div class="form_ttl nowrap" align="left">
|
|
|
248 |
VIEW RELEASE LICENCING DETAILS
|
|
|
249 |
</div>
|
|
|
250 |
</td>
|
|
|
251 |
</tr>
|
|
|
252 |
<tr>
|
|
|
253 |
<td>
|
|
|
254 |
<!-- Box Content -->
|
|
|
255 |
<div class="rounded_box">
|
|
|
256 |
<div style="background-color: white;border-left: white solid 10px;border-right: white solid 10px;">
|
|
|
257 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
258 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
259 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
260 |
<table width="100%" class="embedded_table etable">
|
|
|
261 |
<tr>
|
|
|
262 |
<td valign="top"></td>
|
|
|
263 |
<tr>
|
|
|
264 |
<th valign="top" nowrap class="body_hcol">Package Name</th>
|
|
|
265 |
<th valign="top" nowrap class="body_hcol">Package Version</th>
|
|
|
266 |
<th valign="top" nowrap class="body_hcol">Package Extension</th>
|
|
|
267 |
<th valign="top" class="body_hcol">Short Description</th>
|
|
|
268 |
<th valign="top" nowrap class="body_hcol">Licences<%=Quick_Help("h_licences")%></th>
|
|
|
269 |
<th valign="top" nowrap class="body_hcol">Other Licences<%=Quick_Help("h_other")%></th>
|
|
|
270 |
<th valign="top" nowrap class="body_hcol noCsv">Edit</th>
|
|
|
271 |
</tr>
|
|
|
272 |
<%=PV_ID_ListHTML()%>
|
|
|
273 |
</tr>
|
|
|
274 |
</table>
|
|
|
275 |
</div>
|
|
|
276 |
</div>
|
|
|
277 |
</td>
|
|
|
278 |
</tr>
|
|
|
279 |
</table>
|
|
|
280 |
<%
|
|
|
281 |
End Sub
|
|
|
282 |
'------------------------------------------------------------------------------
|
|
|
283 |
%>
|
|
|
284 |
<html>
|
|
|
285 |
<head>
|
|
|
286 |
<title>Release Manager</title>
|
|
|
287 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
288 |
<meta http-equiv="Pragma" content="no-cache">
|
|
|
289 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
290 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
291 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
292 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
293 |
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
|
|
|
294 |
<!-- DROPDOWN MENUS -->
|
|
|
295 |
<%bCsvExport = True%>
|
|
|
296 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
297 |
<!--#include file="_menu_def.asp"-->
|
|
|
298 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
|
|
299 |
<!-- TIPS -->
|
|
|
300 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
301 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
|
|
302 |
<script language="JavaScript" type="text/javascript">
|
|
|
303 |
<!--
|
|
|
304 |
formTips.tips.h_licences = stdTip(300, 'License', 'A list of licences found on this version of this package' +
|
|
|
305 |
'<p>Licences are specified for a specific version of a package.' +
|
|
|
306 |
'<p>A package may have several licences and the packages licences may change over time.'
|
|
|
307 |
);
|
|
|
308 |
formTips.tips.h_other = stdTip(300, 'Other License', 'A list of licences found in others versions of this package, if they differ from the one specified' +
|
|
|
309 |
'for this package.' +
|
|
|
310 |
'<p>Licences are specified for a specific version of a package.' +
|
|
|
311 |
'<p>A package may have several licences and the packages licences may change over time.'
|
|
|
312 |
);
|
|
|
313 |
|
|
|
314 |
formTips.tips.h_showAny = stdTip(300, 'Show Any', 'Show packages, in this Release, that have a licence in any release, not just this release.');
|
|
|
315 |
formTips.tips.h_showAll = stdTip(300, 'Show All', 'Show all packages in this Release, not just those with a licence.');
|
|
|
316 |
|
|
|
317 |
</script>
|
|
|
318 |
</head>
|
|
|
319 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
|
|
320 |
<!-- HEADER -->
|
|
|
321 |
<!--#include file="_header.asp"-->
|
|
|
322 |
<!-- BODY ---->
|
|
|
323 |
<table class="full_table">
|
|
|
324 |
<tr>
|
|
|
325 |
<td width="146px" class="panel_bg" valign="top">
|
|
|
326 |
<%Call LeftPanelContent%>
|
|
|
327 |
</td>
|
|
|
328 |
<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
|
|
|
329 |
<%Call MainPanelContent%>
|
|
|
330 |
</td>
|
|
|
331 |
</tr>
|
|
|
332 |
<tr>
|
|
|
333 |
<td class="panel_bg" valign="bottom" align="center" height="350">
|
|
|
334 |
<img src="images/img_gears.png" vspace="20" hspace="30"></td>
|
|
|
335 |
</tr>
|
|
|
336 |
</table>
|
|
|
337 |
<!-- FOOTER -->
|
|
|
338 |
<!--#include file="_footer.asp"-->
|
|
|
339 |
</body>
|
|
|
340 |
</html>
|
|
|
341 |
|