| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
| 5623 |
dpurdie |
4 |
'
|
|
|
5 |
' Build Status Information
|
|
|
6 |
'
|
| 5357 |
dpurdie |
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 |
<!--#include file="common/conf.asp"-->
|
|
|
15 |
<!--#include file="common/globals.asp"-->
|
|
|
16 |
<!--#include file="common/formating.asp"-->
|
|
|
17 |
<!--#include file="common/qstr.asp"-->
|
|
|
18 |
<!--#include file="common/common_subs.asp"-->
|
|
|
19 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
20 |
<!--#include file="_action_buttons.asp"-->
|
|
|
21 |
<!--#include file="class/classActionButtonControl.asp"-->
|
|
|
22 |
<!--#include file="common/daemon_instructions.asp"-->
|
| 6166 |
dpurdie |
23 |
<!--#include file="common/common_daemon.asp"-->
|
| 6048 |
dpurdie |
24 |
<% '------------ ACCESS CONTROL ------------------ %>
|
| 6181 |
dpurdie |
25 |
<!--#include file="_access_control_login_optional.asp"-->
|
| 6070 |
dpurdie |
26 |
<!--#include file="_access_control_general.asp"-->
|
| 6052 |
dpurdie |
27 |
<!--#include file="_access_control_action_project.asp"-->
|
| 5357 |
dpurdie |
28 |
<% '------------ Scripts -------------------------- %>
|
|
|
29 |
<%
|
|
|
30 |
'------------ Variable Definition -------------
|
|
|
31 |
Dim rsQry
|
|
|
32 |
Dim parRtagId
|
|
|
33 |
Dim query_string
|
|
|
34 |
Dim rcon_id
|
|
|
35 |
Dim shref_base
|
| 6786 |
dpurdie |
36 |
Dim canControl
|
| 5357 |
dpurdie |
37 |
'------------ Constants Declaration -----------
|
|
|
38 |
'------------ Variable Init -------------------
|
|
|
39 |
parRtagId = Request("rtag_id")
|
|
|
40 |
objPMod.PersistInQryString("rtag_id")
|
| 6786 |
dpurdie |
41 |
canControl = canActionControlInProject("BuildControl")
|
| 5357 |
dpurdie |
42 |
'----------------------------------------------
|
| 6545 |
dpurdie |
43 |
Sub IncludePackages()
|
| 5357 |
dpurdie |
44 |
|
|
|
45 |
On Error Resume Next
|
|
|
46 |
objEH.ErrorRedirect = TRUE
|
|
|
47 |
OraDatabase.Parameters.Add "PV_ID_LIST", Request("pv_id_list"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
48 |
OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
49 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
50 |
|
|
|
51 |
objEH.TryORA ( OraSession )
|
| 6545 |
dpurdie |
52 |
OraDatabase.ExecuteSQL "BEGIN Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID ); END;"
|
| 5357 |
dpurdie |
53 |
objEH.CatchORA ( OraSession )
|
|
|
54 |
|
|
|
55 |
OraDatabase.Parameters.Remove "PV_ID_LIST"
|
|
|
56 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
57 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
58 |
|
|
|
59 |
End Sub
|
|
|
60 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
61 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
62 |
shref_base = "http://" & archive_server & "/devl/abtlog/"
|
|
|
63 |
|
|
|
64 |
'----------------------------------------------------
|
|
|
65 |
' --- RUN onPostBack ---
|
|
|
66 |
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
|
|
|
67 |
|
|
|
68 |
If objEH.Finally Then
|
|
|
69 |
If Request("action") = "include" Then
|
| 6559 |
dpurdie |
70 |
Call IncludePackages ()
|
| 5357 |
dpurdie |
71 |
' Redirect to the current page so that a refesh will not
|
|
|
72 |
' cause a form re-submit.
|
| 5957 |
dpurdie |
73 |
Call Destroy_All_Objects
|
| 5357 |
dpurdie |
74 |
Response.Redirect(ScriptName & "?rtag_id=" & parRtagId)
|
|
|
75 |
Else
|
|
|
76 |
Call OpenInWindow ( "dependencies.asp?rtag_id="& parRtagId )
|
|
|
77 |
End If
|
|
|
78 |
End If
|
|
|
79 |
|
|
|
80 |
End If
|
|
|
81 |
|
|
|
82 |
'----------------------------------------------
|
| 6546 |
dpurdie |
83 |
Sub ShowBuildStatus
|
|
|
84 |
<!-- FORM START -->
|
|
|
85 |
objFormComponent.FormName = "FormName"
|
|
|
86 |
objFormComponent.Action = ScriptName &"?rtag_id="& parRtagId
|
|
|
87 |
Call objFormComponent.FormStart()
|
|
|
88 |
%>
|
|
|
89 |
<table class="embedded_table" style="margin-bottom:20px">
|
|
|
90 |
<tr>
|
|
|
91 |
<td>
|
|
|
92 |
<tr>
|
|
|
93 |
<td>
|
|
|
94 |
<table class="rounded_box embedded_table">
|
| 6784 |
dpurdie |
95 |
<caption nowrap class="form_ttl tleft">BUILD STATUS INFORMATION</caption>
|
| 6546 |
dpurdie |
96 |
<tr>
|
| 6784 |
dpurdie |
97 |
<td>
|
|
|
98 |
<div class='round_box_pad'>
|
| 6546 |
dpurdie |
99 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
100 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
101 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
102 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
103 |
<tr>
|
|
|
104 |
<td colspan=4 class='err_alert'><font size='2'><b>Packages Excluded From Build</b></font></td>
|
|
|
105 |
</tr>
|
|
|
106 |
<tr>
|
|
|
107 |
<td></td>
|
|
|
108 |
<td colspan=3 class="body_row">
|
|
|
109 |
<fieldset class="fset" align="right" style=" border: 1px groove;">
|
|
|
110 |
Show
|
|
|
111 |
<input type="checkbox" checked value=0 name="showManual" id="manualCause" onClick="toggleDispClass('manualCause',1);">Manual Exclusions
|
|
|
112 |
<input type="checkbox" checked value=0 name="showCause" id="rootCause" onClick="toggleDispClass('rootCause',1);">Config Errors
|
|
|
113 |
<input type="checkbox" checked value=0 name="showNoEnv" id="rootNoEnv" onClick="toggleDispClass('rootNoEnv',1);">Env Errors
|
|
|
114 |
<input type="checkbox" checked value=0 name="showFile" id="rootFile" onClick="toggleDispClass('rootFile',1);">Build Errors
|
|
|
115 |
<input type="checkbox" checked value=0 name="showIndirect" id="rootIndirect" onClick="toggleDispClass('rootIndirect',1);">Indirect Exclusions
|
|
|
116 |
</fieldset>
|
|
|
117 |
</td>
|
|
|
118 |
</tr>
|
|
|
119 |
|
|
|
120 |
<tr>
|
| 6784 |
dpurdie |
121 |
<td class="err_alert body_lcol"><b>Directly</b></td>
|
|
|
122 |
<td valign="top" nowrap class="body_lcol">Package</td>
|
|
|
123 |
<td valign="top" nowrap class="body_lcol">Version</td>
|
|
|
124 |
<td valign="top" nowrap class="body_lcol">Root Cause</td>
|
| 6546 |
dpurdie |
125 |
</tr>
|
|
|
126 |
<tr>
|
|
|
127 |
<%
|
|
|
128 |
query_string = " select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description, dnr.root_pv_id"&_
|
|
|
129 |
" from do_not_ripple dnr, package_versions pv, packages pkg"&_
|
|
|
130 |
" where dnr.rtag_id = "& parRtagId &_
|
|
|
131 |
" and pv.pv_id = dnr.pv_id"&_
|
|
|
132 |
" and pkg.pkg_id = pv.pkg_id"&_
|
|
|
133 |
" and nvl(dnr.root_pv_id, -1) < 0 " &_
|
|
|
134 |
" order by pkg_name"
|
|
|
135 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
|
|
136 |
'--- Render rows ---
|
|
|
137 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
138 |
Dim rowClass
|
|
|
139 |
Dim rowData
|
|
|
140 |
'
|
|
|
141 |
' Manually excluded packages have no root_cause or root_file or root_pv_id
|
|
|
142 |
'
|
|
|
143 |
' root_file, if supplied, indicates a build failure log file exists
|
|
|
144 |
' this should always prevail over the textual root_cause
|
|
|
145 |
'
|
|
|
146 |
If (IsNull(rsQry("root_file")) AND IsNull(rsQry("root_cause"))) Then
|
|
|
147 |
rowData = "Manually Excluded"
|
|
|
148 |
rowClass = "manualCause"
|
|
|
149 |
|
|
|
150 |
ElseIf IsNull(rsQry("root_file")) Then
|
|
|
151 |
rowData = rsQry("root_cause")
|
|
|
152 |
If InStr(rowData, "no build env") Then
|
|
|
153 |
rowClass = "rootNoEnv"
|
|
|
154 |
Else
|
|
|
155 |
rowClass = "rootCause"
|
|
|
156 |
End If
|
|
|
157 |
|
|
|
158 |
Else
|
|
|
159 |
rowClass = "rootFile"
|
|
|
160 |
rowData = "<a class=""txt_linked"" title=""" & rsQry("root_file") &_
|
|
|
161 |
" Log file may have expired."" " &_
|
|
|
162 |
"href=""" & shref_base & rsQry("root_file") & """>" &_
|
|
|
163 |
"Build Failure Log File</a>"
|
|
|
164 |
End If
|
|
|
165 |
|
|
|
166 |
Dim checkBoxData, checkBoxClass
|
|
|
167 |
If NiceInt(rsQry("root_pv_id"), -1) = -1 Then
|
|
|
168 |
checkBoxData = ""
|
|
|
169 |
checkBoxClass = "directInclude"
|
|
|
170 |
Else
|
|
|
171 |
checkBoxData = "disabled"
|
|
|
172 |
checkBoxClass = ""
|
|
|
173 |
End If
|
|
|
174 |
|
|
|
175 |
%>
|
|
|
176 |
<tr class="<%=rowClass%>">
|
| 6784 |
dpurdie |
177 |
<td colspan="5" class=body_line></td>
|
| 6546 |
dpurdie |
178 |
</tr>
|
|
|
179 |
<tr class="<%=rowClass%>">
|
|
|
180 |
<td nowrap width="1%">
|
|
|
181 |
<a name="PkgName_<%=rsQry("pkg_name")%>">
|
|
|
182 |
<input class="<%=checkBoxClass%>" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" <%=checkBoxData%>>
|
|
|
183 |
</a>
|
|
|
184 |
</td>
|
|
|
185 |
<td nowrap class="body_rowg"><a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry("pv_id")%>&rtag_id=<%=rsQry("rtag_id")%>" title="<%=rsQry("pv_description")%>"><%=rsQry("pkg_name")%></a></td>
|
|
|
186 |
<td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
|
|
|
187 |
<td nowrap class="body_rowg"><%=rowData%></td>
|
|
|
188 |
</tr>
|
|
|
189 |
<%
|
|
|
190 |
rsQry.MoveNext
|
|
|
191 |
Loop
|
|
|
192 |
|
|
|
193 |
query_string = " select pv.pv_id, pkg.pkg_name, pv.pkg_version, qkg.pkg_name, dnr.rtag_id, pv.pv_description"&_
|
|
|
194 |
" from do_not_ripple dnr, package_versions pv, package_versions qv, packages pkg, packages qkg"&_
|
|
|
195 |
" where dnr.rtag_id = "& parRtagId &_
|
|
|
196 |
" and pv.pv_id = dnr.pv_id"&_
|
|
|
197 |
" and pkg.pkg_id = pv.pkg_id"&_
|
|
|
198 |
" and qv.pv_id = dnr.root_pv_id"&_
|
|
|
199 |
" and qkg.pkg_id = qv.pkg_id"&_
|
|
|
200 |
" and nvl(dnr.root_pv_id, -1) > 0"&_
|
|
|
201 |
" order by pkg.pkg_name"
|
|
|
202 |
Dim rsQry2
|
|
|
203 |
Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
|
|
204 |
' -- DISPLAY INDIRECTLY EXCLUDED PACKAGES
|
|
|
205 |
'--- Render rows ---
|
|
|
206 |
If rsQry2.recordCount > 0 Then
|
|
|
207 |
%>
|
|
|
208 |
<tr>
|
| 6784 |
dpurdie |
209 |
<td class="body_lcol err_alert"><b>Indirectly</b></td>
|
|
|
210 |
<td valign="top" nowrap class="body_lcol">Package</td>
|
|
|
211 |
<td valign="top" nowrap class="body_lcol">Version</td>
|
|
|
212 |
<td valign="top" nowrap class="body_lcol">Root Cause Package</td>
|
| 6546 |
dpurdie |
213 |
</tr>
|
|
|
214 |
<%
|
|
|
215 |
End If
|
|
|
216 |
Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
|
|
|
217 |
<tr class="rootIndirect">
|
| 6784 |
dpurdie |
218 |
<td colspan="5" class=body_line></td>
|
| 6546 |
dpurdie |
219 |
</tr>
|
|
|
220 |
<tr class="rootIndirect">
|
|
|
221 |
|
|
|
222 |
<td nowrap><input type="checkbox" value=0 disabled=true name="notused"></td>
|
|
|
223 |
<td nowrap class="body_rowg"><a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry2(0)%>&rtag_id=<%=rsQry2(4)%>" title="<%=rsQry2(5)%>"><%=rsQry2(1)%></a></td>
|
|
|
224 |
<td nowrap class="body_rowg"><%=rsQry2(2)%></td>
|
|
|
225 |
<td nowrap class="body_rowg"><a href="#PkgName_<%=rsQry2(3)%>" style="text-decoration: none;">» <%=rsQry2(3)%></a></td>
|
|
|
226 |
</tr>
|
|
|
227 |
<%
|
|
|
228 |
rsQry2.MoveNext
|
|
|
229 |
Loop%>
|
|
|
230 |
</table>
|
| 6784 |
dpurdie |
231 |
<table class="full_table form_bg_light">
|
|
|
232 |
<tr>
|
|
|
233 |
<td><input id="toggleDirect"
|
|
|
234 |
<%=Iif(rsQry.RecordCount > 0, "", " disabled ")%>
|
|
|
235 |
type="checkbox" title="Toggle all visible directly excluded packages"></td>
|
|
|
236 |
<td align="right">
|
|
|
237 |
<%
|
|
|
238 |
Response.Write(objFormComponent.SubmitButton ( "Include", "name='IncludeSubmit' id='IncludeSubmit' class='form_btn' disabled style='color:silver' onClick=""return vixConfirm('Are you sure you want to include these packages for building?',{title:'Include Packages', post : 'FormName'})""" ))
|
|
|
239 |
Response.Write(objPMod.ComposeHiddenTags())
|
|
|
240 |
%>
|
|
|
241 |
</td>
|
|
|
242 |
</tr>
|
|
|
243 |
</table>
|
|
|
244 |
</div>
|
| 6546 |
dpurdie |
245 |
</td>
|
|
|
246 |
</tr>
|
|
|
247 |
</table>
|
|
|
248 |
</td>
|
|
|
249 |
</tr>
|
|
|
250 |
</table>
|
|
|
251 |
<!-- ACTION BUTTONS ---------------------------------------------->
|
|
|
252 |
<input type="hidden" name="action" value="include">
|
|
|
253 |
<!-- ACTION BUTTONS END ------------------------------------------>
|
|
|
254 |
<%Call objFormComponent.FormEnd()%>
|
|
|
255 |
<!-- FORM END ----------------------------------------------------->
|
|
|
256 |
<%
|
|
|
257 |
rsQry.Close()
|
|
|
258 |
Set rsQry = nothing
|
|
|
259 |
rsQry2.Close()
|
|
|
260 |
Set rsQry2 = nothing
|
|
|
261 |
End Sub
|
|
|
262 |
'-------------------------------------------------
|
|
|
263 |
'
|
|
|
264 |
Sub ShowDaemonStatus
|
| 5357 |
dpurdie |
265 |
%>
|
| 6546 |
dpurdie |
266 |
<table class="embedded_table" style="margin-bottom:20px">
|
| 6784 |
dpurdie |
267 |
<tr>
|
|
|
268 |
<td>
|
|
|
269 |
<table class="rounded_box embedded_table">
|
|
|
270 |
<caption>
|
|
|
271 |
<table align="center" class="full_table">
|
|
|
272 |
<tr>
|
|
|
273 |
<td nowrap class="form_ttl"><p>DAEMON STATUS INFORMATION</p>
|
|
|
274 |
</td>
|
|
|
275 |
<td valign="bottom" class="body_rowg">
|
|
|
276 |
Last Build: <%=GetLastBuildAge(parRtagId)%> [<%=GetModifiedSeqNo(parRtagId)%>]
|
|
|
277 |
</td>
|
|
|
278 |
<td align="right" valign="bottom">
|
|
|
279 |
<a class="txt_linked" href="<%=scriptName%>?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a>
|
|
|
280 |
</td>
|
|
|
281 |
</tr>
|
|
|
282 |
</table>
|
|
|
283 |
</caption>
|
|
|
284 |
<tr>
|
|
|
285 |
<td>
|
|
|
286 |
<div class='round_box_pad'>
|
|
|
287 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
288 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
289 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
290 |
<br>
|
|
|
291 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
292 |
<%
|
|
|
293 |
Dim bInactiveMachine : bInactiveMachine = false
|
|
|
294 |
Dim indefinitelyPaused : indefinitelyPaused = Indefinitely_Paused()
|
|
|
295 |
' Insert a warning into the page if the build daemons are indefintely paused.
|
|
|
296 |
If indefinitelyPaused Then %>
|
|
|
297 |
<tr>
|
|
|
298 |
<span class='err_alert'>
|
|
|
299 |
<font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
|
|
|
300 |
</span>
|
|
|
301 |
</tr>
|
|
|
302 |
<%End If
|
|
|
303 |
%>
|
|
|
304 |
<td width="9%" valign="top"></td>
|
|
|
305 |
<tr>
|
|
|
306 |
<td valign="top" nowrap class="body_lcol">Daemon Host</td>
|
|
|
307 |
<td valign="top" nowrap class="body_lcol">Machine Type</td>
|
|
|
308 |
<td valign="top" nowrap class="body_lcol">Mode</td>
|
|
|
309 |
<td valign="top" nowrap class="body_lcol">Run Level</td>
|
|
|
310 |
<td valign="top" nowrap class="body_lcol">Current Package</td>
|
|
|
311 |
<td valign="top" nowrap class="body_lcol">Est Duration<%=Quick_Help("h_buildtime")%></td>
|
|
|
312 |
<td valign="top" nowrap class="body_lcol">Last Change<%=Quick_Help("h_lastchange")%></td>
|
|
|
313 |
<td valign="top" nowrap class="body_lcol">Control State</td>
|
|
|
314 |
</tr>
|
|
|
315 |
<%
|
|
|
316 |
' Get Build Information for this Release
|
|
|
317 |
query_string = _
|
|
|
318 |
"SELECT rc.rcon_id, display_name, gbe_value, daemon_mode, NVL(ACTIVE, 'U') AS ACTIVE," &_
|
|
|
319 |
" rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) AS delta," &_
|
|
|
320 |
" pk.pkg_name, rl.current_pv_id, pv.build_time, TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) AS build_delta" &_
|
|
|
321 |
" FROM release_config rc," &_
|
|
|
322 |
" gbe_machtype gm," &_
|
|
|
323 |
" build_machine_config bm," &_
|
|
|
324 |
" run_level rl," &_
|
|
|
325 |
" packages pk," &_
|
|
|
326 |
" package_versions pv" &_
|
|
|
327 |
" WHERE rc.rtag_id = " & parRtagId &_
|
|
|
328 |
" AND gm.gbe_id = rc.gbe_id" &_
|
| 6873 |
dpurdie |
329 |
" AND rl.rcon_id(+) = rc.rcon_id" &_
|
| 6784 |
dpurdie |
330 |
" AND rc.bmcon_id =bm.bmcon_id(+)" &_
|
|
|
331 |
" AND pk.pkg_id(+) = rl.current_pkg_id_being_built" &_
|
|
|
332 |
" AND rl.current_pv_id = pv.pv_id(+)" &_
|
|
|
333 |
" ORDER BY bm.display_name, rc.rcon_id"
|
| 6546 |
dpurdie |
334 |
|
| 6784 |
dpurdie |
335 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
| 6546 |
dpurdie |
336 |
|
| 6784 |
dpurdie |
337 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
338 |
Dim pkgName
|
|
|
339 |
Dim pkgPvid
|
|
|
340 |
Dim pkgBuildTime
|
|
|
341 |
Dim currentRunLevel
|
|
|
342 |
Dim daemonState
|
|
|
343 |
Dim delta
|
|
|
344 |
Dim PkgBuildDelta
|
|
|
345 |
Dim pkgId
|
|
|
346 |
Dim bActive
|
|
|
347 |
Dim estDuration
|
|
|
348 |
Dim daemonMode
|
|
|
349 |
Dim lastChange
|
| 6546 |
dpurdie |
350 |
|
| 6784 |
dpurdie |
351 |
rcon_id = rsQry("rcon_id")
|
|
|
352 |
' = rsQry("display_name")
|
|
|
353 |
' = rsQry("gbe_value")
|
|
|
354 |
daemonMode = rsQry("daemon_mode")
|
|
|
355 |
bActive = rsQry("ACTIVE")
|
|
|
356 |
daemonState = rsQry("pause")
|
|
|
357 |
currentRunLevel = rsQry("current_run_level")
|
|
|
358 |
pkgId = rsQry("current_pkg_id_being_built")
|
|
|
359 |
delta = rsQry("delta")
|
|
|
360 |
pkgName = rsQry("pkg_name")
|
|
|
361 |
pkgPvid = rsQry("current_pv_id")
|
|
|
362 |
pkgBuildTime = rsQry("build_time")
|
|
|
363 |
PkgBuildDelta = rsQry("build_delta")
|
|
|
364 |
lastChange = NULL
|
|
|
365 |
bInactiveMachine = FALSE
|
|
|
366 |
estDuration = NULL
|
| 6546 |
dpurdie |
367 |
|
| 6784 |
dpurdie |
368 |
If bActive = "N" Then bInactiveMachine = true
|
|
|
369 |
If IsNull(daemonState) Then daemonState = 0
|
|
|
370 |
If daemonState = "2" Then pkgId = Null
|
|
|
371 |
If IsNull(currentRunLevel) Then currentRunLevel = -1
|
|
|
372 |
If daemonMode = "M" AND not IsNull(pkgName) Then estDuration = pkgBuildTime & "[" & PkgBuildDelta & "]"
|
|
|
373 |
If bActive <> "U" Then lastChange = PrettyDelta(delta, daemonState,pkgName )
|
| 6546 |
dpurdie |
374 |
|
| 6784 |
dpurdie |
375 |
' --- Now render HTML for this release configuration ---
|
|
|
376 |
%>
|
|
|
377 |
<tr>
|
|
|
378 |
<td colspan="8" class=body_line></td>
|
|
|
379 |
</tr>
|
|
|
380 |
<tr>
|
|
|
381 |
<td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
|
|
|
382 |
<td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
|
|
|
383 |
<td nowrap class="body_rowg"><%=Get_Daemon_Mode(daemonMode)%></td>
|
|
|
384 |
<td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
|
|
|
385 |
<td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, daemonState, bActive)%></td>
|
|
|
386 |
<td nowrap class="body_rowg"><%=estDuration%></td>
|
|
|
387 |
<td nowrap class="body_rowg"><%=lastChange%></td>
|
|
|
388 |
<td nowrap class="body_rowg">
|
|
|
389 |
<%
|
|
|
390 |
If NOT indefinitelyPaused Then
|
| 6786 |
dpurdie |
391 |
If bActive = "U" Then
|
|
|
392 |
ElseIf bActive = "N" Then
|
|
|
393 |
Call Action_Buttons ( "Daemon Unavailable" )
|
|
|
394 |
ElseIf daemonState = 0 Then
|
|
|
395 |
Call Action_Buttons_State ( "Daemon Pause", canControl )
|
|
|
396 |
ElseIf daemonState = 1 Then
|
|
|
397 |
Call Action_Buttons_State ( "Daemon Resume", canControl )
|
|
|
398 |
ElseIf daemonState = 2 Then
|
|
|
399 |
Call Action_Buttons_State ( "Daemon Start", canControl )
|
|
|
400 |
Else
|
|
|
401 |
Call Action_Buttons_State ( "Daemon Resume", canControl )
|
|
|
402 |
End If
|
| 6784 |
dpurdie |
403 |
Else
|
|
|
404 |
%>Unavailable<%
|
|
|
405 |
End If
|
|
|
406 |
%>
|
|
|
407 |
</td>
|
|
|
408 |
</tr>
|
|
|
409 |
<%
|
|
|
410 |
rsQry.MoveNext
|
|
|
411 |
Loop
|
|
|
412 |
%>
|
|
|
413 |
<tr class=form_bg_light>
|
|
|
414 |
<td nowrap class="body_col" colspan=7>
|
|
|
415 |
<%If CheckConfigErrors(parRtagId) OR bInactiveMachine Then%><span class="err_alert"> Daemon configuration errors detected</span>
|
|
|
416 |
<a class="txt_linked" href="release_config.asp?rtag_id=<%=parRtagId%>">
|
|
|
417 |
<img src="images/i_link.gif" hspace="2" border="0" align="absmiddle" title="Goto Configuration">
|
|
|
418 |
</a>
|
|
|
419 |
<%End If%>
|
|
|
420 |
</td>
|
|
|
421 |
<td valign="bottom" nowrap class="body_col">
|
|
|
422 |
<%
|
|
|
423 |
If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
|
| 6786 |
dpurdie |
424 |
Call Action_Buttons_State ( "Daemon Control All", objAccessControl.UserLogedIn AND canControl )
|
| 6784 |
dpurdie |
425 |
Else
|
|
|
426 |
%> <%
|
|
|
427 |
End If
|
|
|
428 |
%>
|
|
|
429 |
</td>
|
|
|
430 |
</tr>
|
|
|
431 |
<%
|
|
|
432 |
rsQry.Close()
|
|
|
433 |
Set rsQry = nothing
|
|
|
434 |
%>
|
|
|
435 |
</table>
|
|
|
436 |
</div>
|
|
|
437 |
</td>
|
|
|
438 |
</tr>
|
| 6546 |
dpurdie |
439 |
</table>
|
| 6784 |
dpurdie |
440 |
</td>
|
| 6546 |
dpurdie |
441 |
</table>
|
|
|
442 |
<%
|
|
|
443 |
End Sub
|
|
|
444 |
'-------------------------------------------------
|
|
|
445 |
'
|
|
|
446 |
Sub ShowDaemonInstructions
|
|
|
447 |
%>
|
|
|
448 |
<!-- Daemon Instructions Display -->
|
|
|
449 |
<table class="embedded_table" style="margin-bottom:10px">
|
| 6784 |
dpurdie |
450 |
<tr>
|
|
|
451 |
<td>
|
|
|
452 |
<table class="rounded_box embedded_table">
|
| 6873 |
dpurdie |
453 |
<caption nowrap>DAEMON INSTRUCTIONS FOR THIS RELEASE</caption>
|
| 6784 |
dpurdie |
454 |
<tr>
|
|
|
455 |
<td>
|
|
|
456 |
<div class='round_box_pad'>
|
|
|
457 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
458 |
<tr>
|
|
|
459 |
<td align="left" nowrap class="body_lcol">Operation</td>
|
|
|
460 |
<td align="left" nowrap class="body_lcol">Package</td>
|
|
|
461 |
<td align="left" nowrap class="body_lcol">Version</td>
|
|
|
462 |
<td align="left" nowrap class="body_lcol">Scheduled Time<%=Quick_Help("SchedTime")%>
|
|
|
463 |
<td align="left" nowrap class="body_lcol">Repeat</td>
|
|
|
464 |
<td align="left" nowrap class="body_lcol">In Progress</td>
|
|
|
465 |
</tr>
|
|
|
466 |
<%
|
|
|
467 |
Dim PkgVersion
|
|
|
468 |
Dim UserName
|
|
|
469 |
Dim UserEmail
|
|
|
470 |
Dim bInProgress
|
|
|
471 |
Dim bIsOverdue
|
|
|
472 |
Dim bIsReady
|
| 6546 |
dpurdie |
473 |
|
| 6784 |
dpurdie |
474 |
Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
|
|
|
475 |
" OP_CODE,"&_
|
|
|
476 |
" RTAG_ID,"&_
|
|
|
477 |
" PV_ID,"&_
|
|
|
478 |
" SCHEDULED_DATETIME,"&_
|
|
|
479 |
" REPEAT_SECS,"&_
|
|
|
480 |
" ADDED_DATETIME,"&_
|
|
|
481 |
" USER_ID,"&_
|
|
|
482 |
" IN_PROGRESS,"&_
|
|
|
483 |
" (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
|
|
|
484 |
" (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
|
|
|
485 |
" FROM DAEMON_INSTRUCTIONS "&_
|
|
|
486 |
" WHERE RTAG_ID = "& parRtagId &_
|
|
|
487 |
" ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
|
|
|
488 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| 6546 |
dpurdie |
489 |
|
| 6784 |
dpurdie |
490 |
If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
|
|
|
491 |
bInProgress = False
|
|
|
492 |
Else
|
|
|
493 |
bInProgress = True
|
|
|
494 |
End If
|
| 6546 |
dpurdie |
495 |
|
| 6784 |
dpurdie |
496 |
' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
|
|
|
497 |
If rsQry("OVERDUE") AND NOT bInProgress Then
|
|
|
498 |
bIsOverdue = True
|
|
|
499 |
Else
|
|
|
500 |
bIsOverdue = False
|
|
|
501 |
End If
|
| 6546 |
dpurdie |
502 |
|
| 6784 |
dpurdie |
503 |
If rsQry("READY") Then
|
|
|
504 |
bIsReady = True
|
|
|
505 |
Else
|
|
|
506 |
bIsReady = False
|
|
|
507 |
End If
|
| 6546 |
dpurdie |
508 |
|
| 6784 |
dpurdie |
509 |
' Get as much info about the package as we can
|
|
|
510 |
Dim PkgId: PkgId = 0
|
|
|
511 |
Dim PkgName : PkgName = "N/A"
|
|
|
512 |
If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
|
|
|
513 |
Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
|
|
|
514 |
End If
|
|
|
515 |
%>
|
|
|
516 |
<tr>
|
|
|
517 |
<td colspan="6" class=body_line></td>
|
|
|
518 |
</tr>
|
|
|
519 |
<tr>
|
|
|
520 |
<td align="left" valign="top" class="body_rowg nowrap">
|
|
|
521 |
<%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
|
|
|
522 |
</td>
|
| 6546 |
dpurdie |
523 |
|
| 6784 |
dpurdie |
524 |
<td align="left" valign="top" class="body_rowg">
|
|
|
525 |
<%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
|
|
|
526 |
<a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
|
|
|
527 |
<%Else%>
|
|
|
528 |
<%=PkgName%>
|
|
|
529 |
<%End If%>
|
|
|
530 |
</td>
|
| 6546 |
dpurdie |
531 |
|
| 6784 |
dpurdie |
532 |
<td align="left" valign="top" class="body_rowg">
|
|
|
533 |
<%=PkgVersion%>
|
|
|
534 |
</td>
|
| 6546 |
dpurdie |
535 |
|
| 6784 |
dpurdie |
536 |
<td align="left" valign="top" class="body_rowg" <%If bIsOverdue Then%>style=color:Red<%Elseif bIsReady Then%>style=color:Green<%End If%>><%=DisplayDateTime(rsQry("SCHEDULED_DATETIME"))%></td>
|
| 6546 |
dpurdie |
537 |
|
| 6784 |
dpurdie |
538 |
<td align="left" valign="top" class="body_rowg"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
|
| 6546 |
dpurdie |
539 |
|
| 6784 |
dpurdie |
540 |
<td align="left" valign="top" class="body_rowg">
|
|
|
541 |
<%If bInProgress Then%>
|
|
|
542 |
YES
|
|
|
543 |
<%Else%>
|
|
|
544 |
NO
|
|
|
545 |
<%End If%>
|
|
|
546 |
</td>
|
|
|
547 |
</tr>
|
|
|
548 |
<%
|
|
|
549 |
rsQry.MoveNext()
|
|
|
550 |
Wend
|
|
|
551 |
rsQry.Close()
|
|
|
552 |
Set rsQry = nothing
|
|
|
553 |
%>
|
|
|
554 |
</table>
|
|
|
555 |
</div>
|
|
|
556 |
</td>
|
|
|
557 |
</tr>
|
|
|
558 |
</table>
|
|
|
559 |
</td>
|
|
|
560 |
</tr>
|
| 6546 |
dpurdie |
561 |
</table>
|
|
|
562 |
<%
|
|
|
563 |
End Sub
|
|
|
564 |
%>
|
| 5357 |
dpurdie |
565 |
<html>
|
|
|
566 |
<head>
|
|
|
567 |
<title>Release Manager</title>
|
|
|
568 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
569 |
<meta http-equiv="Pragma" content="no-cache">
|
|
|
570 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
571 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
572 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
573 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
574 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
575 |
<!-- TIPS -->
|
| 6676 |
dpurdie |
576 |
<script type="text/javascript" src="scripts/json2.js?ver=<%=VixVerNum%>"></script>
|
| 6579 |
dpurdie |
577 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
578 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
579 |
<script language="JavaScript" type="text/JavaScript">
|
| 6538 |
dpurdie |
580 |
formTips.tips.h_buildtime = stdTip(300, 'Est. Build Duration', 'Estimated build duration in seconds. Based simply on the last build duration for this package');
|
|
|
581 |
|
| 5623 |
dpurdie |
582 |
formTips.tips.h_lastchange = stdTip(300, 'Last Change', 'This is an indication of the time since the daemon interogated the database.' +
|
|
|
583 |
'<p>Short times will be shown as seconds. Longer times will be shown as a time within ' +
|
|
|
584 |
'the last 24 hours. Longer times will be shown as a date.'
|
|
|
585 |
);
|
| 5357 |
dpurdie |
586 |
</script>
|
| 6544 |
dpurdie |
587 |
<script language="JavaScript" type="text/JavaScript">
|
|
|
588 |
$(document).ready(function() {
|
| 6545 |
dpurdie |
589 |
//
|
|
|
590 |
// Init the check boxes
|
|
|
591 |
InitShow();
|
| 6546 |
dpurdie |
592 |
isChecked('pv_id_list','IncludeSubmit');
|
| 6545 |
dpurdie |
593 |
|
| 6610 |
dpurdie |
594 |
<% If objAccessControl.UserLogedIn Then %>
|
| 6544 |
dpurdie |
595 |
// Attach function to toggle checkbox
|
|
|
596 |
// toggle all visible checkboxes
|
|
|
597 |
$('#toggleDirect').click(function(){
|
|
|
598 |
var state = this.checked;
|
| 6545 |
dpurdie |
599 |
var list = $('.directInclude:visible:enabled');
|
| 6544 |
dpurdie |
600 |
list.prop('checked', state);
|
|
|
601 |
isChecked('pv_id_list','IncludeSubmit');
|
|
|
602 |
});
|
| 6545 |
dpurdie |
603 |
|
|
|
604 |
$('.directInclude').click(function(){
|
|
|
605 |
isChecked('pv_id_list','IncludeSubmit');
|
|
|
606 |
});
|
| 6610 |
dpurdie |
607 |
<%Else%>
|
|
|
608 |
{
|
|
|
609 |
// Not logged in - disable boxes
|
|
|
610 |
var list = $('.directInclude');
|
|
|
611 |
list.prop('disabled', true);
|
|
|
612 |
$('#toggleDirect').prop('disabled', true);
|
|
|
613 |
}
|
|
|
614 |
<%End If%>
|
| 6545 |
dpurdie |
615 |
|
| 6544 |
dpurdie |
616 |
});
|
| 6545 |
dpurdie |
617 |
|
|
|
618 |
function InitShow(e)
|
|
|
619 |
{
|
|
|
620 |
toggleDispClass('rootCause',0);
|
|
|
621 |
toggleDispClass('rootNoEnv',0);
|
|
|
622 |
toggleDispClass('rootFile',0);
|
|
|
623 |
toggleDispClass('rootIndirect',0);
|
|
|
624 |
toggleDispClass('manualCause',0);
|
|
|
625 |
}
|
|
|
626 |
|
|
|
627 |
function toggleDispClass(cname,flip)
|
|
|
628 |
{
|
|
|
629 |
var cookieName = 'RELMGR_BUILDSTATUS';
|
|
|
630 |
var cv = JSON.parse(getCookie(cookieName));
|
|
|
631 |
if (!cv)
|
|
|
632 |
cv = new Object;
|
|
|
633 |
if (!cv.BuildStatus)
|
|
|
634 |
cv.BuildStatus = new Object;
|
|
|
635 |
|
|
|
636 |
var state = cv.BuildStatus[cname];
|
|
|
637 |
if (state === undefined)
|
|
|
638 |
state = true;
|
|
|
639 |
|
|
|
640 |
if (flip>0)
|
|
|
641 |
state = !state;
|
|
|
642 |
|
|
|
643 |
cv.BuildStatus[cname] = state;
|
|
|
644 |
|
|
|
645 |
// Reflect the current state in the checkbox
|
|
|
646 |
var de = document.getElementById(cname);
|
|
|
647 |
if (de)
|
|
|
648 |
de.checked = state;
|
|
|
649 |
|
|
|
650 |
var elements = new Array();
|
|
|
651 |
elements = getElementsByClassName(cname);
|
|
|
652 |
for(i in elements ){
|
|
|
653 |
if (state) {
|
|
|
654 |
elements[i].style.display = "";
|
|
|
655 |
}
|
|
|
656 |
else {
|
|
|
657 |
elements[i].style.display = "none";
|
|
|
658 |
}
|
|
|
659 |
}
|
|
|
660 |
setCookie(cookieName, JSON.stringify(cv), 365 );
|
|
|
661 |
}
|
|
|
662 |
|
| 6544 |
dpurdie |
663 |
</script>
|
| 5357 |
dpurdie |
664 |
<!-- DROPDOWN MENUS -->
|
|
|
665 |
<!--#include file="_menu_def.asp"-->
|
| 6579 |
dpurdie |
666 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
667 |
</head>
|
| 6546 |
dpurdie |
668 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
| 5357 |
dpurdie |
669 |
<!-- HEADER -->
|
|
|
670 |
<!--#include file="_header.asp"-->
|
|
|
671 |
<!-- BODY ---->
|
| 6546 |
dpurdie |
672 |
<table class="full_table">
|
| 5357 |
dpurdie |
673 |
<tr>
|
| 6546 |
dpurdie |
674 |
<td width="146px" class="panel_bg" valign="top">
|
|
|
675 |
<%Call BuildMenuPane%>
|
| 5357 |
dpurdie |
676 |
</td>
|
|
|
677 |
<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
|
| 6546 |
dpurdie |
678 |
<%Call ShowBuildStatus%>
|
|
|
679 |
<%Call ShowDaemonStatus%>
|
|
|
680 |
<%Call ShowDaemonInstructions%>
|
| 5357 |
dpurdie |
681 |
</td>
|
|
|
682 |
</tr>
|
|
|
683 |
<tr>
|
| 6546 |
dpurdie |
684 |
<td class="panel_bg" valign="bottom" align="center" height="350">
|
|
|
685 |
<img src="images/img_gears.png" vspace="20" hspace="30"></td>
|
| 5357 |
dpurdie |
686 |
</tr>
|
|
|
687 |
</table>
|
|
|
688 |
<!-- FOOTER -->
|
|
|
689 |
<!--#include file="_footer.asp"-->
|
|
|
690 |
</body>
|
|
|
691 |
</html>
|
| 6546 |
dpurdie |
692 |
|