Subversion Repositories DevTools

Rev

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

Rev 4477 Rev 4482
Line 28... Line 28...
28
Dim query_string
28
Dim query_string
29
Dim styleAlt1
29
Dim styleAlt1
30
Dim styleAlt2
30
Dim styleAlt2
31
Dim styleNow
31
Dim styleNow
32
Dim param_refreshPeriod
32
Dim param_refreshPeriod
-
 
33
Dim param_inactivity
33
Dim param_refreshEnabled
34
Dim param_refreshEnabled
34
Dim bIndefinitelyPaused
35
Dim bIndefinitelyPaused
35
'------------ Constants Declaration -----------
36
'------------ Constants Declaration -----------
36
Const Min_Refresh_Time = 10         ' Seconds
37
Const Min_Refresh_Time = 10         ' Seconds
37
Const Max_Delta = 600               ' Seconds
38
Const Max_Delta = 600               ' Seconds
Line 330... Line 331...
330
         param_refreshEnabled = False
331
         param_refreshEnabled = False
331
      End If
332
      End If
332
   End If
333
   End If
333
End If
334
End If
334
 
335
 
-
 
336
' Read the Inactivity Period
-
 
337
param_inactivity = NiceInt( Request("Inactivity"), Max_DeltaBuild)
-
 
338
If param_inactivity  = 0 Then param_inactivity = Max_DeltaBuild
-
 
339
 
-
 
340
 
335
' Get indefinite pause status
341
' Get indefinite pause status
336
bIndefinitelyPaused = Indefinitely_Paused()
342
bIndefinitelyPaused = Indefinitely_Paused()
337
 
343
 
338
'----------------------------------------------
344
'----------------------------------------------
339
%>
345
%>
Line 559... Line 565...
559
   if (document.getElementById('autoRefresh').checked)
565
   if (document.getElementById('autoRefresh').checked)
560
      new_url_query_string += ',ON';
566
      new_url_query_string += ',ON';
561
   else
567
   else
562
      new_url_query_string += ',OFF';
568
      new_url_query_string += ',OFF';
563
 
569
 
-
 
570
   // reload the page with the new query string
-
 
571
   var url = location.pathname + new_url_query_string;
-
 
572
   window.location.assign(url);
-
 
573
}
-
 
574
 
-
 
575
 
-
 
576
//////////////////////////////////////////////////////////////////////////////////////////////////
-
 
577
// This function rebuilds the query string to Update the Inactivity parameter
-
 
578
//////////////////////////////////////////////////////////////////////////////////////////////////
-
 
579
function toggle_inactivity()
-
 
580
{
-
 
581
   var new_url_query_string = '';
-
 
582
 
-
 
583
   // get the full query string
-
 
584
   var url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';
-
 
585
 
-
 
586
   // split it into each parameter, then remove the Inactivity parameter
-
 
587
   var qs_arr = url_query_string.split('&');
-
 
588
   var qs_join = '?'
-
 
589
   var i_qs_arr;
-
 
590
   for (i_qs_arr in qs_arr)
-
 
591
   {
-
 
592
      var qs_str = qs_arr[i_qs_arr];
-
 
593
      if (qs_str.length > 0)
-
 
594
      {
-
 
595
         if (qs_str.indexOf('Inactivity') < 0)
-
 
596
         {
-
 
597
            // feed the existing paramter to the new query string
-
 
598
            new_url_query_string += qs_join + qs_str
-
 
599
            qs_join = '&'
-
 
600
         }
-
 
601
      }
-
 
602
   }
-
 
603
 
-
 
604
   var value = document.getElementById('inactivity').value;
-
 
605
   if  (value && (value != <%=Max_DeltaBuild%>))
-
 
606
   {
-
 
607
       // Prepare the new query string
-
 
608
        new_url_query_string += qs_join + 'Inactivity=' + value;
-
 
609
    }
564
 
610
 
565
   // reload the page with the new query string
611
   // reload the page with the new query string
566
   var url = location.pathname + new_url_query_string;
612
   var url = location.pathname + new_url_query_string;
567
   window.location.assign(url);
613
   window.location.assign(url);
568
}
614
}
569
 
615
 
-
 
616
 
570
//////////////////////////////////////////////////////////////////////////////////////////////////
617
//////////////////////////////////////////////////////////////////////////////////////////////////
571
// Rebuild the query string and reload the page based on the current setting of the filter
618
// Rebuild the query string and reload the page based on the current setting of the filter
572
// radio buttons
619
// radio buttons
573
//////////////////////////////////////////////////////////////////////////////////////////////////
620
//////////////////////////////////////////////////////////////////////////////////////////////////
574
function update_Display_Filter()
621
function update_Display_Filter()
Line 684... Line 731...
684
                                    <legend><a href="javascript:;" class="body_scol" >&nbsp;Monitoring&nbsp;Options</a></legend>
731
                                    <legend><a href="javascript:;" class="body_scol" >&nbsp;Monitoring&nbsp;Options</a></legend>
685
                                    <table width="100%" border="0" cellspacing="1" cellpadding="3">
732
                                    <table width="100%" border="0" cellspacing="1" cellpadding="3">
686
                                       <tr>
733
                                       <tr>
687
                                          <td valign="top" width="200px" nowrap background="images/bg_table_col.gif" class="body_col">Auto Refresh</td>
734
                                          <td valign="top" width="200px" nowrap background="images/bg_table_col.gif" class="body_col">Auto Refresh</td>
688
                                          <td valign="top" width="200px" nowrap background="images/bg_table_col.gif" class="body_col">Filter Options</td>
735
                                          <td valign="top" width="200px" nowrap background="images/bg_table_col.gif" class="body_col">Filter Options</td>
-
 
736
                                          <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Inactivity</td>
689
                                       </tr>
737
                                       </tr>
690
 
738
 
691
                                       <tr>
739
                                       <tr>
692
                                          <td class="body_rowg">
740
                                          <td class="body_rowg">
693
                                             <input name="autoRefresh" id="autoRefresh" type="checkbox" <%If param_refreshEnabled Then%>checked<%End If%> value="1" onclick='toggle_refresh()'>
741
                                             <input name="autoRefresh" id="autoRefresh" type="checkbox" <%If param_refreshEnabled Then%>checked<%End If%> value="1" onclick='toggle_refresh()'>
694
                                             <input style="width:50px" name="refreshPeriod" id="refreshPeriod" type="input" maxlength="3" value=<%=param_refreshPeriod%> onchange='toggle_refresh()' >Seconds (min. 10)
742
                                             <input style="width:3em" name="refreshPeriod" id="refreshPeriod" type="input" maxlength="3" value="<%=param_refreshPeriod%>" onchange='toggle_refresh()' > Seconds (min. 10)
695
                                          </td>
743
                                          </td>
696
                                          <td class="body_rowg">
744
                                          <td class="body_rowg">
697
                                             <input name="activeBuilds" id="activeBuilds" type="checkbox" <%=Filter_Checked("activeBuilds")%> value="activeBuilds" onclick='update_Display_Filter()'>Active
745
                                             <input name="activeBuilds" id="activeBuilds" type="checkbox" <%=Filter_Checked("activeBuilds")%> value="activeBuilds" onclick='update_Display_Filter()'>Active
698
                                             <input name="idleBuilds" id="idleBuilds" type="checkbox" <%=Filter_Checked("idleBuilds")%> value="idleBuilds" onclick='update_Display_Filter()'>Idle
746
                                             <input name="idleBuilds" id="idleBuilds" type="checkbox" <%=Filter_Checked("idleBuilds")%> value="idleBuilds" onclick='update_Display_Filter()'>Idle
699
                                             <input name="pausedBuilds" id="pausedBuilds" type="checkbox" <%=Filter_Checked("pausedBuilds")%> value="paused" onclick='update_Display_Filter()'>Paused
747
                                             <input name="pausedBuilds" id="pausedBuilds" type="checkbox" <%=Filter_Checked("pausedBuilds")%> value="paused" onclick='update_Display_Filter()'>Paused
700
                                             <input name="disabledDaemons"  id="disabledDaemons"  type="checkbox" <%=Filter_Checked("disabledDaemons")%>  value="disabledDaemons"  onclick='update_Display_Filter()'>Disabled
748
                                             <input name="disabledDaemons"  id="disabledDaemons"  type="checkbox" <%=Filter_Checked("disabledDaemons")%>  value="disabledDaemons"  onclick='update_Display_Filter()'>Disabled
701
                                             <input name="problemBuilds"  id="problemBuilds"  type="checkbox" <%=Filter_Checked("problemBuilds")%>  value="problemBuilds"  onclick='update_Display_Filter()'>Problem Daemon Sets
749
                                             <input name="problemBuilds"  id="problemBuilds"  type="checkbox" <%=Filter_Checked("problemBuilds")%>  value="problemBuilds"  onclick='update_Display_Filter()'>Problem Daemon Sets
-
 
750
 
-
 
751
                                          <td class="body_rowg">
-
 
752
                                             <input style="width:3em" name="inactivity" id="inactivity" type="input" maxlength="3" value="<%=param_inactivity%>" onchange='toggle_inactivity()' > Days
702
                                          </td>
753
                                          </td>
703
                                       </tr>
754
                                       </tr>
704
                                    </table>
755
                                    </table>
705
                                 </fieldset>
756
                                 </fieldset>
706
                              </td>
757
                              </td>
Line 876... Line 927...
876
                                        bDisplay_whole_set = true
927
                                        bDisplay_whole_set = true
877
                                     Else
928
                                     Else
878
                                        bDisplay_whole_set = true
929
                                        bDisplay_whole_set = true
879
                                     End If
930
                                     End If
880
 
931
 
881
                                     If NiceInt(rsQry("last_build_days"), 100) > Max_DeltaBuild Then
932
                                     If NiceInt(rsQry("last_build_days"), 100) > param_inactivity Then
882
                                         If dState = "active" OR dState = "idle" Then
933
                                         If dState = "active" OR dState = "idle" Then
883
                                            bDisplay_whole_set = true
934
                                            bDisplay_whole_set = true
884
                                            bShowAge = true
935
                                            bShowAge = true
885
                                         End If
936
                                         End If
886
                                     End If
937
                                     End If
Line 909... Line 960...
909
                                              bDisplay_whole_set = true
960
                                              bDisplay_whole_set = true
910
                                           Else
961
                                           Else
911
                                              bDisplay_whole_set = true
962
                                              bDisplay_whole_set = true
912
                                           End If
963
                                           End If
913
 
964
 
914
                                           If NiceInt(rsQry("last_build_days"), 100) > Max_DeltaBuild Then
965
                                           If NiceInt(rsQry("last_build_days"), 100) > param_inactivity Then
915
                                               If dState = "active" OR dState = "idle" Then
966
                                               If dState = "active" OR dState = "idle" Then
916
                                                  bDisplay_whole_set = true
967
                                                  bDisplay_whole_set = true
917
                                                  bShowAge = true
968
                                                  bShowAge = true
918
                                               End If
969
                                               End If
919
                                           End If
970
                                           End If