Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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