| Line 22... |
Line 22... |
| 22 |
<%
|
22 |
<%
|
| 23 |
' Set rfile parameter. This is a return page after Login
|
23 |
' Set rfile parameter. This is a return page after Login
|
| 24 |
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
|
24 |
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
|
| 25 |
objPMod.PersistInQryString("proj_id")
|
25 |
objPMod.PersistInQryString("proj_id")
|
| 26 |
'------------ ACCESS CONTROL ------------------
|
26 |
'------------ ACCESS CONTROL ------------------
|
| - |
|
27 |
'Let users view the build status without being logged in, but as soon as they try and submit the form, check
|
| - |
|
28 |
'their login status.
|
| - |
|
29 |
If Request("action") <> "" AND NOT objAccessControl.UserLogedIn Then%>
|
| - |
|
30 |
<!--#include file="_access_control_login.asp"-->
|
| - |
|
31 |
<!--#include file="_access_control_project.asp"-->
|
| 27 |
%>
|
32 |
<%End If%>
|
| 28 |
<!--#include file="_access_control_general.asp"-->
|
33 |
<!--#include file="_access_control_general.asp"-->
|
| 29 |
<%
|
34 |
<%
|
| 30 |
'------------ Variable Definition -------------
|
35 |
'------------ Variable Definition -------------
|
| 31 |
Dim objSortHelper
|
36 |
Dim objSortHelper
|
| 32 |
Dim rsQry
|
37 |
Dim rsQry
|
| 33 |
Dim parRtagId
|
38 |
Dim parRtagId
|
| 34 |
Dim parSourceRtagId
|
39 |
Dim parSourceRtagId
|
| 35 |
Dim query_string
|
40 |
Dim query_string
|
| 36 |
Dim objBtnControl
|
41 |
Dim objBtnControl
|
| 37 |
Dim rcon_id
|
42 |
Dim rcon_id
|
| 38 |
'------------ Constants Declaration -----------
|
43 |
'------------ Constants Declaration -----------
|
| 39 |
'------------ Variable Init -------------------
|
44 |
'------------ Variable Init -------------------
|
| 40 |
parRtagId = Request("rtag_id")
|
45 |
parRtagId = Request("rtag_id")
|
| 41 |
objPMod.PersistInQryString("rtag_id")
|
46 |
objPMod.PersistInQryString("rtag_id")
|
| 42 |
Set objBtnControl = New ActionButtonControl
|
47 |
Set objBtnControl = New ActionButtonControl
|
| 43 |
'----------------------------------------------
|
48 |
'----------------------------------------------
|
| 44 |
%>
|
49 |
%>
|
| 45 |
<%
|
50 |
<%
|
| 46 |
'--------------------------------------------------------------------------------------------------------------------------
|
51 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 47 |
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
|
52 |
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
|
| 48 |
Dim rsQry, query
|
53 |
Dim rsQry, query
|
| 49 |
OraDatabase.Parameters.Add "RTAG_ID", parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
54 |
OraDatabase.Parameters.Add "RTAG_ID", parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 50 |
query = _
|
55 |
query = _
|
| 51 |
" SELECT * "&_
|
56 |
" SELECT * "&_
|
| 52 |
" FROM RELEASE_TAGS rt"&_
|
57 |
" FROM RELEASE_TAGS rt"&_
|
| 53 |
" WHERE rt.RTAG_ID = :RTAG_ID"
|
58 |
" WHERE rt.RTAG_ID = :RTAG_ID"
|
| 54 |
|
59 |
|
| 55 |
Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
60 |
Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
| 56 |
|
61 |
|
| 57 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
62 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 58 |
|
63 |
|
| 59 |
If rsQry.RecordCount > 0 Then
|
64 |
If rsQry.RecordCount > 0 Then
|
| 60 |
outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
|
65 |
outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
|
| 61 |
outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
|
66 |
outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
|
| 62 |
Else
|
67 |
Else
|
| 63 |
Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
|
68 |
Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
|
| 64 |
End If
|
69 |
End If
|
| 65 |
|
70 |
|
| 66 |
rsQry.Close
|
71 |
rsQry.Close
|
| 67 |
Set rsQry = Nothing
|
72 |
Set rsQry = Nothing
|
| 68 |
End Sub
|
73 |
End Sub
|
| 69 |
'--------------------------------------------------------------------------------------------------------------------------
|
74 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 70 |
Sub RipplePackage (flag)
|
75 |
Sub RipplePackage (flag)
|
| 71 |
|
76 |
|
| 72 |
On Error Resume Next
|
77 |
On Error Resume Next
|
| 73 |
objEH.ErrorRedirect = TRUE
|
78 |
objEH.ErrorRedirect = TRUE
|
| 74 |
OraDatabase.Parameters.Add "PV_ID_LIST", Request("pv_id_list"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
79 |
OraDatabase.Parameters.Add "PV_ID_LIST", Request("pv_id_list"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 75 |
OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
80 |
OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 76 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
81 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 77 |
|
82 |
|
| 78 |
objEH.TryORA ( OraSession )
|
83 |
objEH.TryORA ( OraSession )
|
| 79 |
|
84 |
|
| 80 |
If flag Then
|
85 |
If flag Then
|
| 81 |
OraDatabase.ExecuteSQL _
|
86 |
OraDatabase.ExecuteSQL _
|
| 82 |
"BEGIN Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID ); END;"
|
87 |
"BEGIN Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID ); END;"
|
| 83 |
Else
|
88 |
Else
|
| 84 |
OraDatabase.ExecuteSQL _
|
89 |
OraDatabase.ExecuteSQL _
|
| 85 |
"BEGIN UnRipple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID ); END;"
|
90 |
"BEGIN UnRipple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID ); END;"
|
| 86 |
End If
|
91 |
End If
|
| 87 |
|
92 |
|
| 88 |
objEH.CatchORA ( OraSession )
|
93 |
objEH.CatchORA ( OraSession )
|
| 89 |
|
94 |
|
| 90 |
OraDatabase.Parameters.Remove "PV_ID_LIST"
|
95 |
OraDatabase.Parameters.Remove "PV_ID_LIST"
|
| 91 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
96 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 92 |
OraDatabase.Parameters.Remove "USER_ID"
|
97 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 93 |
|
98 |
|
| 94 |
End Sub
|
99 |
End Sub
|
| 95 |
'--------------------------------------------------------------------------------------------------------------------------
|
100 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 96 |
Function Get_Daemon_Mode( cMode )
|
101 |
Function Get_Daemon_Mode( cMode )
|
| 97 |
|
102 |
|
| Line 106... |
Line 111... |
| 106 |
Function Get_Run_Level( nLevel, indefinitePause )
|
111 |
Function Get_Run_Level( nLevel, indefinitePause )
|
| 107 |
|
112 |
|
| 108 |
If indefinitePause Then
|
113 |
If indefinitePause Then
|
| 109 |
Get_Run_Level = "<span class='err_alert'>Stopped</span>"
|
114 |
Get_Run_Level = "<span class='err_alert'>Stopped</span>"
|
| 110 |
Else
|
115 |
Else
|
| 111 |
If nLevel <= 1 Then
|
116 |
If nLevel = 1 Then
|
| 112 |
Get_Run_Level = "Cannot Continue"
|
117 |
Get_Run_Level = "Cannot Continue"
|
| 113 |
ElseIf nLevel = 2 Then
|
118 |
ElseIf nLevel = 2 Then
|
| 114 |
Get_Run_Level = "Paused"
|
119 |
Get_Run_Level = "Paused"
|
| 115 |
ElseIf nLevel = 3 Then
|
120 |
ElseIf nLevel = 3 Then
|
| 116 |
Get_Run_Level = "Actively engaged in a build"
|
121 |
Get_Run_Level = "Actively engaged in a build"
|
| 117 |
ElseIf nLevel = 4 Then
|
122 |
ElseIf nLevel = 4 Then
|
| 118 |
Get_Run_Level = "Idle"
|
123 |
Get_Run_Level = "Idle"
|
| 119 |
ElseIf nLevel >= 5 Then
|
124 |
ElseIf nLevel = 5 Then
|
| 120 |
Get_Run_Level = "Waiting"
|
125 |
Get_Run_Level = "Waiting"
|
| 121 |
Else
|
126 |
Else
|
| 122 |
Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
|
127 |
Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
|
| 123 |
End If
|
128 |
End If
|
| 124 |
End If
|
129 |
End If
|
| Line 146... |
Line 151... |
| 146 |
|
151 |
|
| 147 |
' --- Enter Form Validation Rule Changes here... ----
|
152 |
' --- Enter Form Validation Rule Changes here... ----
|
| 148 |
'----------------------------------------------------
|
153 |
'----------------------------------------------------
|
| 149 |
|
154 |
|
| 150 |
' --- RUN onPostBack ---
|
155 |
' --- RUN onPostBack ---
|
| 151 |
If Request("action") <> "" Then
|
156 |
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
|
| 152 |
|
157 |
|
| 153 |
If objEH.Finally Then
|
158 |
If objEH.Finally Then
|
| 154 |
If Request("action") = "include" Then
|
159 |
If Request("action") = "include" Then
|
| 155 |
Call RipplePackage (True)
|
160 |
Call RipplePackage (True)
|
| 156 |
Else
|
161 |
Else
|
| Line 402... |
Line 407... |
| 402 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
|
407 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
|
| 403 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
|
408 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
|
| 404 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Switch State</td>
|
409 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Switch State</td>
|
| 405 |
</tr>
|
410 |
</tr>
|
| 406 |
<%
|
411 |
<%
|
| - |
|
412 |
' Get the number of release configurations for this RTAG_ID, and iterate through them
|
| 407 |
query_string = " select * from release_config rc, run_level rl, packages pkg, gbe_machtype gm"&_
|
413 |
query_string = " select * from release_config rc, gbe_machtype gm"&_
|
| 408 |
" where rc.rtag_id = "& parRtagId &_
|
414 |
" where rc.rtag_id = "& parRtagId &_
|
| 409 |
" and rc.rcon_id = rl.rcon_id(+)"&_
|
- |
|
| 410 |
" and pkg.pkg_id(+) = rl.current_pkg_id_being_built"&_
|
- |
|
| 411 |
" and gm.gbe_id = rc.gbe_id"&_
|
415 |
" and gm.gbe_id = rc.gbe_id"&_
|
| 412 |
" order by rc.daemon_hostname"
|
416 |
" order by rc.daemon_hostname"
|
| - |
|
417 |
|
| 413 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
418 |
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
| 414 |
'--- Render rows ---
|
- |
|
| - |
|
419 |
|
| 415 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
420 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| 416 |
rcon_id = rsQry("rcon_id")
|
421 |
rcon_id = rsQry("rcon_id")
|
| - |
|
422 |
|
| - |
|
423 |
Dim pkgName
|
| - |
|
424 |
Dim currentRunLevel
|
| - |
|
425 |
|
| - |
|
426 |
' For this release configuration, get its entry from the run_level table. This table may not
|
| - |
|
427 |
' have an entry so we must handle that outcome too.
|
| - |
|
428 |
query_string = " select * from run_level rl"&_
|
| - |
|
429 |
" where rl.rcon_id = "& rcon_id
|
| - |
|
430 |
|
| - |
|
431 |
Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
| - |
|
432 |
|
| - |
|
433 |
currentRunLevel = -1
|
| - |
|
434 |
If (rsQry2.RecordCount > 0) Then
|
| - |
|
435 |
' Get the run level from the run_level table
|
| - |
|
436 |
currentRunLevel = rsQry2("current_run_level")
|
| - |
|
437 |
End If
|
| - |
|
438 |
|
| - |
|
439 |
' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
|
| - |
|
440 |
' package name from the packages table
|
| - |
|
441 |
Dim rsQry3
|
| - |
|
442 |
pkgName = NULL
|
| - |
|
443 |
If (rsQry2.RecordCount > 0) AND NOT IsNull(rsQry2("current_pkg_id_being_built")) Then
|
| - |
|
444 |
|
| - |
|
445 |
query_string = " select pkg_name from run_level rl, packages pk"&_
|
| - |
|
446 |
" where rl.rcon_id = "& rcon_id &_
|
| - |
|
447 |
" and rl.current_pkg_id_being_built = pk.pkg_id"
|
| - |
|
448 |
|
| - |
|
449 |
Set rsQry3 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
|
| - |
|
450 |
If (rsQry3.RecordCount > 0) Then
|
| - |
|
451 |
pkgName = rsQry3("pkg_name")
|
| - |
|
452 |
End If
|
| - |
|
453 |
rsQry3.Close()
|
| - |
|
454 |
Set rsQry3 = nothing
|
| - |
|
455 |
End If
|
| - |
|
456 |
|
| - |
|
457 |
' --- Now render HTML for this release configuration ---
|
| 417 |
%>
|
458 |
%>
|
| 418 |
<tr>
|
459 |
<tr>
|
| 419 |
<td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
460 |
<td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
| 420 |
</tr>
|
461 |
</tr>
|
| 421 |
<tr>
|
462 |
<tr>
|
| 422 |
<td nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
|
463 |
<td nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
|
| 423 |
<td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
|
464 |
<td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
|
| 424 |
<td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
|
465 |
<td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
|
| 425 |
<td nowrap class="body_rowg"><%=Get_Run_Level(rsQry("current_run_level"), indefinitelyPaused)%></td>
|
466 |
<td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused)%></td>
|
| 426 |
<td nowrap class="body_rowg"><%=Get_Package_Name(rsQry("pkg_name"))%></td>
|
467 |
<td nowrap class="body_rowg"><%=Get_Package_Name(pkgName)%></td>
|
| 427 |
<td nowrap class="body_rowg">
|
468 |
<td nowrap class="body_rowg">
|
| 428 |
<%
|
469 |
<%
|
| 429 |
If NOT IsNull(rsQry("current_run_level")) AND NOT indefinitelyPaused Then
|
470 |
If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused Then
|
| 430 |
If objAccessControl.UserLogedIn Then
|
471 |
If objAccessControl.UserLogedIn Then
|
| 431 |
If IsNull(rsQry("pause")) Then
|
472 |
If IsNull(rsQry2("pause")) Then
|
| 432 |
Call Action_Buttons ( "Daemon Pause" )
|
473 |
Call Action_Buttons ( "Daemon Pause" )
|
| 433 |
Else
|
474 |
Else
|
| 434 |
Call Action_Buttons ( "Daemon Resume" )
|
475 |
Call Action_Buttons ( "Daemon Resume" )
|
| 435 |
End If
|
476 |
End If
|
| 436 |
Else
|
477 |
Else
|
| 437 |
If IsNull(rsQry("pause")) Then
|
478 |
If IsNull(rsQry2("pause")) Then
|
| 438 |
Call Action_Buttons ( "Daemon Pause Disabled" )
|
479 |
Call Action_Buttons ( "Daemon Pause Disabled" )
|
| 439 |
Else
|
480 |
Else
|
| 440 |
Call Action_Buttons ( "Daemon Resume Disabled" )
|
481 |
Call Action_Buttons ( "Daemon Resume Disabled" )
|
| 441 |
End If
|
482 |
End If
|
| 442 |
End If
|
483 |
End If
|
| Line 445... |
Line 486... |
| 445 |
End If
|
486 |
End If
|
| 446 |
%>
|
487 |
%>
|
| 447 |
</td>
|
488 |
</td>
|
| 448 |
</tr>
|
489 |
</tr>
|
| 449 |
<%
|
490 |
<%
|
| - |
|
491 |
rsQry2.Close()
|
| - |
|
492 |
Set rsQry2 = nothing
|
| - |
|
493 |
|
| - |
|
494 |
|
| 450 |
rsQry.MoveNext
|
495 |
rsQry.MoveNext
|
| 451 |
Loop
|
496 |
Loop
|
| 452 |
rsQry.Close()
|
497 |
rsQry.Close()
|
| 453 |
Set rsQry = nothing
|
498 |
Set rsQry = nothing
|
| - |
|
499 |
|
| - |
|
500 |
|
| 454 |
%>
|
501 |
%>
|
| 455 |
</table>
|
502 |
</table>
|
| 456 |
</td>
|
503 |
</td>
|
| 457 |
<td background="images/lbox_bgside_white.gif"> </td>
|
504 |
<td background="images/lbox_bgside_white.gif"> </td>
|
| 458 |
</tr>
|
505 |
</tr>
|