Subversion Repositories DevTools

Rev

Rev 5957 | Rev 6070 | 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
<!-- DROPDOWN MENUS -->
5983 dpurdie 156
<!--#include file="_jquery_includes.asp"-->
5357 dpurdie 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>