Subversion Repositories DevTools

Rev

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

Rev 163 Rev 171
Line 107... Line 107...
107
      Get_Daemon_Mode = "Master"
107
      Get_Daemon_Mode = "Master"
108
   End If
108
   End If
109
 
109
 
110
End Function
110
End Function
111
'--------------------------------------------------------------------------------------------------------------------------
111
'--------------------------------------------------------------------------------------------------------------------------
112
Function Get_Run_Level( nLevel, indefinitePause )
112
Function Get_Run_Level( nLevel, indefinitePause, astate)
113
 
113
 
114
   If indefinitePause Then
114
   If indefinitePause Then
115
      Get_Run_Level = "<span class='err_alert'>Stopped</span>"
115
      Get_Run_Level = "<span class='err_alert'>Stopped</span>"
-
 
116
   ElseIf astate = 1 Then      ' if build daemon paused
116
   Else
117
      Get_Run_Level = "Paused"
-
 
118
   ElseIf astate = 2 Then      ' if build daemon disabled
-
 
119
      Get_Run_Level = "Disabled"
-
 
120
   ElseIf IsNull(astate) Then  ' if build daemon enabled
117
      If nLevel = 1 Then
121
      If nLevel = 1 Then
118
         Get_Run_Level = "Cannot Continue"
122
         Get_Run_Level = "Cannot Continue"
119
      ElseIf nLevel = 2 Then
123
      ElseIf nLevel = 2 Then
120
         Get_Run_Level = "Paused"
124
         Get_Run_Level = "Paused"
121
      ElseIf nLevel = 3 Then
125
      ElseIf nLevel = 3 Then
Line 431... Line 435...
431
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
435
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
432
                              rcon_id = rsQry("rcon_id")
436
                              rcon_id = rsQry("rcon_id")
433
 
437
 
434
                              Dim pkgName
438
                              Dim pkgName
435
                              Dim currentRunLevel
439
                              Dim currentRunLevel
-
 
440
                              Dim daemonState
-
 
441
                              Dim delta
436
 
442
 
437
                              ' For this release configuration, get its entry from the run_level table. This table may not
443
                              ' For this release configuration, get its entry from the run_level table. This table may not
438
                              ' have an entry so we must handle that outcome too.
444
                              ' have an entry so we must handle that outcome too.
439
                              query_string = " select rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, "&_
445
                              query_string = " select rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, "&_
440
                                             "        TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
446
                                             "        TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
Line 447... Line 453...
447
                              If (rsQry2.RecordCount > 0) Then
453
                              If (rsQry2.RecordCount > 0) Then
448
                                 ' Get the run level from the run_level table
454
                                 ' Get the run level from the run_level table
449
                                 currentRunLevel = rsQry2("current_run_level")
455
                                 currentRunLevel = rsQry2("current_run_level")
450
                              End If
456
                              End If
451
 
457
 
-
 
458
                              daemonState = NULL
-
 
459
                              If (rsQry2.RecordCount > 0) Then                                
-
 
460
                                daemonState = rsQry2("pause")
-
 
461
                              End If
-
 
462
 
-
 
463
                              delta = NULL
-
 
464
                              If (rsQry2.RecordCount > 0) Then
-
 
465
                                delta = rsQry2("delta")
-
 
466
                              End If
-
 
467
 
452
                              ' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
468
                              ' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
453
                              ' package name from the packages table
469
                              ' package name from the packages table
454
                              Dim rsQry3
470
                              Dim rsQry3
455
                              pkgName = NULL
471
                              pkgName = NULL
456
                              If (rsQry2.RecordCount > 0) AND NOT IsNull(rsQry2("current_pkg_id_being_built")) Then
472
                              If (rsQry2.RecordCount > 0) AND NOT IsNull(rsQry2("current_pkg_id_being_built")) Then
Line 474... Line 490...
474
                              </tr>
490
                              </tr>
475
                              <tr>
491
                              <tr>
476
                                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
492
                                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
477
                                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
493
                                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
478
                                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
494
                                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
479
                                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused)%></td>
495
                                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused,daemonState)%></td>
480
                                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName)%></td>
496
                                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName)%></td>
481
                                 <td nowrap class="body_rowg"><%=rsQry2("delta")%></td>
497
                                 <td nowrap class="body_rowg"><%=delta%></td>
482
                                 <td nowrap class="body_rowg">
498
                                 <td nowrap class="body_rowg">
483
                                    <%
499
                                    <%
484
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
500
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
485
                                       If objAccessControl.UserLogedIn Then
501
                                       If objAccessControl.UserLogedIn Then
486
                                          If IsNull(rsQry2("pause")) Then
502
                                          If IsNull(daemonState) Then
487
                                             Call Action_Buttons ( "Daemon Pause" )
503
                                             Call Action_Buttons ( "Daemon Pause" )
-
 
504
                                          ElseIf daemonState = 1 Then
-
 
505
                                             Call Action_Buttons ( "Daemon Resume" )
-
 
506
                                          ElseIf daemonState = 2 Then
-
 
507
                                             Call Action_Buttons ( "Daemon Start" )
488
                                          Else
508
                                          Else
489
                                             Call Action_Buttons ( "Daemon Resume" )
509
                                             Call Action_Buttons ( "Daemon Resume" )
490
                                          End If
510
                                          End If
491
                                       Else
511
                                       Else
492
                                          If IsNull(rsQry2("pause")) Then
512
                                          If IsNull(daemonState) Then
493
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
513
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
-
 
514
                                          ElseIf daemonState = 1 Then
-
 
515
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
-
 
516
                                          ElseIf daemonState = 2 Then
-
 
517
                                             Call Action_Buttons ( "Daemon Start Disabled" )
494
                                          Else
518
                                          Else
495
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
519
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
496
                                          End If
520
                                          End If
497
                                       End If
521
                                       End If
498
                                    Else
522
                                    Else
Line 502... Line 526...
502
                                 </td>
526
                                 </td>
503
                              </tr>
527
                              </tr>
504
                              <%
528
                              <%
505
                              rsQry2.Close()
529
                              rsQry2.Close()
506
                              Set rsQry2 = nothing
530
                              Set rsQry2 = nothing
507
 
-
 
508
 
-
 
509
                              rsQry.MoveNext
531
                              rsQry.MoveNext
510
                           Loop
532
                           Loop
-
 
533
                           %>
-
 
534
                           <tr>
-
 
535
                             <td valign="bottom" background="images/bg_table_col.gif" class="body_col"></td>
-
 
536
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
-
 
537
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
-
 
538
                             <td valign="bottom" background="images/bg_table_col.gif" class="body_col"></td>
-
 
539
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
-
 
540
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
-
 
541
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col">
-
 
542
                             <%
-
 
543
                               If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused  Then
-
 
544
                                 If objAccessControl.UserLogedIn Then
-
 
545
                                   Call Action_Buttons ( "Daemon Control All" )
-
 
546
                                 Else 
-
 
547
                                   Call Action_Buttons ( "Daemon Control All Disabled" )
-
 
548
                                 End If
-
 
549
                               Else
-
 
550
                                 %>&nbsp<%
-
 
551
                               End If
-
 
552
                             %>
-
 
553
                             </td>
-
 
554
                           </tr>
-
 
555
                           <%
511
                           rsQry.Close()
556
                             rsQry.Close()
512
                           Set rsQry = nothing
557
                             Set rsQry = nothing
513
 
-
 
514
 
-
 
515
                           %>
558
                           %>
516
                        </table>
559
                        </table>
517
                     </td>
560
                     </td>
518
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
561
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
519
                  </tr>
562
                  </tr>