Subversion Repositories DevTools

Rev

Rev 5983 | Rev 6077 | 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
<!-- HEADER -->
162
<!--#include file="_header.asp"-->
163
<!-- BODY ---->
164
 
165
<table width="100%" border="0" cellspacing="0" cellpadding="0">
166
   <%
167
   '-- FROM START ---------------------------------------------------------------------------------------------------------
168
 
169
   objFormComponent.FormName = "FormName"
170
   objFormComponent.Method = "post"
171
   objFormComponent.Action = ScriptName & "?rtag_id=" & parRtag_Id
172
   Call objFormComponent.FormStart()
173
   %>
174
   <tr>
175
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
176
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
177
         <table width="10" border="0" cellspacing="0" cellpadding="0">
178
            <tr>
179
               <td width="1%"></td>
180
               <td width="100%">
181
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
182
                     <tr>
183
                        <td nowrap class="body_txt"></td>
184
                     </tr>
185
                  </table>
186
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
187
                     <tr>
188
                        <td nowrap class="form_ttl"><p>&nbsp;</p>
189
                           <p>VIEW RELEASE LICENCING DETAILS</p>
190
                        </td>
191
                        <td align="right" valign="bottom"></td>
192
                     </tr>
193
                  </table>
194
               </td>
195
               <td width="1%"></td>
196
            </tr>
197
            <tr>
198
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
199
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
200
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
201
            </tr>
202
            <tr>
203
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
204
               <td bgcolor="#FFFFFF" valign="top">
205
                  <%
206
                  %>
207
                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
208
                  <!--#include file="messages/_msg_inline.asp"-->
209
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
210
                  <br>
211
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
212
                     <tr>
213
                        <td width="9%" valign="top"></td>
214
                        <tr>
215
                           <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>
217
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Extension</td>
218
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Licences</td>
219
                           <td valign="top">
220
                        </tr>
221
                        <%=PV_ID_ListHTML()%>
222
                        <tr>
223
                           <td class="form_iname">&nbsp;</td>
224
                           <td>&nbsp;</td>
225
                           <td class="val_err"></td>
226
                        </tr>
227
                     </tr>
228
                  </table>
229
               </td>
230
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
231
            </tr>
232
            <tr>
233
               <td background="images/bg_action_norm.gif" ></td>
234
               <td align="right" background="images/bg_action_norm.gif" >
235
                  <input name="btn_submit" type="reset" class="form_btn" value="OK", onClick="history.back();">
236
               </td>
237
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
238
            </tr>
239
            <tr>
240
               <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>
242
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
243
            </tr>
244
         </table>
245
      </td>
246
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
247
   </tr>
248
   <tr>
249
      <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>
250
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
251
   </tr>
252
   <%
253
   Call objFormComponent.FormEnd()
254
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
255
   %>
256
</table>
257
<!-- FOOTER -->
258
<!--#include file="_footer.asp"-->
259
</body>
260
</html>