Subversion Repositories DevTools

Rev

Rev 5513 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5355 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|                  REPORT                           |
6
'|                  Escrow                           |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0   ' always load the page, dont store
13
 
14
'To enable the script timeout to 10 mins
15
Server.ScriptTimeout=600
16
%>
17
<!--#include file="common/config.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/globals.asp"-->
20
<!--#include file="common/formating.asp"-->
21
<!--#include file="common/qstr.asp"-->
22
<!--#include file="common/common_dbedit.asp"-->
23
<%
24
'------------ ACCESS CONTROL ------------------
25
%>
26
<!--#include file="_access_control_general.asp"-->
27
<%
28
'------------ Variable Definition -------------
29
Dim rsQry
30
Dim rsTemp
31
Dim parPv_id, parExt
32
Dim objReleaseContent
33
Dim aReleaseContent
34
Dim objPackageDetails
35
Dim BldStd
36
Dim outobjDetails
37
Dim pvIdList
38
Dim dpv_id
39
'------------ Constants Declaration -----------
40
'------------ Variable Init -------------------
41
parBom_id = Request("bom_id")
42
parExt = Request("ext")
43
Set objReleaseContent = CreateObject("Scripting.Dictionary")
44
Set objPackageDetails = CreateObject("Scripting.Dictionary")
45
Set outobjDetails = CreateObject("Scripting.Dictionary")
46
'----------------------------------------------
47
%>
48
<%
49
'----------------------------------------------------------------------------------------------------------------------------------------
50
Sub GetPackageInformation ( nPv_id, ByRef oPackageDetails )
51
   Dim rsQry, query
52
   query = _
53
   " SELECT pkg.pkg_name, pv.* "&_
54
   "   FROM PACKAGES pkg,"&_
55
   "        PACKAGE_VERSIONS pv"&_
56
   "  WHERE pv.pv_id = "& nPv_id &_
57
   "    AND pv.pkg_id = pkg.pkg_id   "
58
 
59
   Set rsQry = OraDatabase.DbCreateDynaset( query, 0)
60
 
61
   oPackageDetails.RemoveAll
62
 
63
   If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
64
      oPackageDetails("pkg_name") = rsQry("pkg_name")
65
      oPackageDetails("pkg_version") = rsQry("pkg_version")
66
      oPackageDetails("v_ext") = rsQry("v_ext")
67
      oPackageDetails("pv_description") = rsQry("pv_description")
68
      oPackageDetails("pv_overview") = rsQry("pv_overview")
69
      oPackageDetails("src_path") = rsQry("src_path")
70
      oPackageDetails("pkg_label") = rsQry("pkg_label")
71
      oPackageDetails("is_build_env_required") = rsQry("is_build_env_required")
72
 
73
   End If
74
 
75
   rsQry.Close()
76
   Set rsQry = Nothing
77
End Sub
78
'----------------------------------------------------------------------------------------------------------------------------------------
79
Function SQL_Build_Std ( nPv_id )
80
   SQL_Build_Std = _
81
   " SELECT bs.bs_name"&_
82
   "  FROM RELEASE_MANAGER.PACKAGE_VERSIONS pv,"&_
83
   "       RELEASE_MANAGER.BUILD_STANDARDS bs"&_
84
   " WHERE pv.PV_ID = "& nPv_id &_
85
   "   AND pv.BS_ID = bs.BS_ID "
86
End Function
87
'----------------------------------------------------------------------------------------------------------------------------------------
88
Function SQL_Build_Env ( nPv_id )
89
   SQL_Build_Env = _
90
   " SELECT bm.bm_name"&_
91
   "  FROM  RELEASE_MANAGER.PACKAGE_BUILD_INFO pbi,"&_
92
   "        RELEASE_MANAGER.BUILD_MACHINES bm"&_
93
   " WHERE pbi.PV_ID = "& nPv_id &_
94
   "   AND pbi.BM_ID = bm.BM_ID "&_
95
   " ORDER BY UPPER(bm.BM_NAME) "
96
End Function
97
'----------------------------------------------------------------------------------------------------------------------------------------
98
Function SQL_Modules (nPv_idList)
99
   SQL_Modules   = _
100
   "SELECT DISTINCT"&_
101
    "   qry.DPV_ID "&_
102
    " FROM ("&_
103
    "      SELECT dep.*,"&_
104
    "             LEVEL AS LEVEL_NUM"&_
105
    "        FROM PACKAGE_DEPENDENCIES dep"&_
106
    "      START WITH dep.PV_ID IN ( "& nPv_idList &" ) "&_
107
    "      CONNECT BY PRIOR dep.DPV_ID = dep.PV_ID"&_
108
    "   ) qry,"&_
109
    "   PACKAGES pkg,"&_
110
   "   PACKAGE_VERSIONS pv"&_
111
    " WHERE qry.PV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID"
112
End   Function
113
'----------------------------------------------------------------------------------------------------------------------------------------
114
Function SQL_Build_Dependencies ( nPv_id )
115
   SQL_Build_Dependencies = _
116
   " SELECT dpkg.pkg_name, dpv.pkg_version"&_
117
   "     FROM PACKAGE_DEPENDENCIES dep,"&_
118
   "          PACKAGES dpkg,"&_
119
   "          PACKAGE_VERSIONS dpv"&_
120
   "    WHERE dep.pv_id = "& nPv_id &_
121
   "      AND dep.DPV_ID = dpv.pv_id"&_
122
   "      AND dpv.pkg_id = dpkg.pkg_id   "&_
123
   "   ORDER BY UPPER(dpkg.pkg_name) "
124
End Function
125
'----------------------------------------------------------------------------------------------------------------------------------------
126
Sub GetReleaseContent ( nBom_id, ByRef oReleaseContent )
127
   Dim rsQry, query
128
 
129
 
130
 
131
   query = _
132
   " SELECT qry.prod_id"&_
133
   "  FROM ("&_
134
   "         SELECT DISTINCT"&_
135
   "          osc.PROD_ID,"&_
136
   "            pkg.pkg_name,"&_
137
   "         pv.pkg_version,"&_
138
   "         1   as   seq_num"&_
139
   "         FROM bom_contents bc,"&_
140
   "         operating_systems os, "&_
141
   "         os_contents osc,"&_
142
   "         PACKAGES pkg,"&_
143
   "         PACKAGE_VERSIONS pv,"&_
144
   "         PRODUCT_DETAILS pd"&_
145
   "          WHERE osc.os_id = os.os_id "&_
146
   "         AND os.node_id = bc.node_id"&_
147
   "         AND bc.bom_id =   "&   nBom_id &_
148
   "         AND pd.PROD_ID (+) = osc.PROD_ID"&_
149
   "         AND pv.pkg_id = pkg.pkg_id"&_
150
   "         AND osc.prod_id = pv.pv_id "&_
151
   "         AND (pd.is_rejected IS NULL or pd.IS_REJECTED != 'Y')  "&_
152
   "      UNION   "&_
153
   "      SELECT DISTINCT bec.prod_id,  pkg.pkg_name, pkg_version, 2   as   seq_num"&_
154
   "       FROM boms bm,"&_
155
   "            bom_contents bc,"&_
156
   "            network_nodes nn,"&_
157
   "            operating_systems os,"&_
158
   "            os_base_env obe,"&_
159
   "            base_env_contents bec,"&_
160
   "            PACKAGES pkg,"&_
161
   "            package_versions pv,"&_
162
   "            base_env be,"&_
163
   "            bos_types bt,"&_
164
   "            PRODUCT_DETAILS pd"&_
165
   "      WHERE bm.bom_id =   "&   nBom_id   &_
166
   "        AND bm.bom_id = bc.bom_id"&_
167
   "        AND nn.node_id = bc.node_id"&_
168
   "        AND os.node_id = nn.node_id"&_
169
   "        AND obe.os_id = os.os_id"&_
170
   "      AND pd.PROD_ID (+) = bec.PROD_ID"&_
171
   "      AND (pd.is_rejected IS NULL or pd.IS_REJECTED != 'Y')  "&_
172
   "        AND bec.base_env_id = obe.base_env_id"&_
173
   "        AND bec.prod_id = pv.pv_id"&_
174
   "        AND pkg.pkg_id = pv.pkg_id"&_
175
   "        AND be.base_env_id = obe.base_env_id"&_
176
   "       AND bt.bos_id = be.bos_id"&_
177
   "      ) qry  "&_
178
   " ORDER BY  qry.seq_num, UPPER(qry.pkg_name), UPPER(qry.pkg_version)"
179
 
180
   Set rsQry = OraDatabase.DbCreateDynaset( query, 0)
181
   While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
182
      oReleaseContent( CStr( rsQry("prod_id")) ) = ""
183
      rsQry.MoveNext()
184
   WEnd
185
 
186
   rsQry.Close()
187
   Set rsQry = Nothing
188
End Sub
189
'----------------------------------------------------------------------------------------------------------------------------------------
190
 
191
%>
192
<%
193
'---------------------- Run Before Page ---------------------------
194
Call GetReleaseContent ( parBom_id, objReleaseContent )
195
 
196
Call   GetBomDetails   (parBom_id, outobjDetails)
197
outobjDetails.Item("bom_full_version") = outobjDetails.Item("bom_name")&"   "&   outobjDetails.Item("bom_version") &"."& outobjDetails.Item("bom_lifecycle")
198
 
199
 
200
'------------------------------------------------------------------
201
%>
202
<html>
203
<head>
204
<title>Deployment Manager - Escrow Report</title>
205
<link rel="shortcut icon" href="<%=FavIcon%>"/>
206
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
207
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
208
</head>
209
<body>
210
<div align="center"><b><font col color="#FF0000" size="+3"><%=outobjDetails.Item("bom_full_version")%></font></b></div>
211
<%
212
Set outobjDetails = Nothing
213
 
214
aReleaseContent = objReleaseContent.Keys
215
For Each parPv_id In aReleaseContent
216
   pvIdList = pvIdList +   parPv_id   +   ","
217
   Call GetPackageInformation ( parPv_id, objPackageDetails )
218
   Response.Flush
219
   %>
220
   <a name="<%=objPackageDetails.Item("pkg_name")%>"></a>
221
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
222
      <tr>
223
         <td class="body_colb"><h3><%=objPackageDetails.Item("pkg_name")%></h3></td>
224
      </tr>
225
   </table>
226
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
227
      <tr>
228
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Version:</strong></td>
229
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_version")%></td>
230
      </tr>
231
      <tr>
232
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Path:</strong> </td>
233
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("src_path")%></td>
234
      </tr>
235
      <tr>
236
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Label:</strong></td>
237
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_label")%></td>
238
      </tr>
239
      <tr>
240
         <td width="1%" nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Short Description:</strong></td>
241
         <td witdh="100%" bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_description") ) )%></td>
242
      </tr>
243
      <tr>
244
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Package Overview:</strong> </td>
245
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_overview") ) )%></td>
246
      </tr>
247
      <tr>
248
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>General Sublicense Material:</strong> </td>
249
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("v_ext") = parExt Then%>Yes<%Else%>No<%End If%></td>
250
      </tr>
251
      <tr>
252
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Environment:</strong> </td>
253
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("is_build_env_required") = enumDB_NO Then%>Not Required.<%End If%>
254
            <%
255
            '--- Get Build Env Details
256
            Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Std ( parPv_id ), cint(0))
257
            If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
258
               BldStd = rsQry("bs_name")
259
               rsQry.Close
260
 
261
               Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Env ( parPv_id ), cint(0))
262
               %>
263
               <ul>
264
                  <%
265
                  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
266
                     %>
267
                     <li><%=BldStd%>, <%=rsQry("bm_name")%></li>
268
                     <%rsQry.MoveNext
269
                  WEnd
270
                  %>
271
               </ul>
272
            <%End If%>
273
         </td>
274
      </tr>
275
      <tr>
276
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Dependencies:</strong> </td>
277
         <td bgcolor="#FFFFFF" class="sublbox_txt">
278
            <%
279
            '--- Get Build Dependencies Details
280
 
281
            Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Dependencies ( parPv_id ), cint(0))
282
            %>
283
            <table width="100%"  cellspacing="0" cellpadding="2" border="1">
284
               <tr>
285
                  <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="1%"><strong>Software Component</strong></td>
286
                  <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="100%"><strong>Version</strong></td>
287
               </tr>
288
               <%If rsQry.RecordCount < 1 Then%>
289
                  <tr>
290
                     <td nowrap class="sublbox_txt">No Dependencies</td>
291
                     <td nowrap class="sublbox_txt"></td>
292
                  </tr>
293
               <%End If%>
294
               <%
295
               While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
296
                  %>
297
                  <tr>
298
                     <td nowrap class="sublbox_txt"><a href="#<%=rsQry("pkg_name")%>"><%=rsQry("pkg_name")%></a></td>
299
                     <td nowrap class="sublbox_txt"><%=rsQry("pkg_version")%></td>
300
                  </tr>
301
                  <%rsQry.MoveNext
302
               WEnd
303
               %>
304
            </table>
305
         </td>
306
      </tr>
307
   </table>
308
   <br><br>
309
   <%
310
'Exit For
311
Next
312
pvIdList = Mid(pvIdList, 1, Len(pvIdList) - 1)
313
Set   rsTemp   =   OraDatabase.DbCreateDynaset( SQL_Modules ( pvIdList ), cint(0))
314
 
315
 
316
%>
317
<div align="center"><b><font col color="#FF0000" size="+3">Modules</font></b></div>
318
<%
319
While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
320
   dpv_id = rsTemp("dpv_id")
321
   Call GetPackageInformation ( dpv_id, objPackageDetails )
322
   Response.Flush
323
   %>
324
   <a name="<%=objPackageDetails.Item("pkg_name")%>"></a>
325
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
326
      <tr>
327
         <td class="body_colb"><h3><%=objPackageDetails.Item("pkg_name")%></h3></td>
328
      </tr>
329
   </table>
330
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
331
      <tr>
332
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Version:</strong></td>
333
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_version")%></td>
334
      </tr>
335
      <tr>
336
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Path:</strong> </td>
337
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("src_path")%></td>
338
      </tr>
339
      <tr>
340
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Label:</strong></td>
341
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_label")%></td>
342
      </tr>
343
      <tr>
344
         <td width="1%" nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Short Description:</strong></td>
345
         <td witdh="100%" bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_description") ) )%></td>
346
      </tr>
347
      <tr>
348
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Package Overview:</strong> </td>
349
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_overview") ) )%></td>
350
      </tr>
351
      <tr>
352
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>General Sublicense Material:</strong> </td>
353
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("v_ext") = parExt Then%>Yes<%Else%>No<%End If%></td>
354
      </tr>
355
      <tr>
356
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Environment:</strong> </td>
357
         <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("is_build_env_required") = enumDB_NO Then%>Not Required.<%End If%>
358
            <%
359
            '--- Get Build Env Details
360
            Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Env ( dpv_id ), cint(0))
361
            %>
362
            <ul>
363
               <%
364
               While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
365
                  %>
366
                  <li><%=rsQry("be_name")%></li>
367
                  <%rsQry.MoveNext
368
               WEnd
369
               %>
370
            </ul>
371
         </td>
372
      </tr>
373
      <tr>
374
         <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Dependencies:</strong> </td>
375
         <td bgcolor="#FFFFFF" class="sublbox_txt">
376
            <%
377
            '--- Get Build Dependencies Details
378
 
379
            Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Dependencies ( dpv_id ), cint(0))
380
            %>
381
            <table width="100%"  cellspacing="0" cellpadding="2" border="1">
382
               <tr>
383
                  <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="1%"><strong>Software Component</strong></td>
384
                  <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="100%"><strong>Version</strong></td>
385
               </tr>
386
               <%If rsQry.RecordCount < 1 Then%>
387
                  <tr>
388
                     <td nowrap class="sublbox_txt">No Dependencies</td>
389
                     <td nowrap class="sublbox_txt"></td>
390
                  </tr>
391
               <%End If%>
392
               <%
393
               While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
394
                  %>
395
                  <tr>
396
                     <td nowrap class="sublbox_txt"><a href="#<%=rsQry("pkg_name")%>"><%=rsQry("pkg_name")%></a></td>
397
                     <td nowrap class="sublbox_txt"><%=rsQry("pkg_version")%></td>
398
                  </tr>
399
                  <%rsQry.MoveNext
400
               WEnd
401
               %>
402
            </table>
403
         </td>
404
      </tr>
405
   </table>
406
   <br><br>
407
   <%
408
   rsTemp.MoveNext
409
WEnd
410
 
411
rsTemp.Close()
412
Set rsTemp = Nothing
413
%>
414
</body>
415
</html>
5958 dpurdie 416
<!--#include file="common/globals_destructor.asp"-->
417