Subversion Repositories DevTools

Rev

Rev 5008 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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