Subversion Repositories DevTools

Rev

Rev 6070 | Rev 6078 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6070 Rev 6077
Line 29... Line 29...
29
<!--#include file="_access_control_login.asp"-->
29
<!--#include file="_access_control_login.asp"-->
30
<!--#include file="_access_control_general.asp"-->
30
<!--#include file="_access_control_general.asp"-->
31
<!--#include file="_access_control_project.asp"-->
31
<!--#include file="_access_control_project.asp"-->
32
<%
32
<%
33
'------------ Variable Definition -------------
33
'------------ Variable Definition -------------
34
 
34
Dim bShowAll
-
 
35
Dim sPrevPage
35
'------------ Constants Declaration -----------
36
'------------ Constants Declaration -----------
36
 
37
 
37
'------------ Variable Init -------------------
38
'------------ Variable Init -------------------
38
 
-
 
-
 
39
bShowAll = Request("ShowAll")
-
 
40
sPrevPage = QStrParDefault("prevPage", Request.ServerVariables("HTTP_REFERER"))
39
 
41
 
40
'--------------------------------------------------------------------------------------------------------------------------
42
'--------------------------------------------------------------------------------------------------------------------------
41
'  release_licencing_query_string
43
'  release_licencing_query_string
42
'
44
'
43
'  DESCRIPTION
45
'  DESCRIPTION
Line 49... Line 51...
49
'  INPUTS
51
'  INPUTS
50
'     NNrtag_id : The release tag to be used in the query string
52
'     NNrtag_id : The release tag to be used in the query string
51
'
53
'
52
Function release_licencing_query_string(NNrtag_id)
54
Function release_licencing_query_string(NNrtag_id)
53
 
55
 
54
   release_licencing_query_string = "SELECT * FROM ("&_
56
   release_licencing_query_string = _
-
 
57
                    "WITH AllPkgLic AS " &_
-
 
58
                    "  (SELECT pkg_id, " &_
55
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
59
                    "    listagg(name, ',') within GROUP ( " &_
-
 
60
                    "  ORDER BY name) AS Name " &_
-
 
61
                    "  FROM " &_
-
 
62
                    "    (SELECT pv.pkg_id, " &_
-
 
63
                    "      ld.name, " &_
56
                                    "        FROM release_content rc, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
64
                    "      row_number() over (partition BY pv.pkg_id, ld.name order by pv.pkg_id) AS rn " &_
57
                                    "       WHERE rc.rtag_id = "& CStr(NNrtag_id) &_
65
                    "    FROM LICENCING lg, " &_
58
                                    "         AND pv.pv_id = rc.pv_id "&_
66
                    "      LICENCES ld , " &_
59
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
67
                    "      package_versions pv " &_
60
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
68
                    "    WHERE lg.pv_id = pv.pv_id " &_
61
                                    "         AND lcng.licence (+) = lcs.licence "&_
69
                    "    AND lg.LICENCE = ld.LICENCE " &_
-
 
70
                    "    ) " &_
-
 
71
                    "  WHERE rn = 1 " &_
-
 
72
                    "  GROUP BY pkg_id " &_
-
 
73
                    "  ), " &_
-
 
74
                    "  AllPvIDs AS " &_
62
                                    "      UNION "&_
75
                    "  ( SELECT DISTINCT * " &_
-
 
76
                    "  FROM " &_
63
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
77
                    "    ( SELECT pv_id FROM RELEASE_CONTENT rc WHERE rc.rtag_id = :rtag_id " &_
-
 
78
                    "    UNION " &_
64
                                    "        FROM work_in_progress wip, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
79
                    "    SELECT pv_id FROM work_in_progress wip WHERE wip.rtag_id = :rtag_id " &_
-
 
80
                    "    UNION " &_
-
 
81
                    "    SELECT pv_id " &_
-
 
82
                    "    FROM planned pl " &_
65
                                    "       WHERE wip.rtag_id = "& CStr(NNrtag_id) &_
83
                    "    WHERE pl.rtag_id   = :rtag_id " &_
66
                                    "         AND pv.pv_id = wip.pv_id "&_
84
                    "    AND (pl.operation IS NULL " &_
67
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
85
                    "    OR pl.operation    = 'R') " &_
-
 
86
                    "    ) " &_
-
 
87
                    "  ) " &_
68
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
88
                    "SELECT DISTINCT pv.pv_id, " &_
-
 
89
                    "  pkg.pkg_name, " &_
-
 
90
                    "  pv.pkg_version, " &_
-
 
91
                    "  pv.v_ext, " &_
-
 
92
                    "  pv.pv_description, " &_
69
                                    "         AND lcng.licence (+) = lcs.licence "&_
93
                    "  lcs.name AS licenceName , " &_
-
 
94
                    "  CASE " &_
-
 
95
                    "    WHEN al.NAME  IS NOT NULL " &_
70
                                    "      UNION "&_
96
                    "    AND lcs.name  IS NOT NULL " &_
71
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
97
                    "    AND ( lcs.name = al.NAME ) " &_
-
 
98
                    "    THEN NULL " &_
-
 
99
                    "    ELSE al.NAME " &_
-
 
100
                    "  END AS OTHERLICENSES " &_
-
 
101
                    "FROM AllPvIDs rc, " &_
72
                                    "        FROM planned pl, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
102
                    "  package_versions pv, " &_
-
 
103
                    "  packages pkg, " &_
73
                                    "       WHERE pl.rtag_id = "& CStr(NNrtag_id) &_
104
                    "  licencing lcng, " &_
-
 
105
                    "  licences lcs, " &_
-
 
106
                    "  AllPkgLic al " &_
74
                                    "         AND pv.pv_id = pl.pv_id "&_
107
                    "WHERE pv.pv_id   = rc.pv_id " &_
75
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
108
                    "AND pkg.pkg_id   = pv.pkg_id " &_
76
                                    "         AND (pl.operation IS NULL OR pl.operation = 'R') "&_
109
                    "AND pv.pv_id     = lcng.pv_id (+) " &_
-
 
110
                    "AND lcng.licence = lcs.licence (+) " &_
77
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
111
                    "AND pv.pkg_id    = al.pkg_id(+) " &_
78
                                    "         AND lcng.licence (+) = lcs.licence "&_
112
                    "AND ((lcng.licence is not null) OR ('" & bShowAll & "' is not null)) " &_
79
                                    ") ORDER BY UPPER(pkg_name), UPPER(v_ext), pv_id DESC, UPPER(licenceName)"
113
                    "ORDER BY Upper( pkg.pkg_name), " &_
-
 
114
                    "  Upper(pv.pkg_version) "
-
 
115
                                    
80
End Function
116
End Function
81
 
117
 
82
 
118
 
83
'--------------------------------------------------------------------------------------------------------------------------
119
'--------------------------------------------------------------------------------------------------------------------------
84
'  PV_ID_ListHTML
120
'  PV_ID_ListHTML
Line 88... Line 124...
88
'
124
'
89
Function PV_ID_ListHTML
125
Function PV_ID_ListHTML
90
   Dim rsQry
126
   Dim rsQry
91
   Dim html_string
127
   Dim html_string
92
 
128
 
-
 
129
 
-
 
130
   OraDatabase.Parameters.Add "RTAG_ID", parRtag_Id, ORAPARM_INPUT, ORATYPE_NUMBER
93
   Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
131
   Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
-
 
132
   OraDatabase.Parameters.Remove "PV_ID"
94
 
133
 
95
   '--- Render rows ---
134
   '--- Render rows ---
96
   Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
135
   Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
97
 
136
 
98
      ' BEGIN ROW
137
      ' BEGIN ROW
99
      html_string = html_string & "<tr>"
138
      html_string = html_string & "<tr>"
100
 
139
 
101
      ' PACKAGE NAME
140
      ' PACKAGE NAME
102
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_name") & "</td>"
141
      html_string = html_string & "<td nowrap class='body_rowg'>"
-
 
142
      html_string = html_string & "<a href=dependencies.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtag_Id & ">" & rsQry("pkg_name") & "</a>"
-
 
143
      html_string = html_string & "</td>"
103
 
144
 
104
      ' PACKAGE VERSION
145
      ' PACKAGE VERSION
105
      If IsNull(rsQry("v_ext")) Then
146
      If IsNull(rsQry("v_ext")) Then
106
         html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_version") & "</td>"
147
         html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_version") & "</td>"
107
      Else
148
      Else
Line 109... Line 150...
109
      End If
150
      End If
110
 
151
 
111
      ' PACKAGE EXTENSION
152
      ' PACKAGE EXTENSION
112
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("v_ext") & "</td>"
153
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("v_ext") & "</td>"
113
 
154
 
-
 
155
      ' PACKAGE Short Description
-
 
156
      html_string = html_string & "<td class='body_rowg'>" & rsQry("pv_description") & "</td>"
-
 
157
 
114
      ' LICENCE NAME
158
      ' LICENCE NAME
115
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("licenceName") & "</td>"
159
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("licenceName") & "</td>"
116
 
160
 
-
 
161
      ' Other Licenses
-
 
162
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("otherlicenses") & "</td>"
-
 
163
 
-
 
164
      ' Edit License
-
 
165
      Dim sonclick
-
 
166
      sonclick="""MM_openVixIFrame('_wform_change_licence.asp?pv_id="& rsQry("pv_id") &"&rtag_id="& parRtag_id &"','Change License')"""
-
 
167
      Dim data
-
 
168
 
-
 
169
      If canActionControlInProject ("EditPackageLicence") OR canActionControl("MSMaintainer") Then
-
 
170
        data = "<a href='javascript:;' onClick=" & sonclick & " class='body_txt'>" &_
-
 
171
               "<img src='images/i_edit.gif' width='12' height='12' border='0'>" &_
-
 
172
               "</a>"
-
 
173
     Else
-
 
174
        data = "<img src='images/i_edit_disable.gif' width='12' height='12' border='0'>"
-
 
175
     End If
-
 
176
 
-
 
177
      html_string = html_string & "<td nowrap class='body_rowg'>" & data & "</td>"
-
 
178
 
117
      ' END ROW
179
      ' END ROW
118
      html_string = html_string & "</tr>"
180
      html_string = html_string & "</tr>"
119
 
181
 
120
      rsQry.MoveNext
182
      rsQry.MoveNext
121
 
183
 
Line 154... Line 216...
154
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
216
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
155
<!-- DROPDOWN MENUS -->
217
<!-- DROPDOWN MENUS -->
156
<!--#include file="_jquery_includes.asp"-->
218
<!--#include file="_jquery_includes.asp"-->
157
<!--#include file="_menu_def.asp"-->
219
<!--#include file="_menu_def.asp"-->
158
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
220
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
-
 
221
<!-- TIPS -->
-
 
222
<script language="JavaScript" src="images/tipster.js"></script>
-
 
223
<script language="JavaScript" src="images/_help_tips.js"></script>
-
 
224
<script language="JavaScript" type="text/javascript">
159
 
225
<!--
-
 
226
formTips.tips.h_licenses       = stdTip(300, 'License', 'A list of licenses found on this version of this package' +
-
 
227
                                                          '<p>Licenses are specified for a specific version of a package.' + 
-
 
228
                                                          '<p>A package may have several licenses and the packages licenses may chnage over time.' 
-
 
229
                                                          );
-
 
230
formTips.tips.h_other       = stdTip(300, 'Other License', 'A list of licenses found in others versions of this package, if they differ from the one specified' +
-
 
231
                                                          'for this package.' +
-
 
232
                                                          '<p>Licenses are specified for a specific version of a package.' + 
-
 
233
                                                          '<p>A package may have several licenses and the packages licenses may chnage over time.' 
-
 
234
                                                          );
-
 
235
</script>
160
</head>
236
</head>
161
<!-- HEADER -->
237
<!-- HEADER -->
162
<!--#include file="_header.asp"-->
238
<!--#include file="_header.asp"-->
163
<!-- BODY ---->
239
<!-- BODY ---->
164
 
240
 
Line 172... Line 248...
172
   Call objFormComponent.FormStart()
248
   Call objFormComponent.FormStart()
173
   %>
249
   %>
174
   <tr>
250
   <tr>
175
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
251
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
176
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
252
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
177
         <table width="10" border="0" cellspacing="0" cellpadding="0">
253
         <table width="95%" border="0" cellspacing="0" cellpadding="0">
178
            <tr>
254
            <tr>
179
               <td width="1%"></td>
255
               <td width="1%"></td>
180
               <td width="100%">
256
               <td width="100%">
181
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
257
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
182
                     <tr>
258
                     <tr>
Line 208... Line 284...
208
                  <!--#include file="messages/_msg_inline.asp"-->
284
                  <!--#include file="messages/_msg_inline.asp"-->
209
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
285
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
210
                  <br>
286
                  <br>
211
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
287
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
212
                     <tr>
288
                     <tr>
213
                        <td width="9%" valign="top"></td>
289
                        <td valign="top"></td>
214
                        <tr>
290
                        <tr>
215
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Name</td>
291
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Name</td>
216
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Version</td>
292
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Version</td>
217
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Extension</td>
293
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Extension</td>
-
 
294
                           <td valign="top" background="images/bg_table_col.gif" class="body_col">Short Description</td>
-
 
295
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Licences<%=Quick_Help("h_licenses")%></td>
-
 
296
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Other Licenses<%=Quick_Help("h_other")%></td>
218
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Licences</td>
297
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Edit</td>
219
                           <td valign="top">
298
                           <td valign="top">
220
                        </tr>
299
                        </tr>
221
                        <%=PV_ID_ListHTML()%>
300
                        <%=PV_ID_ListHTML()%>
222
                        <tr>
301
                        <tr>
223
                           <td class="form_iname">&nbsp;</td>
302
                           <td class="form_iname">&nbsp;</td>
Line 230... Line 309...
230
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
309
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
231
            </tr>
310
            </tr>
232
            <tr>
311
            <tr>
233
               <td background="images/bg_action_norm.gif" ></td>
312
               <td background="images/bg_action_norm.gif" ></td>
234
               <td align="right" background="images/bg_action_norm.gif" >
313
               <td align="right" background="images/bg_action_norm.gif" >
235
                  <input name="btn_submit" type="reset" class="form_btn" value="OK", onClick="history.back();">
314
                  <input name="btn_submit" type="reset" class="form_btn" value="OK", onClick="location.href='<%=sPrevPage%>';">
-
 
315
                  <%If IsEmpty(bShowAll) Then%>
-
 
316
                  <input name="showAll" type="submit" class="form_btn" value="Show All">
-
 
317
                  <%Else%>
-
 
318
                  <input name="showNone" type="submit" class="form_btn" value="Hide Unspecified">
-
 
319
                  <%End If%>
236
               </td>
320
               </td>
-
 
321
                  <input name="prevPage" type="hidden" value="<%=sPrevPage%>">
237
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
322
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
238
            </tr>
323
            </tr>
239
            <tr>
324
            <tr>
240
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
325
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
241
               <td background="images/lbox_bg_blue.gif"></td>
326
               <td background="images/lbox_bg_blue.gif"></td>