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