Subversion Repositories DevTools

Rev

Rev 6701 | Rev 6789 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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