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