| 147 |
ghuddy |
1 |
|
|
|
2 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
3 |
<%
|
|
|
4 |
'=====================================================
|
|
|
5 |
'| |
|
|
|
6 |
'| ADMIN Build Status Information |
|
|
|
7 |
'| |
|
|
|
8 |
'=====================================================
|
|
|
9 |
%>
|
|
|
10 |
<%
|
|
|
11 |
Option explicit
|
|
|
12 |
' Good idea to set when using redirect
|
|
|
13 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
14 |
%>
|
|
|
15 |
<!--#include file="common/conf.asp"-->
|
|
|
16 |
<!--#include file="common/globals.asp"-->
|
|
|
17 |
<!--#include file="common/formating.asp"-->
|
|
|
18 |
<!--#include file="common/qstr.asp"-->
|
|
|
19 |
<!--#include file="common/common_subs.asp"-->
|
|
|
20 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
21 |
<%
|
|
|
22 |
'------------ ACCESS CONTROL ------------------
|
|
|
23 |
%>
|
|
|
24 |
<!--#include file="_access_control_general.asp"-->
|
|
|
25 |
<%
|
|
|
26 |
'------------ Variable Definition -------------
|
|
|
27 |
Dim rsQry
|
|
|
28 |
Dim query_string
|
|
|
29 |
Dim styleAlt1
|
|
|
30 |
Dim styleAlt2
|
|
|
31 |
Dim styleNow
|
|
|
32 |
Dim param_refreshPeriod
|
|
|
33 |
Dim param_refreshEnabled
|
|
|
34 |
Dim bIndefinitelyPaused
|
|
|
35 |
'------------ Constants Declaration -----------
|
|
|
36 |
Const Min_Refresh_Time = 10
|
| 4202 |
dpurdie |
37 |
Const Max_Delta = 600
|
| 147 |
ghuddy |
38 |
'------------ Variable Init -------------------
|
|
|
39 |
|
|
|
40 |
styleAlt1="class='body_rowg1'"
|
|
|
41 |
styleAlt2="class='body_rowg2'"
|
|
|
42 |
styleNow = styleAlt1
|
|
|
43 |
|
|
|
44 |
'----------------------------------------------
|
|
|
45 |
%>
|
|
|
46 |
<%
|
|
|
47 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
48 |
|
|
|
49 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
50 |
' Toggle row style between the two alternative styles
|
|
|
51 |
Sub ToggleStyleNow
|
|
|
52 |
If styleNow = styleAlt1 Then
|
|
|
53 |
styleNow = styleAlt2
|
|
|
54 |
Else
|
|
|
55 |
styleNow = styleAlt1
|
|
|
56 |
End If
|
|
|
57 |
End Sub
|
|
|
58 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
59 |
' Convert run level into a meaningful string
|
| 173 |
brianf |
60 |
Function Get_Run_Level( nLevel, indefinitePause, astate)
|
| 147 |
ghuddy |
61 |
|
|
|
62 |
If indefinitePause Then
|
|
|
63 |
Get_Run_Level = "<span class='err_alert'>Stopped</span>"
|
| 173 |
brianf |
64 |
ElseIf astate = 1 Then ' if build daemon paused
|
|
|
65 |
Get_Run_Level = "Paused"
|
|
|
66 |
ElseIf astate = 2 Then ' if build daemon disabled
|
|
|
67 |
Get_Run_Level = "Disabled"
|
| 1326 |
dpurdie |
68 |
ElseIf astate = 0 Then ' if build daemon enabled
|
| 147 |
ghuddy |
69 |
If nLevel = 1 Then
|
|
|
70 |
Get_Run_Level = "Cannot Continue"
|
|
|
71 |
ElseIf nLevel = 2 Then
|
|
|
72 |
Get_Run_Level = "Paused"
|
|
|
73 |
ElseIf nLevel = 3 Then
|
| 1326 |
dpurdie |
74 |
Get_Run_Level = "Building"
|
| 147 |
ghuddy |
75 |
ElseIf nLevel = 4 Then
|
|
|
76 |
Get_Run_Level = "Idle"
|
|
|
77 |
ElseIf nLevel = 5 Then
|
|
|
78 |
Get_Run_Level = "Waiting"
|
|
|
79 |
ElseIf nLevel = 6 Then
|
|
|
80 |
Get_Run_Level = "Publishing"
|
|
|
81 |
Else
|
|
|
82 |
Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
|
|
|
83 |
End If
|
|
|
84 |
End If
|
|
|
85 |
End Function
|
| 4200 |
dpurdie |
86 |
|
| 147 |
ghuddy |
87 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 4200 |
dpurdie |
88 |
' Convert run level into a meaningful filter state as a string
|
|
|
89 |
' Will be one of: active, idle, paused, disabled, problem, unknown
|
| 4202 |
dpurdie |
90 |
Function Classify_Run_Level( nLevel, indefinitePause, astate, nDelta, pkgId)
|
| 4200 |
dpurdie |
91 |
|
|
|
92 |
If indefinitePause Then
|
|
|
93 |
Classify_Run_Level = "problem"
|
|
|
94 |
ElseIf astate = 1 Then ' if build daemon paused
|
|
|
95 |
Classify_Run_Level = "paused"
|
|
|
96 |
ElseIf astate = 2 Then ' if build daemon disabled
|
|
|
97 |
Classify_Run_Level = "disabled"
|
| 4202 |
dpurdie |
98 |
ElseIf Int(nDelta) > Max_Delta Then
|
| 4200 |
dpurdie |
99 |
Classify_Run_Level = "problem"
|
| 4202 |
dpurdie |
100 |
ElseIf (IsNull(pkgId)) OR (pkgId = "") Then
|
|
|
101 |
Classify_Run_Level = "idle"
|
| 4200 |
dpurdie |
102 |
ElseIf astate = 0 Then ' if build daemon enabled
|
|
|
103 |
If nLevel = 1 Then
|
|
|
104 |
Classify_Run_Level = "problem"
|
|
|
105 |
ElseIf nLevel = 2 Then
|
|
|
106 |
Classify_Run_Level = "paused"
|
|
|
107 |
ElseIf nLevel = 3 Then
|
|
|
108 |
Classify_Run_Level = "active"
|
|
|
109 |
ElseIf nLevel = 4 Then
|
|
|
110 |
Classify_Run_Level = "idle"
|
|
|
111 |
ElseIf nLevel = 5 Then
|
|
|
112 |
Classify_Run_Level = "idle"
|
|
|
113 |
ElseIf nLevel = 6 Then
|
|
|
114 |
Classify_Run_Level = "active"
|
|
|
115 |
Else
|
|
|
116 |
Classify_Run_Level = "unknown"
|
|
|
117 |
End If
|
|
|
118 |
End If
|
|
|
119 |
End Function
|
|
|
120 |
|
|
|
121 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 147 |
ghuddy |
122 |
' Convert daemon mode into a meaningful string
|
|
|
123 |
Function Get_Daemon_Mode( nMode )
|
|
|
124 |
If nMode = "M" Then
|
|
|
125 |
Get_Daemon_Mode = "Master"
|
|
|
126 |
ElseIf nMode = "S" Then
|
|
|
127 |
Get_Daemon_Mode = "Slave"
|
|
|
128 |
Else
|
|
|
129 |
Get_Daemon_Mode = "?"
|
|
|
130 |
End If
|
|
|
131 |
End Function
|
|
|
132 |
|
|
|
133 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
134 |
' Return HTML for a seperator line between rows in the table
|
|
|
135 |
Function HTML_Row_Divider( projectChanged, projectChecked, releaseChanged, last_row_displayed )
|
|
|
136 |
Dim s
|
|
|
137 |
s = ""
|
|
|
138 |
If projectChanged Then
|
|
|
139 |
s = s + "<tr>"
|
|
|
140 |
s = s + " <td colspan='8'><img src='images/spacer.gif' width='1' height='5'></td>"
|
|
|
141 |
s = s + "</tr>"
|
|
|
142 |
s = s + "<tr>"
|
|
|
143 |
s = s + " <td colspan='8' background='images/bg_rep_line.gif'><img src='images/spacer.gif' width='1' height='5'></td>"
|
|
|
144 |
s = s + "</tr>"
|
|
|
145 |
Else
|
|
|
146 |
if projectChecked = "checked" AND last_row_displayed = True Then
|
|
|
147 |
s = s + "<tr>"
|
|
|
148 |
If releaseChanged Then
|
|
|
149 |
s = s + "<td></td>"
|
|
|
150 |
s = s + "<td colspan='7' background='images/bg_rep_line.gif'><img src='images/spacer.gif' width='1' height='1'></td>"
|
|
|
151 |
Else
|
|
|
152 |
s = s + "<td></td>"
|
|
|
153 |
s = s + "<td colspan='7' background='images/bg_rep_line.gif'><img src='images/spacer.gif' width='1' height='1'></td>"
|
|
|
154 |
End If
|
|
|
155 |
s = s + "</tr>"
|
|
|
156 |
End If
|
|
|
157 |
End If
|
|
|
158 |
HTML_Row_Divider = s
|
|
|
159 |
End Function
|
|
|
160 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
161 |
' Use this function to determine the state of a specified project checkbox
|
|
|
162 |
Function Is_Project_Checked( nProjId )
|
|
|
163 |
Dim hiddenProjects_arr
|
|
|
164 |
Dim hiddenProjects
|
|
|
165 |
Dim str
|
|
|
166 |
|
|
|
167 |
hiddenProjects = Request("HideProj")
|
|
|
168 |
Is_Project_Checked = "checked"
|
|
|
169 |
|
|
|
170 |
hiddenProjects_arr = Split(hiddenProjects, ",")
|
|
|
171 |
For Each str in hiddenProjects_arr
|
|
|
172 |
If str = nProjId Then
|
|
|
173 |
Is_Project_Checked = ""
|
|
|
174 |
Exit For
|
|
|
175 |
End If
|
|
|
176 |
Next
|
|
|
177 |
End Function
|
|
|
178 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
179 |
' Use this function to set/clear the filter on/off radio button checked state
|
| 4200 |
dpurdie |
180 |
' Format of Filter Param : Filter=[problemBuilds}[,ActiveBuilds]
|
| 147 |
ghuddy |
181 |
Function Display_Filtered(id)
|
|
|
182 |
Dim filter
|
|
|
183 |
|
|
|
184 |
Display_Filtered = ""
|
|
|
185 |
|
|
|
186 |
filter = Request("Filter")
|
|
|
187 |
If NOT IsNull(filter) AND filter <> "" Then
|
|
|
188 |
If InStr(filter, id) > 0 Then
|
|
|
189 |
Display_Filtered = "checked"
|
|
|
190 |
End If
|
|
|
191 |
Else
|
|
|
192 |
If id = "OFF" Then
|
|
|
193 |
Display_Filtered = "checked"
|
|
|
194 |
End If
|
|
|
195 |
End If
|
|
|
196 |
End Function
|
|
|
197 |
|
|
|
198 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
199 |
' Use this function to set/clear a filter option check box with the given ID
|
| 4200 |
dpurdie |
200 |
' If no Filter is present, then assume defaults
|
| 147 |
ghuddy |
201 |
Function Filter_Checked(id)
|
|
|
202 |
Dim filter
|
|
|
203 |
|
|
|
204 |
Filter_Checked = ""
|
|
|
205 |
|
|
|
206 |
filter = Request("Filter")
|
| 4200 |
dpurdie |
207 |
If IsNull(filter) OR filter = "" Then
|
|
|
208 |
filter="problemBuilds,activeBuilds" ' Defaults
|
| 147 |
ghuddy |
209 |
End If
|
| 4200 |
dpurdie |
210 |
If InStr(filter, id) > 0 Then
|
|
|
211 |
Filter_Checked = "checked"
|
|
|
212 |
End If
|
| 147 |
ghuddy |
213 |
End Function
|
|
|
214 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
215 |
' Test to see if a particular filter option is on
|
|
|
216 |
Function Filter_Is_On(id)
|
| 4200 |
dpurdie |
217 |
If Filter_Checked(id) = "checked" Then
|
|
|
218 |
Filter_Is_On = True
|
|
|
219 |
Else
|
|
|
220 |
Filter_Is_On = False
|
|
|
221 |
End If
|
| 147 |
ghuddy |
222 |
End Function
|
|
|
223 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
224 |
' Get name of package given its ID. Return empty string if not able to do so.
|
|
|
225 |
Function Get_Pkg_Name( nPkgId )
|
|
|
226 |
Dim rsQry2
|
|
|
227 |
Dim query_string2
|
|
|
228 |
|
|
|
229 |
Get_Pkg_Name = ""
|
|
|
230 |
If (NOT IsNull(nPkgId)) AND (nPkgId <> "") Then
|
|
|
231 |
|
|
|
232 |
query_string2 = "SELECT pkg.PKG_NAME " &_
|
|
|
233 |
" FROM PACKAGES pkg" &_
|
|
|
234 |
" WHERE pkg.PKG_ID = " & nPkgId
|
|
|
235 |
|
|
|
236 |
Set rsQry2 = OraDatabase.DbCreateDynaset( query_string2, ORADYN_DEFAULT )
|
|
|
237 |
If rsQry2.RecordCount > 0 Then
|
|
|
238 |
Get_Pkg_Name = rsQry2("pkg_name")
|
|
|
239 |
End If
|
|
|
240 |
rsQry2.Close()
|
|
|
241 |
Set rsQry2 = nothing
|
|
|
242 |
End If
|
|
|
243 |
End Function
|
|
|
244 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
245 |
Function Indefinitely_Paused()
|
|
|
246 |
Dim rsQry2
|
|
|
247 |
Dim query_string2
|
|
|
248 |
|
|
|
249 |
Indefinitely_Paused = False
|
|
|
250 |
|
|
|
251 |
query_string2 = " select * from run_level_schedule rls where rls.indefinite_pause = 'P'"
|
|
|
252 |
|
|
|
253 |
Set rsQry2 = OraDatabase.DbCreateDynaset( query_string2, ORADYN_DEFAULT )
|
|
|
254 |
If rsQry2.RecordCount > 0 Then
|
|
|
255 |
Indefinitely_Paused = True
|
|
|
256 |
End If
|
|
|
257 |
End Function
|
|
|
258 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 4028 |
dpurdie |
259 |
Function PrettyDelta( delta, daemonState,pkgId )
|
| 4202 |
dpurdie |
260 |
Dim style,nDelta
|
| 4028 |
dpurdie |
261 |
style = ""
|
| 147 |
ghuddy |
262 |
|
| 4202 |
dpurdie |
263 |
If delta = "" Then delta = 0
|
|
|
264 |
delta = Int(delta)
|
|
|
265 |
nDelta = delta
|
|
|
266 |
|
|
|
267 |
If (delta > Max_Delta) AND (IsNull(pkgId) OR pkgId = "") Then
|
| 4028 |
dpurdie |
268 |
style = "style=color:Red"
|
|
|
269 |
If (delta > 86400 ) Then
|
|
|
270 |
Dim bdate, dd,mm,yy
|
|
|
271 |
bdate = DateAdd("s", - delta,Now())
|
|
|
272 |
dd = Day(bdate)
|
|
|
273 |
mm = MonthName(Month(bdate),1)
|
|
|
274 |
yy = Year( bdate)
|
|
|
275 |
delta = dd & "-" & mm & "-" & yy
|
|
|
276 |
If ( daemonState >= 2 ) Then
|
|
|
277 |
style = ""
|
|
|
278 |
End If
|
|
|
279 |
ElseIf ( delta > 60*60 ) Then
|
|
|
280 |
'Dim bdate, hh, mins, ss
|
|
|
281 |
bdate = DateAdd("s", - delta,Now())
|
|
|
282 |
delta = TimeValue( bdate)
|
|
|
283 |
'delta = hh & ":" & mins & ":" & ss
|
|
|
284 |
End If
|
|
|
285 |
End If
|
|
|
286 |
|
|
|
287 |
If style <> "" Then
|
|
|
288 |
delta = "<span " & style & ">" & delta & "</span>"
|
|
|
289 |
End If
|
| 4202 |
dpurdie |
290 |
PrettyDelta = delta
|
| 4028 |
dpurdie |
291 |
End Function
|
|
|
292 |
|
|
|
293 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
294 |
|
| 147 |
ghuddy |
295 |
%>
|
|
|
296 |
<%
|
|
|
297 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
298 |
|
|
|
299 |
' Default values for Auto Refresh checkbox and edit input box
|
|
|
300 |
param_refreshEnabled = False
|
|
|
301 |
param_refreshPeriod = "0"
|
|
|
302 |
|
|
|
303 |
' Read the Refresh parameter which is of the form Refresh=<time-period>,ON|OFF
|
|
|
304 |
Dim param_refresh
|
|
|
305 |
param_refresh = Request("Refresh")
|
|
|
306 |
If param_refresh <> "" Then
|
|
|
307 |
Dim pr_arr
|
|
|
308 |
pr_arr = Split(param_refresh,",")
|
|
|
309 |
param_refreshPeriod = pr_arr(0)
|
|
|
310 |
|
|
|
311 |
' Range check and end-stop the refresh period if necessary
|
|
|
312 |
If CInt(param_refreshPeriod) < Min_Refresh_Time Then
|
|
|
313 |
param_refreshPeriod = CStr(Min_Refresh_Time)
|
|
|
314 |
End If
|
|
|
315 |
|
|
|
316 |
' determine checkbox state
|
|
|
317 |
If UBound(pr_arr) >= 1 Then
|
|
|
318 |
If InStr(UCase(pr_arr(1)), "ON") > 0 Then
|
|
|
319 |
param_refreshEnabled = True
|
|
|
320 |
Else
|
|
|
321 |
param_refreshEnabled = False
|
|
|
322 |
End If
|
|
|
323 |
End If
|
|
|
324 |
End If
|
|
|
325 |
|
|
|
326 |
' Get indefinite pause status
|
|
|
327 |
bIndefinitelyPaused = Indefinitely_Paused()
|
|
|
328 |
|
|
|
329 |
'----------------------------------------------
|
|
|
330 |
%>
|
|
|
331 |
<script language="JavaScript" type="text/javascript">
|
|
|
332 |
<!--
|
|
|
333 |
|
|
|
334 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
335 |
// This function rebuilds the query string so that it either adds or removes the specified project ID from
|
|
|
336 |
// the HideProj= part of it, whilst leaving the rest of the string intact. The browser location is then
|
|
|
337 |
// updated and the server made to re-render the page. This function must be used from the project checkboxes
|
|
|
338 |
// to show/hide daemon status informaton for specific projects.
|
|
|
339 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
340 |
function toggle_project( proj_id )
|
|
|
341 |
{
|
|
|
342 |
var found = false;
|
|
|
343 |
var new_url_query_string = '';
|
|
|
344 |
var new_hp_list = '';
|
|
|
345 |
|
|
|
346 |
// get the full query string
|
|
|
347 |
var url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';
|
|
|
348 |
|
|
|
349 |
// split it into each parameter
|
|
|
350 |
var qs_arr = url_query_string.split('&');
|
|
|
351 |
var i_qs_arr;
|
|
|
352 |
for (i_qs_arr in qs_arr)
|
|
|
353 |
{
|
|
|
354 |
var qs_str = qs_arr[i_qs_arr];
|
|
|
355 |
|
|
|
356 |
if (qs_str.length > 0)
|
|
|
357 |
{
|
|
|
358 |
// if we have found the HideProj parameter
|
|
|
359 |
if (qs_str.indexOf('HideProj') >= 0)
|
|
|
360 |
{
|
|
|
361 |
// Split the HideProj parameter at the = symbol in order to process the comma seperated list of project IDs
|
|
|
362 |
var qs_hp_arr;
|
|
|
363 |
qs_hp_arr = qs_str.split('=');
|
|
|
364 |
if (qs_hp_arr.length > 1)
|
|
|
365 |
{
|
|
|
366 |
// Split the comma seperated list of project IDs, and iterate through each item
|
|
|
367 |
var hp_arr = qs_hp_arr[1].split(',');
|
|
|
368 |
var i_hp_arr;
|
|
|
369 |
for (i_hp_arr in hp_arr)
|
|
|
370 |
{
|
|
|
371 |
var hp_str = hp_arr[i_hp_arr];
|
|
|
372 |
|
|
|
373 |
// If the item matches the specified project ID and the checkbox for that project is unchecked
|
|
|
374 |
if (hp_str == proj_id)
|
|
|
375 |
{
|
|
|
376 |
found = true;
|
|
|
377 |
}
|
|
|
378 |
else
|
|
|
379 |
{
|
|
|
380 |
// retain this other project ID in the list
|
|
|
381 |
if (new_hp_list != '')
|
|
|
382 |
new_hp_list += ',';
|
|
|
383 |
new_hp_list += hp_str;
|
|
|
384 |
}
|
|
|
385 |
}
|
|
|
386 |
}
|
|
|
387 |
}
|
|
|
388 |
else
|
|
|
389 |
{
|
|
|
390 |
// feed the existing paramter to the new query string
|
|
|
391 |
if (new_url_query_string == '')
|
|
|
392 |
new_url_query_string += '?';
|
|
|
393 |
else
|
|
|
394 |
new_url_query_string += '&';
|
|
|
395 |
new_url_query_string += qs_str
|
|
|
396 |
}
|
|
|
397 |
}
|
|
|
398 |
}
|
|
|
399 |
|
|
|
400 |
// If the specified project ID was not found, then that project is not currently hidden
|
|
|
401 |
// and must now be hidden, so add its number to the list to hide it on the next server side
|
|
|
402 |
// page render operation
|
|
|
403 |
if (!found)
|
|
|
404 |
{
|
|
|
405 |
if (new_hp_list != '')
|
|
|
406 |
new_hp_list += ',';
|
|
|
407 |
new_hp_list += proj_id
|
|
|
408 |
}
|
|
|
409 |
|
|
|
410 |
// Prepare the new query string
|
|
|
411 |
if (new_url_query_string == '')
|
|
|
412 |
new_url_query_string += '\?';
|
|
|
413 |
else
|
|
|
414 |
new_url_query_string += '\&';
|
|
|
415 |
|
|
|
416 |
new_url_query_string += 'HideProj=';
|
|
|
417 |
new_url_query_string += new_hp_list;
|
|
|
418 |
|
|
|
419 |
// reload the page with the new query string
|
|
|
420 |
var url = location.pathname + new_url_query_string;
|
|
|
421 |
window.location.assign(url);
|
|
|
422 |
}
|
|
|
423 |
|
|
|
424 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
425 |
// This function rebuilds the query string to either hide all projects, or unhide all projects
|
|
|
426 |
// fromt he display
|
|
|
427 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
428 |
function toggle_all_projects(bAll)
|
|
|
429 |
{
|
|
|
430 |
var new_url_query_string = '';
|
|
|
431 |
var list_proj_ids = '';
|
|
|
432 |
|
|
|
433 |
// If hiding all, then find all of the project enable/disable checkboxes, get the project ID
|
|
|
434 |
// values from each one and accumulate them into a comma seperated list
|
|
|
435 |
if (!bAll)
|
|
|
436 |
{
|
|
|
437 |
var inputs = document.getElementsByTagName('input');
|
|
|
438 |
var i;
|
|
|
439 |
for (i = 0; i < inputs.length; i++)
|
|
|
440 |
{
|
|
|
441 |
var str = inputs[i].name;
|
|
|
442 |
if (str.indexOf("DIS_PRJ_") >= 0)
|
|
|
443 |
{
|
|
|
444 |
str = str.replace("DIS_PRJ_","");
|
|
|
445 |
if (list_proj_ids != '')
|
|
|
446 |
list_proj_ids += ',' + str;
|
|
|
447 |
else
|
|
|
448 |
list_proj_ids += str;
|
|
|
449 |
}
|
|
|
450 |
}
|
|
|
451 |
}
|
|
|
452 |
|
|
|
453 |
// get the full query string
|
|
|
454 |
var url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';
|
|
|
455 |
|
|
|
456 |
// split it into each parameter
|
|
|
457 |
var qs_arr = url_query_string.split('&');
|
|
|
458 |
var i_qs_arr;
|
|
|
459 |
for (i_qs_arr in qs_arr)
|
|
|
460 |
{
|
|
|
461 |
var qs_str = qs_arr[i_qs_arr];
|
|
|
462 |
|
|
|
463 |
if (qs_str.length > 0)
|
|
|
464 |
{
|
|
|
465 |
// if we have found the HideProj parameter
|
|
|
466 |
if (qs_str.indexOf('HideProj') >= 0)
|
|
|
467 |
{
|
|
|
468 |
// do nothing
|
|
|
469 |
}
|
|
|
470 |
else
|
|
|
471 |
{
|
|
|
472 |
// feed the existing paramter to the new query string
|
|
|
473 |
if (new_url_query_string == '')
|
|
|
474 |
new_url_query_string += '?';
|
|
|
475 |
else
|
|
|
476 |
new_url_query_string += '&';
|
|
|
477 |
new_url_query_string += qs_str
|
|
|
478 |
}
|
|
|
479 |
}
|
|
|
480 |
}
|
|
|
481 |
|
|
|
482 |
// Prepare the new query string, only adding the HideProj parameter if the function is being
|
|
|
483 |
// used to hide all projects
|
|
|
484 |
if (!bAll)
|
|
|
485 |
{
|
|
|
486 |
if (new_url_query_string == '')
|
|
|
487 |
new_url_query_string += '\?';
|
|
|
488 |
else
|
|
|
489 |
new_url_query_string += '\&';
|
|
|
490 |
|
|
|
491 |
new_url_query_string += 'HideProj=' + list_proj_ids;
|
|
|
492 |
}
|
|
|
493 |
// reload the page with the new query string
|
|
|
494 |
var url = location.pathname + new_url_query_string;
|
|
|
495 |
window.location.assign(url);
|
|
|
496 |
}
|
|
|
497 |
|
|
|
498 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
499 |
// This function rebuilds the query string so that it either adds or removes the Refresh parameter
|
|
|
500 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
501 |
function toggle_refresh()
|
|
|
502 |
{
|
|
|
503 |
var new_url_query_string = '';
|
|
|
504 |
|
|
|
505 |
// get the full query string
|
|
|
506 |
var url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';
|
|
|
507 |
|
|
|
508 |
// split it into each parameter
|
|
|
509 |
var qs_arr = url_query_string.split('&');
|
|
|
510 |
var i_qs_arr;
|
|
|
511 |
for (i_qs_arr in qs_arr)
|
|
|
512 |
{
|
|
|
513 |
var qs_str = qs_arr[i_qs_arr];
|
|
|
514 |
|
|
|
515 |
if (qs_str.length > 0)
|
|
|
516 |
{
|
|
|
517 |
// if we have found the Refresh parameter
|
|
|
518 |
if (qs_str.indexOf('Refresh') >= 0)
|
|
|
519 |
{
|
|
|
520 |
// do nothing
|
|
|
521 |
}
|
|
|
522 |
else
|
|
|
523 |
{
|
|
|
524 |
// feed the existing paramter to the new query string
|
|
|
525 |
if (new_url_query_string == '')
|
|
|
526 |
new_url_query_string += '?';
|
|
|
527 |
else
|
|
|
528 |
new_url_query_string += '&';
|
|
|
529 |
new_url_query_string += qs_str
|
|
|
530 |
}
|
|
|
531 |
}
|
|
|
532 |
}
|
|
|
533 |
|
|
|
534 |
// Prepare the new query string
|
|
|
535 |
|
|
|
536 |
if (new_url_query_string == '')
|
|
|
537 |
new_url_query_string += '\?';
|
|
|
538 |
else
|
|
|
539 |
new_url_query_string += '\&';
|
|
|
540 |
|
|
|
541 |
new_url_query_string += 'Refresh=';
|
|
|
542 |
if (document.getElementById('refreshPeriod').value < <%=Min_Refresh_Time%>)
|
|
|
543 |
{
|
|
|
544 |
document.getElementById('refreshPeriod').value = <%=Min_Refresh_Time%>;
|
|
|
545 |
new_url_query_string += <%=Min_Refresh_Time%>;
|
|
|
546 |
}
|
|
|
547 |
else
|
|
|
548 |
new_url_query_string += document.getElementById('refreshPeriod').value;
|
|
|
549 |
|
|
|
550 |
if (document.getElementById('autoRefresh').checked)
|
|
|
551 |
new_url_query_string += ',ON';
|
|
|
552 |
else
|
|
|
553 |
new_url_query_string += ',OFF';
|
|
|
554 |
|
|
|
555 |
|
|
|
556 |
// reload the page with the new query string
|
|
|
557 |
var url = location.pathname + new_url_query_string;
|
|
|
558 |
window.location.assign(url);
|
|
|
559 |
}
|
|
|
560 |
|
|
|
561 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
| 4200 |
dpurdie |
562 |
// Rebuild the query string and reload the page based on the current setting of the filter
|
|
|
563 |
// radio buttons
|
| 147 |
ghuddy |
564 |
//////////////////////////////////////////////////////////////////////////////////////////////////
|
| 4200 |
dpurdie |
565 |
function update_Display_Filter()
|
| 147 |
ghuddy |
566 |
{
|
|
|
567 |
var new_url_query_string = '';
|
|
|
568 |
|
|
|
569 |
// get the full query string
|
|
|
570 |
var url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';
|
|
|
571 |
|
|
|
572 |
// split it into each parameter
|
|
|
573 |
var qs_arr = url_query_string.split('&');
|
|
|
574 |
var i_qs_arr;
|
|
|
575 |
for (i_qs_arr in qs_arr)
|
|
|
576 |
{
|
|
|
577 |
var qs_str = qs_arr[i_qs_arr];
|
|
|
578 |
|
|
|
579 |
if (qs_str.length > 0)
|
|
|
580 |
{
|
|
|
581 |
// if we have found the Display parameter
|
|
|
582 |
if (qs_str.indexOf('Filter') >= 0)
|
|
|
583 |
{
|
|
|
584 |
// do nothing
|
|
|
585 |
}
|
|
|
586 |
else
|
|
|
587 |
{
|
|
|
588 |
// feed the existing paramter to the new query string
|
|
|
589 |
if (new_url_query_string == '')
|
|
|
590 |
new_url_query_string += '?';
|
|
|
591 |
else
|
|
|
592 |
new_url_query_string += '&';
|
|
|
593 |
new_url_query_string += qs_str
|
|
|
594 |
}
|
|
|
595 |
}
|
|
|
596 |
}
|
|
|
597 |
|
|
|
598 |
// Prepare the new query string
|
| 4200 |
dpurdie |
599 |
var qJoiner;
|
| 147 |
ghuddy |
600 |
if (new_url_query_string == '')
|
| 4200 |
dpurdie |
601 |
qJoiner = '\?';
|
| 147 |
ghuddy |
602 |
else
|
| 4200 |
dpurdie |
603 |
qJoiner = '\&';
|
| 147 |
ghuddy |
604 |
|
| 4200 |
dpurdie |
605 |
var joiner = '';
|
|
|
606 |
var filterSet = '';
|
|
|
607 |
var items = new Array ("activeBuilds","disabledDaemons","idleBuilds","pausedBuilds","problemBuilds");
|
|
|
608 |
for (var item in items)
|
| 147 |
ghuddy |
609 |
{
|
| 4200 |
dpurdie |
610 |
if (document.getElementById(items[item]).checked)
|
|
|
611 |
{
|
|
|
612 |
filterSet += joiner + items[item];
|
|
|
613 |
joiner = ',';
|
|
|
614 |
}
|
| 147 |
ghuddy |
615 |
}
|
|
|
616 |
|
| 4200 |
dpurdie |
617 |
if (filterSet.length > 0)
|
| 147 |
ghuddy |
618 |
{
|
| 4200 |
dpurdie |
619 |
new_url_query_string += qJoiner + 'Filter=' + filterSet;
|
| 147 |
ghuddy |
620 |
}
|
| 1376 |
dpurdie |
621 |
|
| 147 |
ghuddy |
622 |
// reload the page with the new query string
|
|
|
623 |
var url = location.pathname + new_url_query_string;
|
|
|
624 |
window.location.assign(url);
|
|
|
625 |
}
|
|
|
626 |
|
|
|
627 |
//-->
|
|
|
628 |
</script>
|
|
|
629 |
|
|
|
630 |
<html>
|
|
|
631 |
<head>
|
|
|
632 |
<title>Release Manager</title>
|
|
|
633 |
<meta http-equiv="Pragma" content="no-cache">
|
|
|
634 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
635 |
<%If param_refreshEnabled AND param_RefreshPeriod <> 0 Then%>
|
|
|
636 |
<META HTTP-EQUIV=REFRESH CONTENT=<%=param_RefreshPeriod%>>
|
|
|
637 |
<%End If%>
|
|
|
638 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
639 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
640 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
641 |
<!-- DROPDOWN MENUS -->
|
|
|
642 |
<!--#include file="_menu_def.asp"-->
|
|
|
643 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
644 |
</head>
|
|
|
645 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
646 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
647 |
<div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)"></div>
|
|
|
648 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
649 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
650 |
<!----------------------------------------------------->
|
|
|
651 |
<!-- HEADER -->
|
|
|
652 |
<!--#include file="_header.asp"-->
|
|
|
653 |
<!-- BODY ---->
|
|
|
654 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
655 |
<tr>
|
|
|
656 |
<td width="1" background="images/bg_home_orange.gif" valign="top"></td>
|
|
|
657 |
<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
|
|
|
658 |
|
|
|
659 |
<table width="10" border="0" cellspacing="0" cellpadding="0">
|
|
|
660 |
<tr>
|
|
|
661 |
<td width="1%"></td>
|
|
|
662 |
<td width="100%">
|
|
|
663 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
664 |
<tr>
|
|
|
665 |
<td nowrap class="form_ttl"><p> </p>
|
|
|
666 |
<p>BUILD DAEMON STATUS INFORMATION</p>
|
|
|
667 |
</td>
|
|
|
668 |
<td align="right" valign="bottom"></td>
|
|
|
669 |
</tr>
|
|
|
670 |
|
|
|
671 |
<tr>
|
| 3959 |
dpurdie |
672 |
<!-- Monitoring Options Selection Box ---->
|
| 147 |
ghuddy |
673 |
<td width="100%">
|
|
|
674 |
<fieldset style="width:700px;">
|
|
|
675 |
<legend><a href="javascript:;" class="body_scol" > Monitoring Options</a></legend>
|
|
|
676 |
<table width="100%" border="0" cellspacing="1" cellpadding="3">
|
|
|
677 |
<tr>
|
|
|
678 |
<td valign="top" width="200px" nowrap background="images/bg_table_col.gif" class="body_col">Auto Refresh</td>
|
|
|
679 |
<td valign="top" width="200px" nowrap background="images/bg_table_col.gif" class="body_col">Filter Options</td>
|
|
|
680 |
</tr>
|
|
|
681 |
|
|
|
682 |
<tr>
|
|
|
683 |
<td class="body_rowg">
|
|
|
684 |
<input name="autoRefresh" id="autoRefresh" type="checkbox" <%If param_refreshEnabled Then%>checked<%End If%> value="1" onclick='toggle_refresh()'>
|
|
|
685 |
<input style="width:50px" name="refreshPeriod" id="refreshPeriod" type="input" maxlength="3" value=<%=param_refreshPeriod%> onchange='toggle_refresh()' >Seconds (min. 10)
|
|
|
686 |
</td>
|
|
|
687 |
<td class="body_rowg">
|
| 4200 |
dpurdie |
688 |
<input name="activeBuilds" id="activeBuilds" type="checkbox" <%=Filter_Checked("activeBuilds")%> value="activeBuilds" onclick='update_Display_Filter()'>Active
|
|
|
689 |
<input name="idleBuilds" id="idleBuilds" type="checkbox" <%=Filter_Checked("idleBuilds")%> value="idleBuilds" onclick='update_Display_Filter()'>Idle
|
|
|
690 |
<input name="pausedBuilds" id="pausedBuilds" type="checkbox" <%=Filter_Checked("pausedBuilds")%> value="paused" onclick='update_Display_Filter()'>Paused
|
|
|
691 |
<input name="disabledDaemons" id="disabledDaemons" type="checkbox" <%=Filter_Checked("disabledDaemons")%> value="disabledDaemons" onclick='update_Display_Filter()'>Disabled
|
|
|
692 |
<input name="problemBuilds" id="problemBuilds" type="checkbox" <%=Filter_Checked("problemBuilds")%> value="problemBuilds" onclick='update_Display_Filter()'>Problem Daemon Sets
|
| 147 |
ghuddy |
693 |
</td>
|
|
|
694 |
</tr>
|
|
|
695 |
</table>
|
|
|
696 |
</fieldset>
|
|
|
697 |
</td>
|
|
|
698 |
</tr>
|
|
|
699 |
<%If bIndefinitelyPaused Then%>
|
|
|
700 |
<tr>
|
|
|
701 |
<td>
|
|
|
702 |
<span class='err_alert'>
|
|
|
703 |
<font size='2'><b>WARNING: Indefinite Pause, Build Daemons are all stopped - please contact an administrator</b></font>
|
|
|
704 |
</span>
|
|
|
705 |
</td>
|
|
|
706 |
</tr>
|
|
|
707 |
<%End If%>
|
|
|
708 |
</table>
|
|
|
709 |
</td>
|
|
|
710 |
<td width="1%"></td>
|
|
|
711 |
</tr>
|
|
|
712 |
<tr>
|
|
|
713 |
<td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
|
|
|
714 |
<td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
|
|
|
715 |
<td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
|
|
|
716 |
</tr>
|
|
|
717 |
<tr>
|
|
|
718 |
<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
|
|
719 |
<td bgcolor="#FFFFFF" valign="top">
|
|
|
720 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
721 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
722 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
723 |
<br>
|
|
|
724 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
725 |
<td width="9%" valign="top"></td>
|
|
|
726 |
<tr>
|
|
|
727 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Project
|
|
|
728 |
<input name="NOPRJ" id="NOPRJ" type="Button" value="All" onclick="toggle_all_projects(1)">
|
|
|
729 |
<input name="NOPRJ" id="NOPRJ" type="Button" value="None" onclick="toggle_all_projects(0)">
|
|
|
730 |
</td>
|
|
|
731 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Release</td>
|
|
|
732 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Release<br>Mode</td>
|
|
|
733 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Daemon<br>Mode</td>
|
| 163 |
brianf |
734 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Daemon<br>Host</td>
|
| 147 |
ghuddy |
735 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Daemon<br>State</td>
|
|
|
736 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Building<br>Package</td>
|
|
|
737 |
<td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Last Change<br>Delta (secs)</td>
|
|
|
738 |
</tr>
|
|
|
739 |
<%
|
|
|
740 |
|
|
|
741 |
query_string = "SELECT rc.RCON_ID, " &_
|
|
|
742 |
" rc.RTAG_ID, " &_
|
| 163 |
brianf |
743 |
" bm.DISPLAY_NAME, " &_
|
| 147 |
ghuddy |
744 |
" rc.DAEMON_MODE, "&_
|
|
|
745 |
" rt.RTAG_NAME, " &_
|
|
|
746 |
" rt.OFFICIAL, " &_
|
|
|
747 |
" p.PROJ_ID, " &_
|
|
|
748 |
" p.PROJ_NAME, " &_
|
|
|
749 |
" rl.CURRENT_PKG_ID_BEING_BUILT, "&_
|
|
|
750 |
" rl.CURRENT_RUN_LEVEL, "&_
|
|
|
751 |
" rl.PAUSE, " &_
|
|
|
752 |
" TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
|
| 163 |
brianf |
753 |
" FROM RELEASE_CONFIG rc, RELEASE_TAGS rt, PROJECTS p, RUN_LEVEL rl, BUILD_MACHINE_CONFIG bm " &_
|
| 147 |
ghuddy |
754 |
" WHERE rt.RTAG_ID = rc.RTAG_ID " &_
|
| 4293 |
dpurdie |
755 |
" AND rc.bmcon_id is not null" &_
|
| 147 |
ghuddy |
756 |
" AND rt.PROJ_ID = p.PROJ_ID " &_
|
|
|
757 |
" AND rt.OFFICIAL != 'A' " &_
|
|
|
758 |
" AND rt.OFFICIAL != 'Y' " &_
|
|
|
759 |
" AND rl.RCON_ID = rc.RCON_ID" &_
|
| 4293 |
dpurdie |
760 |
" AND rc.bmcon_id = bm.bmcon_id(+)" &_
|
| 163 |
brianf |
761 |
" ORDER BY p.PROJ_NAME, rt.RTAG_NAME, rc.DAEMON_MODE, bm.DISPLAY_NAME"
|
| 147 |
ghuddy |
762 |
|
|
|
763 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
|
|
764 |
|
|
|
765 |
' String variables
|
|
|
766 |
Dim strProject_checked ' Can be "" or "checked". Determines appearance of project enable checkbox
|
|
|
767 |
|
|
|
768 |
' Boolean variables
|
|
|
769 |
Dim bProject_changed ' signals a row change due to a different project
|
|
|
770 |
Dim bRelease_changed ' signals a row change due to a different release
|
|
|
771 |
Dim bRow_displayed ' signals whether a row should be displayed or not
|
|
|
772 |
Dim bRelease_link_displayed ' indicates whether the release name has been rendered yet
|
|
|
773 |
Dim bDisplay_whole_set ' forces the whole daemon set for a release to be displayed
|
|
|
774 |
Dim bShowProblemDaemonSets ' Indicates if problem daemons must be shown during filtering
|
| 1376 |
dpurdie |
775 |
Dim bShowDisabledDaemons ' Indicates if a disabled daemon must be shown during filtering
|
| 147 |
ghuddy |
776 |
Dim bShowActiveBuilds ' Indicates if active builds must be shown during filtering
|
| 4200 |
dpurdie |
777 |
Dim bShowIdleBuilds ' Indicates if idle builds must be shown during filtering
|
|
|
778 |
Dim bShowPausedBuilds ' Indicates if paused builds must be shown during filtering
|
|
|
779 |
Dim dState ' Decoded state of a daemon
|
|
|
780 |
Dim bProjectHeader ' Project Header done
|
| 147 |
ghuddy |
781 |
|
|
|
782 |
' Integer variables
|
|
|
783 |
Dim pkgId
|
|
|
784 |
Dim lastProjID ' Used to detect project changes from one row to the next
|
|
|
785 |
Dim lastRtagId ' Used to detect release changes from one row to the next
|
| 173 |
brianf |
786 |
Dim daemonState
|
| 147 |
ghuddy |
787 |
|
|
|
788 |
' Initialise variables
|
|
|
789 |
strProject_checked = ""
|
|
|
790 |
|
|
|
791 |
bProject_changed = True
|
|
|
792 |
bRelease_changed = True
|
|
|
793 |
bRow_displayed = True
|
|
|
794 |
bRelease_link_displayed = False
|
|
|
795 |
bDisplay_whole_set = False
|
| 4200 |
dpurdie |
796 |
bShowProblemDaemonSets = Filter_Is_On("problemBuilds")
|
| 147 |
ghuddy |
797 |
bShowActiveBuilds = Filter_Is_On("activeBuilds")
|
| 1376 |
dpurdie |
798 |
bShowDisabledDaemons = Filter_Is_On("disabledDaemons")
|
| 4200 |
dpurdie |
799 |
bShowIdleBuilds = Filter_Is_On("idleBuilds")
|
|
|
800 |
bShowPausedBuilds = Filter_Is_On("pausedBuilds")
|
| 147 |
ghuddy |
801 |
|
|
|
802 |
lastProjID = 0
|
|
|
803 |
lastRtagId = 0
|
|
|
804 |
|
| 4200 |
dpurdie |
805 |
bProjectHeader = false
|
|
|
806 |
|
| 147 |
ghuddy |
807 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
808 |
pkgId = rsQry("current_pkg_id_being_built")
|
|
|
809 |
|
|
|
810 |
' determine if user has checked the project checkbox
|
|
|
811 |
strProject_checked = Is_Project_Checked(rsQry("proj_id"))
|
|
|
812 |
|
|
|
813 |
' Has the project changed since the last row. If so, signal it via bProject_changed variable, and
|
|
|
814 |
' reset the bRelease_link_displayed variable to force the display of the release column value on the
|
|
|
815 |
' render of the next unfiltered row
|
|
|
816 |
bProject_changed = False
|
|
|
817 |
If lastProjID <> rsQry("proj_id") Then
|
|
|
818 |
lastProjID = rsQry("proj_id")
|
|
|
819 |
bProject_changed = True
|
|
|
820 |
bRelease_link_displayed = False
|
|
|
821 |
bDisplay_whole_set = False
|
|
|
822 |
End If
|
|
|
823 |
|
|
|
824 |
' Has the release changed since the last row of displayed data. If so, signal it via the bRelease_changed variable,
|
|
|
825 |
' and reset the bRelease_link_displayed variable to force the display of the release column value on the
|
|
|
826 |
' render of the next unfiltered row.
|
|
|
827 |
bRelease_changed = False
|
|
|
828 |
If lastRtagId <> rsQry("rtag_id") Then
|
|
|
829 |
lastRtagId = rsQry("rtag_id")
|
|
|
830 |
bRelease_changed = True
|
|
|
831 |
bRelease_link_displayed = False
|
|
|
832 |
bDisplay_whole_set = False
|
|
|
833 |
End If
|
|
|
834 |
|
| 173 |
brianf |
835 |
daemonState = rsQry("pause")
|
| 1326 |
dpurdie |
836 |
If IsNull(daemonState) Then
|
|
|
837 |
daemonState = 0
|
|
|
838 |
End If
|
| 173 |
brianf |
839 |
|
| 147 |
ghuddy |
840 |
' generate the table row divider - this uses the bRow_displayed value from the previous iteration in order
|
|
|
841 |
' to prevent dividers being drawn between rows that were not actually rendered due to any filtering that
|
|
|
842 |
' may be in effect.
|
|
|
843 |
%>
|
|
|
844 |
<%=HTML_Row_Divider( bProject_changed, strProject_checked, bRelease_changed, bRow_displayed )%>
|
|
|
845 |
<%
|
|
|
846 |
|
|
|
847 |
' If this is a Master Daemon, look ahead at all the slaves and evaluate if any daemons in the set appear to
|
|
|
848 |
' be having a problem. If any are and the user has turned the "Show Problem Daemon Sets" filter on then
|
|
|
849 |
' set the bDisplay_whole_set variable to True else set it to False
|
|
|
850 |
If rsQry("daemon_mode") = "M" Then
|
|
|
851 |
|
|
|
852 |
' Initial default value is to not show the entire daemon set
|
|
|
853 |
bDisplay_whole_set = False
|
|
|
854 |
|
| 4200 |
dpurdie |
855 |
' Classify the state of the daemon as one of: active, idle, paused, disabled, problem, unknown
|
|
|
856 |
If bShowProblemDaemonSets Then
|
| 4202 |
dpurdie |
857 |
dState = Classify_Run_Level(rsQry("current_run_level"),bIndefinitelyPaused,daemonState, rsQry("delta") ,pkgId)
|
| 4200 |
dpurdie |
858 |
If dState = "active" Then
|
|
|
859 |
ElseIf dState = "idle" Then
|
|
|
860 |
ElseIf dState = "paused" Then
|
|
|
861 |
ElseIf dState = "disabled" Then
|
|
|
862 |
ElseIf dState = "problem" Then
|
|
|
863 |
bDisplay_whole_set = true
|
|
|
864 |
Else
|
|
|
865 |
bDisplay_whole_set = true
|
|
|
866 |
End If
|
|
|
867 |
End If
|
|
|
868 |
|
|
|
869 |
' If the filter is turned on and master daemon looks OK then check out the slaves
|
|
|
870 |
' If nothing appears wrong with the Master Daemon, look ahead at all the slaves in the set
|
|
|
871 |
If bShowProblemDaemonSets AND NOT bDisplay_whole_set Then
|
| 147 |
ghuddy |
872 |
Dim thisRtagId
|
|
|
873 |
Dim rtag_id_set_count
|
|
|
874 |
Dim i
|
|
|
875 |
|
|
|
876 |
thisRtagId = rsQry("rtag_id")
|
|
|
877 |
rtag_id_set_count = 1
|
|
|
878 |
|
|
|
879 |
rsQry.MoveNext
|
|
|
880 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND rsQry("rtag_id") = thisRtagId
|
|
|
881 |
rtag_id_set_count = rtag_id_set_count + 1
|
|
|
882 |
|
| 4202 |
dpurdie |
883 |
dState = Classify_Run_Level(rsQry("current_run_level"),bIndefinitelyPaused,daemonState, rsQry("delta"),pkgId)
|
| 4200 |
dpurdie |
884 |
If dState = "active" Then
|
|
|
885 |
ElseIf dState = "idle" Then
|
|
|
886 |
ElseIf dState = "paused" Then
|
|
|
887 |
ElseIf dState = "disabled" Then
|
|
|
888 |
ElseIf dState = "problem" Then
|
|
|
889 |
bDisplay_whole_set = true
|
|
|
890 |
Else
|
|
|
891 |
bDisplay_whole_set = true
|
|
|
892 |
End If
|
| 147 |
ghuddy |
893 |
rsQry.MoveNext
|
|
|
894 |
Loop
|
|
|
895 |
For i = 1 to rtag_id_set_count
|
|
|
896 |
rsQry.MovePrevious
|
|
|
897 |
Next
|
|
|
898 |
End If
|
|
|
899 |
End If
|
|
|
900 |
|
|
|
901 |
|
|
|
902 |
' Now figure out if this row of data is to be displayed or not
|
| 4200 |
dpurdie |
903 |
bRow_displayed = bDisplay_whole_set
|
|
|
904 |
If NOT bRow_displayed Then
|
| 4202 |
dpurdie |
905 |
dState = Classify_Run_Level(rsQry("current_run_level"),bIndefinitelyPaused,daemonState, rsQry("delta"),pkgId)
|
| 4200 |
dpurdie |
906 |
If dState = "active" Then
|
|
|
907 |
If bShowActiveBuilds Then bRow_displayed = true
|
|
|
908 |
ElseIf dState = "idle" Then
|
|
|
909 |
If bShowIdleBuilds Then bRow_displayed = true
|
|
|
910 |
ElseIf dState = "paused" Then
|
|
|
911 |
If bShowPausedBuilds Then bRow_displayed = true
|
|
|
912 |
ElseIf dState = "disabled" Then
|
|
|
913 |
If bShowDisabledDaemons Then bRow_displayed = true
|
|
|
914 |
ElseIf dState = "problem" Then
|
|
|
915 |
If bShowProblemDaemonSets Then bRow_displayed = true
|
|
|
916 |
Else
|
|
|
917 |
bRow_displayed = true
|
|
|
918 |
End If
|
|
|
919 |
End If
|
| 147 |
ghuddy |
920 |
|
|
|
921 |
' it a slightly different look to the previous displayed row which was for a different release
|
|
|
922 |
If bRelease_changed AND bRow_displayed Then
|
|
|
923 |
Call ToggleStyleNow
|
|
|
924 |
End If
|
|
|
925 |
|
|
|
926 |
' Now we are ready to render the HTML content for the row, but we may still circumvent rendering if the user
|
|
|
927 |
' has unchecked the project checkbox
|
|
|
928 |
%>
|
|
|
929 |
<%If bProject_changed Then%>
|
| 4200 |
dpurdie |
930 |
<tr>
|
| 147 |
ghuddy |
931 |
<td nowrap class="body_rowg">
|
|
|
932 |
<input name='DIS_PRJ_<%=rsQry("proj_id")%>' id='DIS_PRJ_<%=rsQry("proj_id")%>' type='checkbox' value=1 <%=strProject_checked%> onclick=toggle_project(<%=rsQry("proj_id")%>)>
|
|
|
933 |
<a href='rtree.asp?proj_id=<%=rsQry("proj_id")%>'><%=rsQry("proj_name")%>
|
|
|
934 |
</td>
|
| 4200 |
dpurdie |
935 |
<%
|
|
|
936 |
bProjectHeader = true
|
|
|
937 |
Else
|
|
|
938 |
bProjectHeader = false
|
|
|
939 |
End If%>
|
| 147 |
ghuddy |
940 |
|
|
|
941 |
<%If strProject_checked = "checked" Then%>
|
|
|
942 |
<%If bRow_displayed Then%>
|
|
|
943 |
|
| 4200 |
dpurdie |
944 |
<%If NOT bProjectHeader Then %>
|
|
|
945 |
<td nowrap class="body_rowg"></td>
|
|
|
946 |
<%End If%>
|
|
|
947 |
|
|
|
948 |
<%If bRelease_changed OR NOT bRelease_link_displayed Then%>
|
| 147 |
ghuddy |
949 |
<%bRelease_link_displayed = True%>
|
|
|
950 |
<td nowrap <%=styleNow%>><a href='build_status.asp?rtag_id=<%=rsQry("rtag_id")%>'><%=rsQry("rtag_name")%></a></td>
|
| 4200 |
dpurdie |
951 |
<%Else%>
|
|
|
952 |
<td nowrap <%=styleNow%>></td>
|
|
|
953 |
<%End If%>
|
| 147 |
ghuddy |
954 |
|
| 4200 |
dpurdie |
955 |
<td nowrap <%=styleNow%>><%=Get_Official(rsQry("official"))%></td>
|
|
|
956 |
<td nowrap <%=styleNow%>><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
|
|
|
957 |
<td nowrap <%=styleNow%>><%=rsQry("display_name")%></td>
|
|
|
958 |
<td nowrap <%=styleNow%>><%=Get_Run_Level(rsQry("current_run_level"), bIndefinitelyPaused,daemonState)%></td>
|
|
|
959 |
<td nowrap <%=styleNow%>><%=Get_Pkg_Name(pkgId)%></td>
|
|
|
960 |
<td nowrap <%=styleNow%>><%=PrettyDelta(rsQry("delta"),daemonState,pkgId )%></td>
|
| 147 |
ghuddy |
961 |
<%End If%>
|
|
|
962 |
</tr>
|
|
|
963 |
<%End If%>
|
|
|
964 |
<%
|
|
|
965 |
rsQry.MoveNext
|
|
|
966 |
Loop
|
|
|
967 |
rsQry.Close()
|
|
|
968 |
Set rsQry = nothing
|
|
|
969 |
|
|
|
970 |
%>
|
|
|
971 |
</table>
|
|
|
972 |
</td>
|
|
|
973 |
<td background="images/lbox_bgside_white.gif"> </td>
|
|
|
974 |
</tr>
|
|
|
975 |
<tr>
|
|
|
976 |
<input type="hidden" name="action" value="true">
|
|
|
977 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
978 |
<td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
|
|
|
979 |
<td background="images/lbox_bg_blue.gif"></td>
|
|
|
980 |
<td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
|
|
|
981 |
</tr>
|
|
|
982 |
</table>
|
|
|
983 |
</td>
|
|
|
984 |
<td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
|
|
985 |
</tr>
|
|
|
986 |
<tr>
|
|
|
987 |
<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>
|
|
|
988 |
<td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350"></td>
|
|
|
989 |
</tr>
|
|
|
990 |
</table>
|
|
|
991 |
<!-- FOOTER -->
|
|
|
992 |
<!--#include file="_footer.asp"-->
|
|
|
993 |
</body>
|
|
|
994 |
</html>
|
|
|
995 |
<%
|
|
|
996 |
Call Destroy_All_Objects
|
|
|
997 |
%>
|