| Line 18... |
Line 18... |
| 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 |
<!--#include file="_action_buttons.asp"-->
|
20 |
<!--#include file="_action_buttons.asp"-->
|
| 21 |
<!--#include file="class/classActionButtonControl.asp"-->
|
21 |
<!--#include file="class/classActionButtonControl.asp"-->
|
| 22 |
<!--#include file="common/daemon_instructions.asp"-->
|
22 |
<!--#include file="common/daemon_instructions.asp"-->
|
| - |
|
23 |
<!--#include file="common/common_daemon.asp"-->
|
| 23 |
<% '------------ ACCESS CONTROL ------------------ %>
|
24 |
<% '------------ ACCESS CONTROL ------------------ %>
|
| 24 |
<!--#include file="_access_control_login.asp"-->
|
25 |
<!--#include file="_access_control_login.asp"-->
|
| 25 |
<!--#include file="_access_control_general.asp"-->
|
26 |
<!--#include file="_access_control_general.asp"-->
|
| 26 |
<!--#include file="_access_control_action_project.asp"-->
|
27 |
<!--#include file="_access_control_action_project.asp"-->
|
| 27 |
<% '------------ Scripts -------------------------- %>
|
28 |
<% '------------ Scripts -------------------------- %>
|
| Line 38... |
Line 39... |
| 38 |
parRtagId = Request("rtag_id")
|
39 |
parRtagId = Request("rtag_id")
|
| 39 |
objPMod.PersistInQryString("rtag_id")
|
40 |
objPMod.PersistInQryString("rtag_id")
|
| 40 |
|
41 |
|
| 41 |
'----------------------------------------------
|
42 |
'----------------------------------------------
|
| 42 |
%>
|
43 |
%>
|
| 43 |
<%
|
- |
|
| 44 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 45 |
Function PrettyDelta( delta, daemonState,pkgId )
|
- |
|
| 46 |
Dim style
|
- |
|
| 47 |
style = ""
|
- |
|
| 48 |
|
- |
|
| 49 |
If (delta > 600) AND (IsNull(pkgId) OR pkgId = "") Then
|
- |
|
| 50 |
style = "style=color:Red"
|
- |
|
| 51 |
If (delta > 86400 ) Then
|
- |
|
| 52 |
Dim bdate, dd,mm,yy
|
- |
|
| 53 |
bdate = DateAdd("s", - delta,Now())
|
- |
|
| 54 |
dd = Day(bdate)
|
- |
|
| 55 |
mm = MonthName(Month(bdate),1)
|
- |
|
| 56 |
yy = Year( bdate)
|
- |
|
| 57 |
delta = dd & "-" & mm & "-" & yy
|
- |
|
| 58 |
If ( daemonState >= 2 ) Then
|
- |
|
| 59 |
style = ""
|
- |
|
| 60 |
End If
|
- |
|
| 61 |
ElseIf ( delta > 60*60 ) Then
|
- |
|
| 62 |
'Dim bdate, hh, mins, ss
|
- |
|
| 63 |
bdate = DateAdd("s", - delta,Now())
|
- |
|
| 64 |
delta = TimeValue( bdate)
|
- |
|
| 65 |
'delta = hh & ":" & mins & ":" & ss
|
- |
|
| 66 |
End If
|
- |
|
| 67 |
End If
|
- |
|
| 68 |
|
- |
|
| 69 |
If style <> "" Then
|
- |
|
| 70 |
delta = "<span " & style & ">" & delta & "</span>"
|
- |
|
| 71 |
End If
|
- |
|
| 72 |
PrettyDelta = delta
|
- |
|
| 73 |
End Function
|
- |
|
| 74 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 75 |
Function Get_Daemon_Mode( cMode )
|
- |
|
| 76 |
|
- |
|
| 77 |
If cMode = "S" Then
|
- |
|
| 78 |
Get_Daemon_Mode = "Slave"
|
- |
|
| 79 |
ElseIf cMode = "M" Then
|
- |
|
| 80 |
Get_Daemon_Mode = "Master"
|
- |
|
| 81 |
End If
|
- |
|
| 82 |
|
- |
|
| 83 |
End Function
|
- |
|
| 84 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 85 |
Function Get_Run_Level( nLevel, indefinitePause, astate)
|
- |
|
| 86 |
|
- |
|
| 87 |
If indefinitePause Then
|
- |
|
| 88 |
Get_Run_Level = "<span class='err_alert'>Stopped</span>"
|
- |
|
| 89 |
ElseIf astate = 1 Then ' if build daemon paused
|
- |
|
| 90 |
Get_Run_Level = "Paused"
|
- |
|
| 91 |
ElseIf astate = 2 Then ' if build daemon disabled
|
- |
|
| 92 |
Get_Run_Level = "Disabled"
|
- |
|
| 93 |
ElseIf astate = 0 Then ' if build daemon enabled
|
- |
|
| 94 |
If nLevel = 1 Then
|
- |
|
| 95 |
Get_Run_Level = "Cannot Continue"
|
- |
|
| 96 |
ElseIf nLevel = 2 Then
|
- |
|
| 97 |
Get_Run_Level = "Paused"
|
- |
|
| 98 |
ElseIf nLevel = 3 Then
|
- |
|
| 99 |
Get_Run_Level = "Building"
|
- |
|
| 100 |
ElseIf nLevel = 4 Then
|
- |
|
| 101 |
Get_Run_Level = "Idle"
|
- |
|
| 102 |
ElseIf nLevel = 5 Then
|
- |
|
| 103 |
Get_Run_Level = "Waiting"
|
- |
|
| 104 |
ElseIf nLevel = 6 Then
|
- |
|
| 105 |
Get_Run_Level = "Publishing"
|
- |
|
| 106 |
Else
|
- |
|
| 107 |
Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
|
- |
|
| 108 |
End If
|
- |
|
| 109 |
End If
|
- |
|
| 110 |
|
- |
|
| 111 |
End Function
|
- |
|
| 112 |
|
- |
|
| 113 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 114 |
Function Get_Package_Name( sPackageName,nRtagId,nPkgPvid )
|
- |
|
| 115 |
|
- |
|
| 116 |
If IsNull(sPackageName) Then
|
- |
|
| 117 |
Get_Package_Name = "None"
|
- |
|
| 118 |
ElseIf IsNull(nPkgPvid) or nPkgPvid <= 0 Then
|
- |
|
| 119 |
Get_Package_Name = sPackageName
|
- |
|
| 120 |
Else
|
- |
|
| 121 |
Get_Package_Name = "<a class=""txt_linked"" href=""dependencies.asp?pv_id=" + nPkgPvid + "&rtag_id=" + nRtagId + """>" + sPackageName + "</a>"
|
- |
|
| 122 |
End If
|
- |
|
| 123 |
|
- |
|
| 124 |
End Function
|
- |
|
| 125 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 126 |
Function GetLastBuildAge( rtagid)
|
- |
|
| 127 |
Dim query_string, rsQry
|
- |
|
| 128 |
query_string = "SELECT TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) as delta," &_
|
- |
|
| 129 |
" TO_CHAR(rl.LAST_BUILD, 'DD-Mon-YYYY') as last_build," &_
|
- |
|
| 130 |
" TO_CHAR(rl.LAST_BUILD, 'HH:MI:SS PM') as last_build_hours," &_
|
- |
|
| 131 |
" TRUNC (SYSDATE - rl.LAST_BUILD) as last_build_days" &_
|
- |
|
| 132 |
" FROM RELEASE_CONFIG rc, RUN_LEVEL rl, BUILD_MACHINE_CONFIG bm " &_
|
- |
|
| 133 |
" WHERE rc.RTAG_ID =" &rtagid &_
|
- |
|
| 134 |
" AND rc.bmcon_id is not null" &_
|
- |
|
| 135 |
" AND rl.RCON_ID = rc.RCON_ID" &_
|
- |
|
| 136 |
" AND rc.bmcon_id = bm.bmcon_id(+)"
|
- |
|
| 137 |
|
- |
|
| 138 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
- |
|
| 139 |
If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
|
- |
|
| 140 |
Dim delta, last_build, last_build_time, last_build_days
|
- |
|
| 141 |
If IsNull(rsQry("delta")) Then
|
- |
|
| 142 |
delta = 0
|
- |
|
| 143 |
Else
|
- |
|
| 144 |
delta = CLng(rsQry("delta"))
|
- |
|
| 145 |
End If
|
- |
|
| 146 |
last_build = rsQry("last_build")
|
- |
|
| 147 |
last_build_time = rsQry("last_build_hours")
|
- |
|
| 148 |
last_build_days = rsQry("last_build_days")
|
- |
|
| 149 |
If delta < (60*60*24) Then
|
- |
|
| 150 |
GetLastBuildAge = last_build_time
|
- |
|
| 151 |
Else
|
- |
|
| 152 |
GetLastBuildAge = last_build
|
- |
|
| 153 |
End If
|
- |
|
| 154 |
End If
|
- |
|
| 155 |
rsQry.Close()
|
- |
|
| 156 |
Set rsQry = nothing
|
- |
|
| 157 |
|
- |
|
| 158 |
End Function
|
- |
|
| 159 |
|
- |
|
| 160 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 161 |
Function GetModifiedSeqNo( rtagid)
|
- |
|
| 162 |
Dim query_string, rsQry
|
- |
|
| 163 |
query_string = "SELECT SEQNUM FROM RELEASE_MODIFIED WHERE RTAG_ID = " & rtagid
|
- |
|
| 164 |
|
- |
|
| 165 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
- |
|
| 166 |
If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
|
- |
|
| 167 |
GetModifiedSeqNo = rsQry("SEQNUM")
|
- |
|
| 168 |
Else
|
- |
|
| 169 |
GetModifiedSeqNo = "-"
|
- |
|
| 170 |
End If
|
- |
|
| 171 |
rsQry.Close()
|
- |
|
| 172 |
Set rsQry = nothing
|
- |
|
| 173 |
|
- |
|
| 174 |
End Function
|
- |
|
| 175 |
'--------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 176 |
'------------ RUN BEFORE PAGE RENDER ----------
|
- |
|
| 177 |
%>
|
- |
|
| 178 |
<html>
|
44 |
<html>
|
| 179 |
<head>
|
45 |
<head>
|
| 180 |
<title>Release Manager</title>
|
46 |
<title>Release Manager</title>
|
| 181 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
47 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
| 182 |
<meta http-equiv="Pragma" content="no-cache">
|
48 |
<meta http-equiv="Pragma" content="no-cache">
|
| Line 253... |
Line 119... |
| 253 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
119 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 254 |
<br>
|
120 |
<br>
|
| 255 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
121 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
| 256 |
<%
|
122 |
<%
|
| 257 |
Dim indefinitelyPaused
|
123 |
Dim indefinitelyPaused
|
| 258 |
indefinitelyPaused = FALSE
|
124 |
indefinitelyPaused = Indefinitely_Paused()
|
| 259 |
' Insert a warning into the page if the build daemons are indefintely paused.
|
125 |
' Insert a warning into the page if the build daemons are indefintely paused.
|
| 260 |
query_string = " select * from run_level_schedule rls where rls.indefinite_pause = 'P'"
|
- |
|
| 261 |
|
- |
|
| 262 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
- |
|
| 263 |
If rsQry.RecordCount > 0 Then
|
- |
|
| 264 |
indefinitelyPaused = TRUE %>
|
126 |
If indefinitelyPaused Then %>
|
| 265 |
<tr>
|
127 |
<tr>
|
| 266 |
<span class='err_alert'>
|
128 |
<span class='err_alert'>
|
| 267 |
<font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
|
129 |
<font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
|
| 268 |
</span>
|
130 |
</span>
|
| 269 |
</tr>
|
131 |
</tr>
|
| 270 |
<%End If
|
132 |
<%End If
|
| 271 |
|
- |
|
| 272 |
rsQry.Close()
|
- |
|
| 273 |
Set rsQry = nothing
|
- |
|
| 274 |
%>
|
133 |
%>
|
| 275 |
<td width="9%" valign="top"></td>
|
134 |
<td width="9%" valign="top"></td>
|
| 276 |
<tr>
|
135 |
<tr>
|
| 277 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Daemon Host</td>
|
136 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Daemon Host</td>
|
| 278 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Machine Type</td>
|
137 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Machine Type</td>
|
| Line 360... |
Line 219... |
| 360 |
<td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid)%></td>
|
219 |
<td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid)%></td>
|
| 361 |
<td nowrap class="body_rowg"><%=PrettyDelta(delta, daemonState,pkgName )%></td>
|
220 |
<td nowrap class="body_rowg"><%=PrettyDelta(delta, daemonState,pkgName )%></td>
|
| 362 |
<td nowrap class="body_rowg">
|
221 |
<td nowrap class="body_rowg">
|
| 363 |
<%
|
222 |
<%
|
| 364 |
If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused Then
|
223 |
If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused Then
|
| 365 |
If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
|
224 |
If canActionControlInProject("BuildControl") Then
|
| 366 |
If daemonState = 0 Then
|
225 |
If daemonState = 0 Then
|
| 367 |
Call Action_Buttons ( "Daemon Pause" )
|
226 |
Call Action_Buttons ( "Daemon Pause" )
|
| 368 |
ElseIf daemonState = 1 Then
|
227 |
ElseIf daemonState = 1 Then
|
| 369 |
Call Action_Buttons ( "Daemon Resume" )
|
228 |
Call Action_Buttons ( "Daemon Resume" )
|
| 370 |
ElseIf daemonState = 2 Then
|
229 |
ElseIf daemonState = 2 Then
|
| Line 394... |
Line 253... |
| 394 |
Set rsQry2 = nothing
|
253 |
Set rsQry2 = nothing
|
| 395 |
rsQry.MoveNext
|
254 |
rsQry.MoveNext
|
| 396 |
Loop
|
255 |
Loop
|
| 397 |
%>
|
256 |
%>
|
| 398 |
<tr>
|
257 |
<tr>
|
| 399 |
<td valign="bottom" background="images/bg_table_col.gif" class="body_col"></td>
|
258 |
<td nowrap background="images/bg_table_col.gif" class="body_col" colspan=6>
|
| 400 |
<td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
|
259 |
<%If CheckConfigErrors(parRtagId) Then%><span class="err_alert"> Daemon configuration errors detected</span>
|
| 401 |
<td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
|
260 |
<a class="txt_linked" href="release_config.asp?rtag_id=<%=parRtagId%>">
|
| 402 |
<td valign="bottom" background="images/bg_table_col.gif" class="body_col"></td>
|
261 |
<img src="images/i_link.gif" hspace="2" border="0" align="absmiddle" title="Goto Configuration">
|
| 403 |
<td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
|
262 |
</a>
|
| 404 |
<td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
|
263 |
<%End If%>
|
| - |
|
264 |
</td>
|
| 405 |
<td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col">
|
265 |
<td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col">
|
| 406 |
<%
|
266 |
<%
|
| 407 |
If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
|
267 |
If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
|
| 408 |
If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
|
268 |
If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
|
| 409 |
Call Action_Buttons ( "Daemon Control All" )
|
269 |
Call Action_Buttons ( "Daemon Control All" )
|