| Line 61... |
Line 61... |
| 61 |
Sub RenderDaemonStatusForRelease(irtag_id,isize)
|
61 |
Sub RenderDaemonStatusForRelease(irtag_id,isize)
|
| 62 |
Call GetDaemonStatusForRelease(irtag_id)
|
62 |
Call GetDaemonStatusForRelease(irtag_id)
|
| 63 |
Call RenderDaemonStatus(irtag_id,isize)
|
63 |
Call RenderDaemonStatus(irtag_id,isize)
|
| 64 |
End Sub
|
64 |
End Sub
|
| 65 |
|
65 |
|
| - |
|
66 |
'--------------------------------------------------------------------------------------------------------------------------
|
| - |
|
67 |
' Like Cint, but handles NULL by replacing it with a default value
|
| - |
|
68 |
Function NiceInt( val, def)
|
| - |
|
69 |
If isNull(val) Then
|
| - |
|
70 |
NiceInt = def
|
| - |
|
71 |
Else
|
| - |
|
72 |
NiceInt = CInt(val)
|
| - |
|
73 |
End If
|
| - |
|
74 |
End Function
|
| - |
|
75 |
|
| 66 |
'----------------------------------------------------------------------------------------------------------------------------------------------
|
76 |
'----------------------------------------------------------------------------------------------------------------------------------------------
|
| 67 |
' Gets the daemon summary for a specified release
|
77 |
' Gets the daemon summary for a specified release
|
| 68 |
' Parameters:
|
78 |
' Parameters:
|
| 69 |
' irtag_id: the specified release
|
79 |
' irtag_id: the specified release
|
| 70 |
' Assumes GetDaemonStatus or GetDaemonStatusForRelease has already been called
|
80 |
' Assumes GetDaemonStatus or GetDaemonStatusForRelease has already been called
|
| Line 164... |
Line 174... |
| 164 |
Dim sDmStsToolTip
|
174 |
Dim sDmStsToolTip
|
| 165 |
Dim sDmStsSearch
|
175 |
Dim sDmStsSearch
|
| 166 |
Dim iheight
|
176 |
Dim iheight
|
| 167 |
Dim iWidth
|
177 |
Dim iWidth
|
| 168 |
Dim iWidthEnd
|
178 |
Dim iWidthEnd
|
| - |
|
179 |
Dim sDmStsAge
|
| - |
|
180 |
Dim sDmStsAgeTip
|
| - |
|
181 |
Dim bTestAge
|
| 169 |
|
182 |
|
| 170 |
iHeight=isize
|
183 |
iHeight=isize
|
| 171 |
' the status icon default dimensions are height:48 and width:30
|
184 |
' the status icon default dimensions are height:48 and width:30
|
| 172 |
' ie. ratio of height to width is 16:10
|
185 |
' ie. ratio of height to width is 16:10
|
| 173 |
' the bar end icon default dimensions are height:48 and width:8
|
186 |
' the bar end icon default dimensions are height:48 and width:8
|
| Line 197... |
Line 210... |
| 197 |
Response.Write("<img src=""icons/tdmsts_notfound.gif"" width=" & iWidth & " height=" & iHeight & " border=0 vspace=0 hspace=0>")
|
210 |
Response.Write("<img src=""icons/tdmsts_notfound.gif"" width=" & iWidth & " height=" & iHeight & " border=0 vspace=0 hspace=0>")
|
| 198 |
Response.Write("</td>")
|
211 |
Response.Write("</td>")
|
| 199 |
Else
|
212 |
Else
|
| 200 |
'add an icon for each daemon
|
213 |
'add an icon for each daemon
|
| 201 |
Do While Not m_rsQryDS.NoMatch
|
214 |
Do While Not m_rsQryDS.NoMatch
|
| - |
|
215 |
bTestAge = true
|
| - |
|
216 |
|
| 202 |
iDmStsStatus=CInt(m_rsQryDS("status"))
|
217 |
iDmStsStatus=CInt(m_rsQryDS("status"))
|
| 203 |
If m_bIndefinitelyPaused Then
|
218 |
If m_bIndefinitelyPaused Then
|
| 204 |
sDmStsImg="icons/tdmsts_stopped.gif"
|
219 |
sDmStsImg="icons/tdmsts_stopped.gif"
|
| 205 |
sDmStsToolTip="Daemon indefinitley paused." & " "
|
220 |
sDmStsToolTip="Daemon indefinitley paused." & " "
|
| - |
|
221 |
bTestAge = false
|
| 206 |
ElseIf iDmStsStatus = -2 Then
|
222 |
ElseIf iDmStsStatus = -2 Then
|
| 207 |
sDmStsImg="icons/tdmsts_timedout.gif"
|
223 |
sDmStsImg="icons/tdmsts_timedout.gif"
|
| 208 |
sDmStsToolTip="Daemon timed out." & " "
|
224 |
sDmStsToolTip="Daemon timed out." & " "
|
| 209 |
ElseIf iDmStsStatus = -1 Then
|
225 |
ElseIf iDmStsStatus = -1 Then
|
| 210 |
sDmStsImg="icons/tdmsts_unavailable.gif"
|
226 |
sDmStsImg="icons/tdmsts_unavailable.gif"
|
| 211 |
sDmStsToolTip="Daemon unavailable." & " "
|
227 |
sDmStsToolTip="Daemon unavailable." & " "
|
| - |
|
228 |
bTestAge = false
|
| 212 |
ElseIf iDmStsStatus = 0 Then
|
229 |
ElseIf iDmStsStatus = 0 Then
|
| 213 |
sDmStsImg="icons/tdmsts_started.gif"
|
230 |
sDmStsImg="icons/tdmsts_started.gif"
|
| 214 |
sDmStsToolTip="Daemon running." & " "
|
231 |
sDmStsToolTip="Daemon running." & " "
|
| 215 |
ElseIf iDmStsStatus = 1 Then
|
232 |
ElseIf iDmStsStatus = 1 Then
|
| 216 |
sDmStsImg="icons/tdmsts_paused.gif"
|
233 |
sDmStsImg="icons/tdmsts_paused.gif"
|
| 217 |
sDmStsToolTip="Daemon paused." & " "
|
234 |
sDmStsToolTip="Daemon paused." & " "
|
| 218 |
ElseIf iDmStsStatus = 2 Then
|
235 |
ElseIf iDmStsStatus = 2 Then
|
| 219 |
sDmStsImg="icons/tdmsts_stopped.gif"
|
236 |
sDmStsImg="icons/tdmsts_stopped.gif"
|
| 220 |
sDmStsToolTip="Daemon stopped." & " "
|
237 |
sDmStsToolTip="Daemon stopped." & " "
|
| - |
|
238 |
bTestAge = false
|
| 221 |
ElseIf iDmStsStatus = 3 Then
|
239 |
ElseIf iDmStsStatus = 3 Then
|
| 222 |
sDmStsImg="icons/tdmsts_engaged.gif"
|
240 |
sDmStsImg="icons/tdmsts_engaged.gif"
|
| 223 |
sDmStsToolTip="Daemon engaged in a build." & " "
|
241 |
sDmStsToolTip="Daemon engaged in a build." & " "
|
| 224 |
End If
|
242 |
End If
|
| 225 |
|
243 |
|
| 226 |
If sDmStsToolTip <> "" Then
|
244 |
If sDmStsToolTip <> "" Then
|
| 227 |
sDmStsToolTip = sDmStsToolTip & "Click to view details."
|
245 |
sDmStsToolTip = sDmStsToolTip & "Click to view details."
|
| 228 |
End If
|
246 |
End If
|
| 229 |
|
247 |
|
| - |
|
248 |
If bTestAge AND m_rsQryDS("daemon_mode") = "M" Then
|
| - |
|
249 |
Dim nBuildAge
|
| - |
|
250 |
Dim nLastBuildDays
|
| - |
|
251 |
|
| - |
|
252 |
nBuildAge = NiceInt(m_rsQryDS("build_age"), 31)
|
| - |
|
253 |
nLastBuildDays = NiceInt(m_rsQryDS("last_build_days"), 31)
|
| - |
|
254 |
|
| - |
|
255 |
If nBuildAge > 0 Then
|
| - |
|
256 |
If nLastBuildDays > nBuildAge Then
|
| - |
|
257 |
sDmStsAge = "images/s_warning.gif"
|
| - |
|
258 |
sDmStsAgeTip = "No Build in this release since " & m_rsQryDS("last_build") & ". [" & m_rsQryDS("last_build_days") & " Days]"
|
| - |
|
259 |
End If
|
| - |
|
260 |
End If
|
| - |
|
261 |
End If
|
| - |
|
262 |
|
| 230 |
Response.Write("<td>")
|
263 |
Response.Write("<td>")
|
| 231 |
Response.Write("<img src=""" & sDmStsImg & """ width=" & iWidth & " height=" & iHeight & " border=0 vspace=0 hspace=0 " & iif(sDmStsToolTip <> "","title='" & sDmStsToolTip & "'","") & ">")
|
264 |
Response.Write("<img src=""" & sDmStsImg & """ width=" & iWidth & " height=" & iHeight & " border=0 vspace=0 hspace=0 " & iif(sDmStsToolTip <> "","title='" & sDmStsToolTip & "'","") & ">")
|
| 232 |
Response.Write("</td>")
|
265 |
Response.Write("</td>")
|
| 233 |
m_rsQryDS.FindNext(sDmStsSearch)
|
266 |
m_rsQryDS.FindNext(sDmStsSearch)
|
| 234 |
Loop
|
267 |
Loop
|
| - |
|
268 |
|
| 235 |
End If
|
269 |
End If
|
| 236 |
' add right side of chart
|
270 |
' add right side of chart
|
| 237 |
Response.Write("<td>")
|
271 |
Response.Write("<td>")
|
| 238 |
Response.Write("<img src=""icons/tdmsts_right.gif"" width=" & iWidthEnd & " height=" & iHeight & " border=0 vspace=0 hspace=0>")
|
272 |
Response.Write("<img src=""icons/tdmsts_right.gif"" width=" & iWidthEnd & " height=" & iHeight & " border=0 vspace=0 hspace=0>")
|
| 239 |
Response.Write("</td>")
|
273 |
Response.Write("</td>")
|
| - |
|
274 |
If sDmStsAge <> "" Then
|
| - |
|
275 |
Response.Write("<td>")
|
| - |
|
276 |
Response.Write("<img src=""" & sDmStsAge & """ width=14 height=13 border=0 vspace=0 hspace=0 " & "title='" & sDmStsAgeTip & "'" & ">")
|
| - |
|
277 |
Response.Write("</td>")
|
| - |
|
278 |
End If
|
| - |
|
279 |
|
| 240 |
Response.Write("</tr>")
|
280 |
Response.Write("</tr>")
|
| 241 |
Response.Write("</table>")
|
281 |
Response.Write("</table>")
|
| 242 |
Response.Write("</td>")
|
282 |
Response.Write("</td>")
|
| 243 |
Response.Write("</tr>")
|
283 |
Response.Write("</tr>")
|
| 244 |
Response.Write("</table>")
|
284 |
Response.Write("</table>")
|