| 119 |
ghuddy |
1 |
<%
|
|
|
2 |
'===================================================================
|
| 141 |
ghuddy |
3 |
' Package Common
|
| 119 |
ghuddy |
4 |
'===================================================================
|
|
|
5 |
%>
|
|
|
6 |
<!--#include file="../class/classTemplateManager.asp"-->
|
|
|
7 |
<!--#include file="../class/classTabControl.asp"-->
|
|
|
8 |
<!--#include file="../class/classActionButtonControl.asp"-->
|
| 147 |
ghuddy |
9 |
<!--#include file="daemon_instructions.asp"-->
|
| 183 |
brianf |
10 |
<!--#include file="daemon_status.asp"-->
|
| 119 |
ghuddy |
11 |
<%
|
|
|
12 |
'------------ VARIABLE DEFINITION -------------
|
|
|
13 |
Dim parPv_id
|
| 141 |
ghuddy |
14 |
Dim nEnvTab ' remember environment tab
|
| 119 |
ghuddy |
15 |
Dim objBtnControl
|
|
|
16 |
Dim aTabBtnsDef
|
|
|
17 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
18 |
'------------ VARIABLE INIT -------------------
|
|
|
19 |
parPv_id = Request("pv_id")
|
|
|
20 |
Set objBtnControl = New ActionButtonControl
|
|
|
21 |
'------------ CONDITIONS ----------------------
|
|
|
22 |
'----------------------------------------------
|
|
|
23 |
%>
|
|
|
24 |
<%
|
|
|
25 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
26 |
|
|
|
27 |
'--- Make sure rtag_id is always present
|
|
|
28 |
If (Request("rtag_id") = "") AND (Request("pv_id") = "") Then Response.Redirect("index.asp")
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
'--- Rebuild Environment
|
|
|
32 |
If (Request("rtag_id") <> "") Then
|
| 141 |
ghuddy |
33 |
Call Rebuild_Environment ( parRtag_id )
|
| 119 |
ghuddy |
34 |
End If
|
|
|
35 |
|
|
|
36 |
'--- Persist following parameters between postbacks
|
|
|
37 |
objPMod.PersistInQryString ( aPersistList(enumPAR_RTAG_ID) )
|
|
|
38 |
objPMod.PersistInQryString ( aPersistList(enumPAR_PV_ID) )
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
'--- Get Environment (lefthand side menu) tab
|
|
|
42 |
nEnvTab = GetEnvTab ( Request("envtab") )
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
'--- Get Package General Information
|
|
|
46 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
47 |
If Request("pv_id") <> "" Then
|
| 141 |
ghuddy |
48 |
Call Get_Pkg_Info ( Request("pv_id"), Request("rtag_id") )
|
| 119 |
ghuddy |
49 |
|
| 141 |
ghuddy |
50 |
' Make sure pv_id exists as it may be removed
|
|
|
51 |
If pkgInfoHash.Item("pv_id") = "" Then Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
|
| 119 |
ghuddy |
52 |
|
|
|
53 |
Else
|
| 141 |
ghuddy |
54 |
If (ScriptName <> "dependencies.asp") AND (ScriptName <> "find.asp")Then Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
|
| 119 |
ghuddy |
55 |
End If
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
'----------------------------------------------
|
|
|
59 |
%>
|
|
|
60 |
<%
|
|
|
61 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 183 |
brianf |
62 |
Sub RenderPackageProperties (irtag_id)
|
| 119 |
ghuddy |
63 |
%>
|
| 183 |
brianf |
64 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 141 |
ghuddy |
65 |
<tr>
|
| 183 |
brianf |
66 |
<td>
|
| 141 |
ghuddy |
67 |
<%
|
|
|
68 |
If pkgInfoHash.Item ("is_patch") = "Y" Then
|
|
|
69 |
'--- PATCH ---
|
|
|
70 |
Response.write "<br><a href='patches.asp?pv_id="& pkgInfoHash.Item ("patch_parent_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked'><img src='icons/i_caretone.gif' hspace='2' border='0' align='absmiddle'>Back To "& pkgInfoHash.Item ("pkg_name") &"</a><br><br>"
|
| 119 |
ghuddy |
71 |
|
| 141 |
ghuddy |
72 |
If pkgInfoHash.Item ("is_obsolete") = "Y" Then
|
|
|
73 |
Dim rsTemp
|
|
|
74 |
Set rsTemp = OraDatabase.DbCreateDynaset( "select patch_obsoleted_by from package_patches where patch_id ="&pkgInfoHash.Item ("pv_id"), cint(0))
|
| 119 |
ghuddy |
75 |
|
| 141 |
ghuddy |
76 |
If rsTemp("patch_obsoleted_by") <> "" Then
|
| 119 |
ghuddy |
77 |
|
| 141 |
ghuddy |
78 |
Set rsTemp = OraDatabase.DbCreateDynaset( "select pkg_version from package_versions where pv_id ="&rsTemp("patch_obsoleted_by"), cint(0))
|
|
|
79 |
Call Messenger ( "<SPAN class='err_alert'><b>Patch Is Obsolete!</b></SPAN><br>"& NewLine_To_BR( "<b>Obsoleted by patch "& rsTemp("pkg_version") & ". </b> " ) & NewLine_To_BR( pkgInfoHash.Item ("obsolete_comments") ), 3, "100%" )
|
| 119 |
ghuddy |
80 |
|
| 141 |
ghuddy |
81 |
rsTemp.Close()
|
|
|
82 |
Set rsTemp = nothing
|
|
|
83 |
Else
|
|
|
84 |
Call Messenger ( "<SPAN class='err_alert'><b>Patch Is Obsolete!</b></SPAN><br>"& NewLine_To_BR( pkgInfoHash.Item ("obsolete_comments") ), 3, "100%" )
|
|
|
85 |
End If
|
|
|
86 |
Response.write enum_imgPatchObsolete
|
|
|
87 |
Else
|
|
|
88 |
Response.write enum_imgPatch
|
|
|
89 |
End If
|
| 119 |
ghuddy |
90 |
|
|
|
91 |
|
| 141 |
ghuddy |
92 |
If pkgInfoHash.Item ("dlocked") = "Y" Then
|
|
|
93 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'></SPAN>"
|
|
|
94 |
Else
|
|
|
95 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_version") &"</SPAN>"
|
|
|
96 |
End If
|
|
|
97 |
Else
|
|
|
98 |
'--- PACKAGE ---
|
| 183 |
brianf |
99 |
Response.write "<table cellspacing=1 cellpadding=0>"
|
|
|
100 |
Response.write "<tr>"
|
|
|
101 |
Response.write "<td>"
|
|
|
102 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") & " " & " " & "</SPAN>"
|
|
|
103 |
Response.write "</td>"
|
|
|
104 |
|
|
|
105 |
Response.write "<td>"
|
|
|
106 |
' dlocked: Y - release, N - unlocked, P - pending, A - approved, R - rejected
|
| 141 |
ghuddy |
107 |
If pkgInfoHash.Item ("dlocked") = "Y" Then
|
| 183 |
brianf |
108 |
Response.write "<img src='images/i_locked.gif' width='13' height='15' border='0' title='Released and locked'>"
|
|
|
109 |
ElseIf pkgInfoHash("is_released") Then
|
|
|
110 |
Response.write "<img src='images/i_unlocked.gif' width='16' height='15' border='0' title='Released and unlocked'>"
|
|
|
111 |
ElseIf pkgInfoHash.Item ("dlocked") = "P" Then
|
|
|
112 |
Response.write enum_imgPending
|
|
|
113 |
ElseIf (pkgInfoHash.Item ("dlocked") = "N") OR (pkgInfoHash.Item ("dlocked") = "R") Then
|
|
|
114 |
'ElseIf (irtag_id<>"") Then
|
|
|
115 |
Response.write enum_imgBuilding
|
| 141 |
ghuddy |
116 |
End If
|
| 183 |
brianf |
117 |
Response.write "</td>"
|
|
|
118 |
Response.write "<td>"
|
|
|
119 |
|
|
|
120 |
If pkgInfoHash.Item ("product_state") = 4 Then
|
|
|
121 |
Response.write enum_imgProductRejected
|
|
|
122 |
End If
|
|
|
123 |
Response.write "</td>"
|
|
|
124 |
Response.write "<td>"
|
|
|
125 |
|
|
|
126 |
Dim state_icon
|
|
|
127 |
|
|
|
128 |
If Not IsNull(pkgInfoHash.Item ("deprecated_state")) Then
|
|
|
129 |
Select Case CInt(pkgInfoHash.Item ("deprecated_state"))
|
|
|
130 |
Case enumPKG_STATE_DEPRECATED
|
|
|
131 |
state_icon = enum_imgDeprecated
|
|
|
132 |
Case enumPKG_STATE_DEPRECATED_DEPENDENT
|
|
|
133 |
state_icon = enum_imgDeprecatedDependent
|
|
|
134 |
End Select
|
|
|
135 |
Response.write state_icon
|
|
|
136 |
End If
|
|
|
137 |
Response.write "</td>"
|
|
|
138 |
Response.write "<td>"
|
|
|
139 |
|
|
|
140 |
If Not (IsNull(pkgInfoHash.Item ("pkg_state")) or pkgInfoHash.Item ("pkg_state") = 0) Then
|
|
|
141 |
Select Case CInt(pkgInfoHash.Item ("pkg_state"))
|
|
|
142 |
Case enumPKG_STATE_MAJOR
|
|
|
143 |
state_icon = enum_imgCritical
|
|
|
144 |
Case enumPKG_STATE_MINOR
|
|
|
145 |
state_icon = enum_imgWarning
|
|
|
146 |
Case enumPKG_STATE_MAJOR_READY
|
|
|
147 |
state_icon = enum_imgCReady
|
|
|
148 |
Case enumPKG_STATE_MINOR_READY
|
|
|
149 |
state_icon = enum_imgWReady
|
|
|
150 |
Case enumPKG_NOT_FOUND
|
|
|
151 |
state_icon = enum_imgNotFound
|
|
|
152 |
Case enumPKG_STATE_NEW_PATCH
|
|
|
153 |
state_icon = enum_imgPatchAvailable
|
|
|
154 |
Case enumPKG_ADVISORY_RIPPLE
|
|
|
155 |
state_icon = enum_imgAR
|
|
|
156 |
Case enumPKG_ADVISORY_RIPPLE_DEPENDENT
|
|
|
157 |
state_icon = enum_imgARD
|
|
|
158 |
Case enumPKG_PEGGED_VERSION
|
|
|
159 |
state_icon = enum_imgGreenPin
|
|
|
160 |
End Select
|
|
|
161 |
Response.write state_icon
|
|
|
162 |
End If
|
|
|
163 |
Response.write "</td>"
|
|
|
164 |
Response.write "<td>"
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
'build_type', and a value of 'M' = manual and 'A' = auto
|
|
|
168 |
If pkgInfoHash.Item("build_type") = "M" Then
|
|
|
169 |
Response.write "<img src='icons/i_manual.gif' width='12' height='14' border='0' title='Manual package'>"
|
|
|
170 |
End If
|
|
|
171 |
Response.write "</td>"
|
|
|
172 |
Response.write "<td>"
|
|
|
173 |
|
|
|
174 |
' check if a daemon instruction exists for this package
|
|
|
175 |
Dim sDmInstr
|
|
|
176 |
sDmInstr = GetOpCodeListForRtagIdAndPvId( "", Request("rtag_id"), pkgInfoHash.Item("pv_id"), "" )
|
|
|
177 |
If sDmInstr <> "" Then
|
|
|
178 |
Response.write "<img src='icons/i_daemon_instr.gif' width='19' height='17' border='0' title='Daemon instruction:" & " " & sDmInstr & " " & "Click to view details." & "' onClick=""location.href='build_status.asp?rtag_id=" & irtag_id & "';"" >"
|
|
|
179 |
End If
|
|
|
180 |
Response.write "</td>"
|
|
|
181 |
Response.write "<td>"
|
|
|
182 |
|
|
|
183 |
' check if this package has a build failure file
|
|
|
184 |
If pkgInfoHash("has_build_failure") Then
|
|
|
185 |
Response.write "<img src='icons/i_build_failure.gif' width='19' height='17' border='0' title='Package build failure" & " " & "Click to view details." &"' onClick=""location.href='build_status.asp?rtag_id=" & irtag_id & "';"" >"
|
|
|
186 |
ElseIf pkgInfoHash("is_excluded") Then
|
|
|
187 |
' check if this package has been excluded from the build
|
|
|
188 |
Response.write "<img src='icons/i_build_exclusion.gif' width='19' height='17' border='0' title='Package excluded from build" & " " & "Click to view details." &"' onClick=""location.href='build_status.asp?rtag_id=" & irtag_id & "';"" >"
|
|
|
189 |
End If
|
|
|
190 |
Response.write "</td>"
|
|
|
191 |
Response.write "<td>"
|
|
|
192 |
|
|
|
193 |
Response.write "</td>"
|
|
|
194 |
|
|
|
195 |
Response.write "</tr>"
|
|
|
196 |
Response.write "</table>"
|
|
|
197 |
|
| 141 |
ghuddy |
198 |
End If
|
|
|
199 |
%>
|
| 183 |
brianf |
200 |
|
| 141 |
ghuddy |
201 |
</td>
|
|
|
202 |
</tr>
|
|
|
203 |
<tr>
|
| 183 |
brianf |
204 |
<td style=color:Red>
|
|
|
205 |
<%'=GetOpCodeListForRtagIdAndPvId( "NOTE: '", Request("rtag_id"), pkgInfoHash.Item("pv_id"), "' has been requested" )%>
|
|
|
206 |
</td>
|
| 147 |
ghuddy |
207 |
</tr>
|
| 183 |
brianf |
208 |
</table>
|
| 119 |
ghuddy |
209 |
<%
|
|
|
210 |
End Sub
|
|
|
211 |
|
|
|
212 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 183 |
brianf |
213 |
Sub RenderStatus(irtag_id,ipv_id)
|
| 119 |
ghuddy |
214 |
%>
|
| 183 |
brianf |
215 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
|
|
216 |
<tr>
|
|
|
217 |
<td width="50%">
|
|
|
218 |
<!-- PACKAGE PROPERTIES ---------------------------- -->
|
|
|
219 |
<%
|
|
|
220 |
If ipv_id <> "" Then
|
|
|
221 |
Call RenderPackageProperties (irtag_id)
|
|
|
222 |
End If
|
|
|
223 |
%>
|
|
|
224 |
</td>
|
|
|
225 |
<td width="12%" valign=bottom>
|
|
|
226 |
<%
|
|
|
227 |
If irtag_id<>"" Then
|
|
|
228 |
Dim objDmSts: Set objDmSts = New DaemonStatus
|
|
|
229 |
%>
|
|
|
230 |
<fieldset class="form_field">
|
|
|
231 |
<legend class=="form_field" style="color:black"><b> Daemon Status</b></legend>
|
|
|
232 |
<div style="background-color:'#f5f5f5'">
|
|
|
233 |
<%Call objDmSts.RenderDaemonStatusForRelease(irtag_id,16)%>
|
|
|
234 |
</div>
|
|
|
235 |
</fieldset>
|
|
|
236 |
<%
|
|
|
237 |
Set objDmSts = Nothing
|
|
|
238 |
End If
|
|
|
239 |
%>
|
|
|
240 |
</td>
|
|
|
241 |
<td width="38%">
|
|
|
242 |
</td>
|
|
|
243 |
</tr>
|
|
|
244 |
</table>
|
|
|
245 |
<%
|
|
|
246 |
End Sub
|
|
|
247 |
|
|
|
248 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
249 |
%>
|