source: trunk/web/addons/toga/templates/overview.tpl @ 138

Last change on this file since 138 was 138, checked in by bastiaans, 18 years ago

web/addons/toga/templates/search_results.tpl:

  • Setup for search results template

web/addons/toga/templates/overview.tpl:

  • Misc testing stuff for remembering filter order

web/addons/toga/templates/search.tpl:

  • Template for search

web/addons/toga/index.php:

  • Testing stuff from remembering filter order
  • Do not add filters in a search window

web/addons/toga/overview.php:

  • Extra test field for filterorder

web/addons/toga/search.php:

  • First good setup for search page

web/addons/toga/libtoga.php:

  • Added class TarchDbase? for searching SQL dbase for archived jobs
  • Added TarchRrd? for future generation of RRD Graphs for archived jobs
  • Cleaned up old RRD file generation code (we can graph on the fly!)
File size: 6.2 KB
Line 
1<BR><BR>
2
3<CENTER>
4<TABLE>
5<TR>
6  <TD ALIGN="CENTER">
7    <IMG SRC="{clusterimage}"><BR>
8
9<TABLE ALIGN=CENTER>
10<TR>
11<TD><FONT SIZE="-1" class=footer>Last updated:</FONT></TD><TD><FONT SIZE="-1" class=footer>{report_time}</TD>
12</TR><TR>
13<TD><FONT SIZE="-1" class=footer>Available:</FONT></TD><TD><FONT SIZE="-1" class=footer>{avail_nodes} nodes / {avail_cpus} cpu's</FONT></TD>
14</TR><TR>
15<TD><FONT SIZE="-1" class=footer>Usage:</FONT></TD><TD><FONT SIZE="-1" class=footer>{used_jobs} jobs - {used_nodes} nodes / {used_cpus} cpu's</FONT></TD>
16</TR><TR>
17<TD><FONT SIZE="-1" class=footer>View:</FONT></TD><TD><FONT SIZE="-1" class=footer>{view_jobs} jobs - {view_nodes} nodes / {view_cpus} cpu's</FONT></TD>
18</TR>
19</TABLE>
20</FONT>
21
22  </TD>
23  <TD ALIGN="CENTER">
24    <IMG SRC="{pie}">
25  </TD>
26</TR>
27</TABLE>
28
29<BR>
30
31<SCRIPT TYPE="text/javascript" SRC="ts_picker.js"></SCRIPT>
32<SCRIPT TYPE="text/javascript">
33        function setSort( sortbyval ) {
34
35                if( sortbyval != document.toga_form.sortby.value ) {
36
37                        document.toga_form.sortby.value = sortbyval;
38                        document.toga_form.sortorder.value = "asc";
39
40                } else {
41
42                        if( document.toga_form.sortorder.value == "desc" )
43                                document.toga_form.sortorder.value = "asc";
44                        else if( document.toga_form.sortorder.value == "asc" )
45                                document.toga_form.sortorder.value = "desc";
46                }
47
48                document.forms['toga_form'].submit();
49        }
50
51        function setFilter( filtername, filterval ) {
52
53                //document.toga_form.id.value = '';
54                //document.toga_form.queue.value = '';
55                //document.toga_form.state.value = '';
56                //document.toga_form.user.value = '';
57                var myfilterorder = document.toga_form.elements['filterorder'].value;
58
59                if( document.toga_form.elements[filtername] ) {
60                        document.toga_form.elements[filtername].value = filterval;
61                        if( myfilterorder != '')
62                                myfilterorder = myfilterorder + "," + filtername;
63                        else
64                                myfilterorder = filtername;
65                               
66                }
67                document.toga_form.elements['filterorder'].value = myfilterorder;
68
69                //setTimeout( "document.forms['toga_form'].submit();", 1000 );
70
71                document.forms['toga_form'].submit();
72        }
73
74        //function removeFilters( filters ) {
75
76                //var myfilter_fields = filters.split( " " );
77                //for( var i=0; i<myfilter_fields.length; i++ ) {
78                        //removeFilter( myfilter_fields[i] );
79                        //setTimeout( "removeFilter( "+myfilter_fields[i]+" );", 50 );
80                //}
81                // delay 100 ms before submit or fields might not be set
82                //document.forms['toga_form'].submit();", 100 );
83
84                //setTimeout( "document.forms['toga_form'].submit();", 1000 );
85        //}
86
87        //function removeFilter( filtername ) {
88
89        //      var filterorder_fields = document.toga_form.elements['filterorder'].value.split( "," );
90        //      var myfilterorder = '';
91
92        //      for( var i=0; i<filterorder_fields.length; i++ ) {
93        //              if( filterorder_fields[i] != filtername ) {
94        //                      if( myfilterorder != '') {
95        //                              myfilterorder = myfilterorder + "," + filterorder_fields[i];
96        //                              //alert('myfilterorder = '+myfilterorder);
97        //                      } else {
98        //                              myfilterorder = filterorder_fields[i];
99        //                              //alert('emyfilterorder = '+myfilterorder);
100        //                      }
101        //              }
102        //      }
103        //      document.toga_form.elements[filtername].value = '';
104        //      document.toga_form.elements['filterorder'].value = myfilterorder;
105        //}
106
107</SCRIPT>
108
109<INPUT TYPE="HIDDEN" NAME="sortby" VALUE="{sortby}">
110<INPUT TYPE="HIDDEN" NAME="sortorder" VALUE="{sortorder}">
111<INPUT TYPE="HIDDEN" NAME="c" VALUE="{clustername}">
112<INPUT TYPE="HIDDEN" NAME="queue" VALUE="{f_queue}">
113<INPUT TYPE="HIDDEN" NAME="state" VALUE="{f_state}">
114<INPUT TYPE="HIDDEN" NAME="user" VALUE="{f_user}">
115<INPUT TYPE="HIDDEN" NAME="id" VALUE="{f_id}">
116<INPUT TYPE="HIDDEN" NAME="filterorder" VALUE="{f_order}">
117
118<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
119<TR CLASS="toga">
120<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
121<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
122<TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
123<TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
124<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
125<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
126<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
127<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></B></TH>
128<TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
129<TH><B><A HREF="#" onClick="setSort( 'runningtime' )">Runningtime</A></B></TH>
130</TR>
131
132<!-- START BLOCK : node -->
133  <TR CLASS="{nodeclass}">
134    <TD><A HREF="#" onClick="setFilter( 'id', '{id}' )">{id}</A></TD>
135    <TD><A HREF="#" onClick="setFilter( 'state', '{state}' )">{state}</A></TD>
136    <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
137    <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
138    <TD>{name}</TD>
139    <TD>{req_cpu}</TD>
140    <TD>{req_memory}</TD>
141    <TD>{nodes}/{cpus}</TD>
142    <TD>{started}</TD>
143    <TD>{runningtime}</TD>
144  </TR>
145<!-- END BLOCK : node -->
146</TABLE>
147</CENTER>
148
149<!-- START BLOCK : showhosts -->
150<TABLE BORDER="0" WIDTH="100%">
151<TR>
152  <TD CLASS=title COLSPAN="2">
153  <FONT SIZE="-1">
154  Show Hosts:
155  yes<INPUT type=radio name="sh" value="1" OnClick="toga_form.submit();" {checked1}>
156  no<INPUT type=radio name="sh" value="0" OnClick="toga_form.submit();" {checked0}>
157  </FONT>
158  |
159  job <strong>{id}</strong> metric <strong>{metric}</strong>
160  |
161   <FONT SIZE="-1">
162   Columns&nbsp;&nbsp;{cols_menu}
163   </FONT><!-- <BR>
164   <FONT SIZE="-1">
165    Set graph timeperiod from <INPUT TYPE="text" NAME="start" VALUE="{start}" SIZE=12 ALT="Start time"><a href="javascript:show_calendar('document.toga_form.start', document.toga_form.start.value);"><img src="cal.gif" width="16" height="16" border="0"></a> to <INPUT TYPE="text" NAME="stop" VALUE="{stop}" SIZE=12 ALT="Stop time"><a href="javascript:show_calendar('document.toga_form.stop', document.toga_form.stop.value);"><img src="cal.gif" width="16" height="16" border="0"></a><INPUT TYPE="submit" VALUE="Refresh graphs">
166   </FONT> -->
167  </TD>
168</TR>
169   
170</TABLE>
171
172<CENTER>
173<TABLE>
174<TR>
175<!-- START BLOCK : sorted_list -->
176{metric_image}{br}
177<!-- END BLOCK : sorted_list -->
178</TR>
179</TABLE>
180
181<p>
182(Nodes colored by 1-minute load) | <A HREF="../../node_legend.html" ALT="Node Image egend">Legend</A>
183
184</CENTER>
185
186<!-- END BLOCK : showhosts -->
Note: See TracBrowser for help on using the repository browser.