Subversion Repositories DevTools

Rev

Rev 6699 | Rev 6707 | 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, " &_
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
139
 
140
   OraDatabase.Parameters.Add "RTAG_ID", parRtag_Id, ORAPARM_INPUT, ORATYPE_NUMBER
141
   Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
142
   OraDatabase.Parameters.Remove "PV_ID"
143
 
144
   '--- Render rows ---
145
   Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
146
 
147
      ' BEGIN ROW
6701 dpurdie 148
      Response.Write "<tr class='csvData body_rowg top'>"
6699 dpurdie 149
 
150
      ' PACKAGE NAME
6701 dpurdie 151
      Response.Write "<td>"
152
      Response.Write "<a href=dependencies.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtag_Id & ">" & rsQry("pkg_name") & "</a>"
153
      Response.Write "</td>"
6699 dpurdie 154
 
155
      ' PACKAGE VERSION
156
      If IsNull(rsQry("v_ext")) Then
6701 dpurdie 157
         Response.Write "<td>" & rsQry("pkg_version") & "</td>"
6699 dpurdie 158
      Else
6701 dpurdie 159
         Response.Write "<td>" & Left(rsQry("pkg_version"), Len(rsQry("pkg_version")) - Len(rsQry("v_ext")) ) & "</td>"
6699 dpurdie 160
      End If
161
 
162
      ' PACKAGE EXTENSION
6701 dpurdie 163
      Response.Write "<td>" & rsQry("v_ext") & "</td>"
6699 dpurdie 164
 
165
      ' PACKAGE Short Description
6701 dpurdie 166
      Response.Write "<td>" & rsQry("pv_description") & "</td>"
6699 dpurdie 167
 
168
      ' LICENCE NAME
6701 dpurdie 169
      Response.Write "<td>" & rsQry("licenceName") & "</td>"
6699 dpurdie 170
 
171
      ' Other Licences
6701 dpurdie 172
      Response.Write "<td>" & rsQry("otherlicenses") & "</td>"
6699 dpurdie 173
 
174
      ' Edit License
175
      Dim sonclick
176
      sonclick="""MM_openVixIFrame('_wform_change_licence.asp?pv_id="& rsQry("pv_id") &"&rtag_id="& parRtag_id &"','Change License')"""
177
      Dim data
178
 
179
      If canActionControlInProject ("EditPackageLicence") OR canActionControl("MSMaintainer") Then
180
        data = "<a href='javascript:;' onClick=" & sonclick & " class='body_txt'>" &_
181
               "<img src='images/i_edit.gif' width='12' height='12' border='0'>" &_
182
               "</a>"
183
     Else
184
        data = "<img src='images/i_edit_disable.gif' width='12' height='12' border='0'>"
185
     End If
186
 
6701 dpurdie 187
      Response.Write "<td>" & data & "</td>"
6699 dpurdie 188
 
189
      ' END ROW
6701 dpurdie 190
      Response.Write "</tr>"
6699 dpurdie 191
 
192
      rsQry.MoveNext
193
   Loop
194
 
195
   ' destroy objects
196
   rsQry.Close()
197
   Set rsQry = nothing
198
 
6701 dpurdie 199
End Sub
6699 dpurdie 200
 
201
'--------------------------------------------------------------------------------------------------------------------------
202
Sub LeftPanelContent
203
   objFormComponent.FormName = "FormName"
204
   objFormComponent.Method = "get"
205
   objFormComponent.Action = ScriptName
206
   Call objFormComponent.FormStart()
207
%>
208
 
209
<fieldset class="body_rowg fset">
210
    <legend>Options</legend>
6701 dpurdie 211
        <input name="showAny" type="checkbox" class="form_btn" <%=sAnyCheck%> value=1 onChange="this.form.submit()">Show Any<%=Quick_Help("h_showAny")%>
212
    <br><input name="allCots" type="checkbox" class="form_btn" <%=sAllCots%>  value=1 onChange="this.form.submit()">Show All COTS<%=Quick_Help("h_allCots")%>
213
    <br><input name="showAll" type="checkbox" class="form_btn" <%=sAllCheck%> value=1 onChange="this.form.submit()">Show All<%=Quick_Help("h_showAll")%>
214
    <br><input name="rtag_id" type="hidden" value=<%=parRtag_Id%>
6699 dpurdie 215
</fieldset>
216
   <%
217
   Call objFormComponent.FormEnd()
218
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
219
   %>
220
<%
221
End Sub
222
'----------------------------------------------
223
Sub MainPanelContent
224
%>
225
   <table class="embedded_table" style="margin-bottom:20px" width="90%">
226
      <tr>
227
         <td>
228
            <!-- Box Title -->
229
            <div class="form_ttl nowrap" align="left">
230
                 VIEW RELEASE LICENCING DETAILS
231
            </div>
232
         </td>
233
      </tr>
234
      <tr>
235
         <td>
236
            <!-- Box Content -->
237
            <div class="rounded_box">
238
               <div style="background-color: white;border-left: white solid 10px;border-right: white solid 10px;">
239
                    <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
240
                    <!--#include file="messages/_msg_inline.asp"-->
241
                    <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
6701 dpurdie 242
                    <table width="100%" class="embedded_table etable underline" id='pkgLicences'>
243
                        <thead class="body_hcol">
244
                            <tr>
245
                              <th valign="top" nowrap >Package Name</th>
246
                              <th valign="top" nowrap >Package Version</th>
247
                              <th valign="top" nowrap >Package Extension</th>
248
                              <th valign="top"        >Short Description</th>
249
                              <th valign="top" nowrap >Licences<%=Quick_Help("h_licences")%></th>
250
                              <th valign="top" nowrap >Other Licences<%=Quick_Help("h_other")%></th>
251
                              <th valign="top" nowrap class="noCsv">Edit</th>
6699 dpurdie 252
                           </tr>
6701 dpurdie 253
                        </thead>
254
                        <tbody>
255
                           <%Call PV_ID_ListHTML%>
256
                        </tbody>
6699 dpurdie 257
                    </table>
258
               </div>
259
            </div>
260
         </td>
261
      </tr>
262
   </table>
263
<%
264
End Sub
265
'------------------------------------------------------------------------------
266
%>
267
<html>
268
   <head>
269
      <title>Release Manager</title>
270
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
271
      <meta http-equiv="Pragma" content="no-cache">
272
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
273
      <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
274
      <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
275
      <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
6701 dpurdie 276
      <script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
6699 dpurdie 277
      <!-- DROPDOWN MENUS -->
6701 dpurdie 278
      <%bJqueryDataTables = TRUE%>
279
      <%bCsvExport = True%>
6699 dpurdie 280
      <!--#include file="_jquery_includes.asp"-->
281
      <!--#include file="_menu_def.asp"-->
282
      <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
283
<!-- TIPS -->
284
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
285
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
286
<script language="JavaScript" type="text/javascript">
287
<!--
288
formTips.tips.h_licences       = stdTip(300, 'License', 'A list of licences found on this version of this package' +
289
                                                          '<p>Licences are specified for a specific version of a package.' + 
290
                                                          '<p>A package may have several licences and the packages licences may change over time.' 
291
                                                          );
292
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' +
293
                                                          'for this package.' +
294
                                                          '<p>Licences are specified for a specific version of a package.' + 
295
                                                          '<p>A package may have several licences and the packages licences may change over time.' 
296
                                                          );
297
 
298
formTips.tips.h_showAny       = stdTip(300, 'Show Any', 'Show packages, in this Release, that have a licence in any release, not just this release.');
299
formTips.tips.h_showAll       = stdTip(300, 'Show All', 'Show all packages in this Release, not just those with a licence.');
6701 dpurdie 300
formTips.tips.h_allCots       = stdTip(300, 'All COTS', 'Force the inclusion of COTS packages as these should have licencing information.');
301
</script>
302
<script language="JavaScript" type="text/javascript">
303
	$(document).ready(function() {
304
		/* Init DataTables */
6699 dpurdie 305
 
6701 dpurdie 306
        table = $("#pkgLicences").DataTable({
307
            "paging":   false,
308
            "info":     true,
309
            dom: "frti",
310
            ordering: true,
311
            order: [[ 0, "asc" ]],
312
            lengthChange : false,
313
 
314
            columns: [
315
               { width: "5%", className: "dt-nowrap"},
316
               { width: "5%", className: "dt-nowrap"},
317
               { width: "1%", className: "dt-nowrap"  },
318
               { orderable: false, searchable: false },
319
               { className: "dt-nowrap" },
320
               { width: "1%", orderable: true, className: "dt-nowrap" },
321
               { width: "40px", orderable: false, searchable: false },
322
           ],
323
        });
324
    });
6699 dpurdie 325
</script>
326
   </head>
327
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
328
      <!-- HEADER -->
329
      <!--#include file="_header.asp"-->
330
      <!-- BODY ---->
331
      <table class="full_table">
332
         <tr>
333
            <td width="146px" class="panel_bg" valign="top">
334
                <%Call LeftPanelContent%>
335
            </td>
336
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
337
                <%Call MainPanelContent%>
338
            </td>
339
         </tr>
340
         <tr>
341
            <td class="panel_bg" valign="bottom" align="center" height="350">
6701 dpurdie 342
                <img src="images/img_padlock.png" vspace="20" hspace="30"></td>
6699 dpurdie 343
         </tr>
344
      </table>
345
      <!-- FOOTER -->
346
      <!--#include file="_footer.asp"-->
347
   </body>
348
</html>
349