Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|         View Release Licencing Details            |
6
'|                                                   |
7
'=====================================================
8
Option explicit
9
' Good idea to set when using redirect
10
Response.Expires = 0  ' always load the page, dont store
11
%>
12
<!--#include file="common/conf.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/formating.asp"-->
15
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/_form_window_common.asp"-->
18
<%
19
' Make sure rtag_id is always present
20
If Request("rtag_id") = "" Then
5957 dpurdie 21
    Call Destroy_All_Objects
5357 dpurdie 22
	Response.Redirect("index.asp")
23
End If
24
 
25
' Set rfile parameter. This is a return page after Login
26
Call objPMod.StoreParameter ( "rfile", "dependencies.asp" )
27
'------------ ACCESS CONTROL ------------------
28
%>
29
<!--#include file="_access_control_login.asp"-->
30
<!--#include file="_access_control_general.asp"-->
31
<!--#include file="_access_control_project.asp"-->
32
<%
33
'------------ Variable Definition -------------
34
 
35
'------------ Constants Declaration -----------
36
 
37
'------------ Variable Init -------------------
38
 
39
 
40
'--------------------------------------------------------------------------------------------------------------------------
41
'  release_licencing_query_string
42
'
43
'  DESCRIPTION
44
'     Constructs a query string using the provided release tag, designed to elicit
45
'     a list of PV_ID's, thier package names, versions and extensions, and licencing
46
'     associations from the release. Only those PV_IDs with one or more licencing
47
'     associations are returned.
48
'
49
'  INPUTS
50
'     NNrtag_id : The release tag to be used in the query string
51
'
52
Function release_licencing_query_string(NNrtag_id)
53
 
54
   release_licencing_query_string = "SELECT * FROM ("&_
55
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
56
                                    "        FROM release_content rc, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
57
                                    "       WHERE rc.rtag_id = "& CStr(NNrtag_id) &_
58
                                    "         AND pv.pv_id = rc.pv_id "&_
59
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
60
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
61
                                    "         AND lcng.licence (+) = lcs.licence "&_
62
                                    "      UNION "&_
63
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
64
                                    "        FROM work_in_progress wip, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
65
                                    "       WHERE wip.rtag_id = "& CStr(NNrtag_id) &_
66
                                    "         AND pv.pv_id = wip.pv_id "&_
67
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
68
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
69
                                    "         AND lcng.licence (+) = lcs.licence "&_
70
                                    "      UNION "&_
71
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
72
                                    "        FROM planned pl, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
73
                                    "       WHERE pl.rtag_id = "& CStr(NNrtag_id) &_
74
                                    "         AND pv.pv_id = pl.pv_id "&_
75
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
76
                                    "         AND (pl.operation IS NULL OR pl.operation = 'R') "&_
77
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
78
                                    "         AND lcng.licence (+) = lcs.licence "&_
79
                                    ") ORDER BY UPPER(pkg_name), UPPER(v_ext), pv_id DESC, UPPER(licenceName)"
80
End Function
81
 
82
 
83
'--------------------------------------------------------------------------------------------------------------------------
84
'  PV_ID_ListHTML
85
'
86
'  DESCRIPTION
87
'     Constructs the HTML to render the rows of package names, versions and extensions, and licences
88
'
89
Function PV_ID_ListHTML
90
   Dim rsQry
91
   Dim html_string
92
 
93
   Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
94
 
95
   '--- Render rows ---
96
   Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
97
 
98
      ' BEGIN ROW
99
      html_string = html_string & "<tr>"
100
 
101
      ' PACKAGE NAME
102
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_name") & "</td>"
103
 
104
      ' PACKAGE VERSION
105
      If IsNull(rsQry("v_ext")) Then
106
         html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_version") & "</td>"
107
      Else
108
         html_string = html_string & "<td nowrap class='body_rowg'>" & Left(rsQry("pkg_version"), Len(rsQry("pkg_version")) - Len(rsQry("v_ext")) ) & "</td>"
109
      End If
110
 
111
      ' PACKAGE EXTENSION
112
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("v_ext") & "</td>"
113
 
114
      ' LICENCE NAME
115
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("licenceName") & "</td>"
116
 
117
      ' END ROW
118
      html_string = html_string & "</tr>"
119
 
120
      rsQry.MoveNext
121
 
122
      ' ROW SEPERATOR
123
      If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
124
         html_string = html_string & "<tr><td colspan='8' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"
125
      End If
126
   Loop
127
 
128
   ' destroy objects
129
   rsQry.Close()
130
   Set rsQry = nothing
131
 
132
   ' return result
133
   PV_ID_ListHTML = html_string
134
End Function
135
 
136
'--------------------------------------------------------------------------------------------------------------------------
137
'--------------------------------------------------------------------------------------------------------------------------
138
'------------ RUN BEFORE PAGE RENDER ----------
139
 
140
 
141
 
142
'----------------------------------------------
143
%>
144
 
145
<html>
146
<head>
147
<title>Release Manager</title>
148
<link rel="shortcut icon" href="<%=FavIcon%>"/>
149
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
150
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
151
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
152
<link rel="stylesheet" href="images/navigation.css" type="text/css">
153
<script language="JavaScript" src="images/common.js"></script>
154
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
155
 
156
<!-- DROPDOWN MENUS -->
157
 
158
 
159
<!--#include file="_menu_def.asp"-->
160
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
161
 
162
</head>
163
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
164
<!-- MENU LAYERS -------------------------------------->
165
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
166
</div>
167
<!-- TIPS LAYERS -------------------------------------->
168
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
169
<!----------------------------------------------------->
170
<!-- HEADER -->
171
<!--#include file="_header.asp"-->
172
<!-- BODY ---->
173
 
174
<table width="100%" border="0" cellspacing="0" cellpadding="0">
175
   <%
176
   '-- FROM START ---------------------------------------------------------------------------------------------------------
177
 
178
   objFormComponent.FormName = "FormName"
179
   objFormComponent.Method = "post"
180
   objFormComponent.Action = ScriptName & "?rtag_id=" & parRtag_Id
181
   Call objFormComponent.FormStart()
182
   %>
183
   <tr>
184
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
185
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
186
         <table width="10" border="0" cellspacing="0" cellpadding="0">
187
            <tr>
188
               <td width="1%"></td>
189
               <td width="100%">
190
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
191
                     <tr>
192
                        <td nowrap class="body_txt"></td>
193
                     </tr>
194
                  </table>
195
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
196
                     <tr>
197
                        <td nowrap class="form_ttl"><p>&nbsp;</p>
198
                           <p>VIEW RELEASE LICENCING DETAILS</p>
199
                        </td>
200
                        <td align="right" valign="bottom"></td>
201
                     </tr>
202
                  </table>
203
               </td>
204
               <td width="1%"></td>
205
            </tr>
206
            <tr>
207
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
208
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
209
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
210
            </tr>
211
            <tr>
212
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
213
               <td bgcolor="#FFFFFF" valign="top">
214
                  <%
215
                  %>
216
                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
217
                  <!--#include file="messages/_msg_inline.asp"-->
218
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
219
                  <br>
220
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
221
                     <tr>
222
                        <td width="9%" valign="top"></td>
223
                        <tr>
224
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Name</td>
225
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Version</td>
226
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Extension</td>
227
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Licences</td>
228
                           <td valign="top">
229
                        </tr>
230
                        <%=PV_ID_ListHTML()%>
231
                        <tr>
232
                           <td class="form_iname">&nbsp;</td>
233
                           <td>&nbsp;</td>
234
                           <td class="val_err"></td>
235
                        </tr>
236
                     </tr>
237
                  </table>
238
               </td>
239
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
240
            </tr>
241
            <tr>
242
               <td background="images/bg_action_norm.gif" ></td>
243
               <td align="right" background="images/bg_action_norm.gif" >
244
                  <input name="btn_submit" type="reset" class="form_btn" value="OK", onClick="history.back();">
245
               </td>
246
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
247
            </tr>
248
            <tr>
249
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
250
               <td background="images/lbox_bg_blue.gif"></td>
251
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
252
            </tr>
253
         </table>
254
      </td>
255
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
256
   </tr>
257
   <tr>
258
      <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
259
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
260
   </tr>
261
   <%
262
   Call objFormComponent.FormEnd()
263
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
264
   %>
265
</table>
266
<!-- FOOTER -->
267
<!--#include file="_footer.asp"-->
268
</body>
269
</html>