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

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

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

  • Setup javascript for multiple filters
  • Cosmetic updates

web/addons/toga/index.php:

  • Rearranged filter order

web/addons/toga/overview.php:

  • Changed for multiple filters
  • Cosmetic updates

web/addons/toga/image.php:

  • Changed for multiple filters

web/addons/toga/libtoga.php:

  • Changed filterNodes() for multiple filters
File size: 2.9 KB
Line 
1<BR><BR>
2
3<CENTER>
4<TABLE>
5<TR>
6  <TD ALIGN="CENTER">
7    <IMG SRC="{clusterimage}"><BR>
8    {nodes_nr} nodes total: {jobs_nr} jobs with {cpus_nr} CPU's (at {report_time}).<BR>
9    current view: {f_jobs_nr} jobs with {f_cpus_nr} CPU's{lag_msg}.
10  </TD>
11  <TD ALIGN="CENTER">
12    <IMG SRC="{pie}">
13  </TD>
14</TR>
15</TABLE>
16
17<BR><BR>
18
19<SCRIPT TYPE="text/javascript">
20        function setSort( sortbyval ) {
21
22                if( sortbyval != document.toga_form.sortby.value ) {
23
24                        document.toga_form.sortby.value = sortbyval;
25                        document.toga_form.sortorder.value = "asc";
26
27                } else {
28
29                        if( document.toga_form.sortorder.value == "desc" )
30                                document.toga_form.sortorder.value = "asc";
31                        else if( document.toga_form.sortorder.value == "asc" )
32                                document.toga_form.sortorder.value = "desc";
33                }
34
35                document.forms['toga_form'].submit();
36        }
37
38        function setFilter( filtername, filterval ) {
39
40                //document.toga_form.id.value = '';
41                //document.toga_form.queue.value = '';
42                //document.toga_form.state.value = '';
43                //document.toga_form.user.value = '';
44
45                if( document.toga_form.elements[filtername] ) {
46                        document.toga_form.elements[filtername].value = filterval;
47                }
48
49                document.forms['toga_form'].submit();
50        }
51</SCRIPT>
52
53<FORM NAME="toga_form" ACTION="./" METHOD="GET">
54
55<INPUT TYPE="HIDDEN" NAME="sortby" VALUE="{sortby}">
56<INPUT TYPE="HIDDEN" NAME="sortorder" VALUE="{sortorder}">
57<INPUT TYPE="HIDDEN" NAME="c" VALUE="{clustername}">
58<INPUT TYPE="HIDDEN" NAME="queue" VALUE="{f_queue}">
59<INPUT TYPE="HIDDEN" NAME="state" VALUE="{f_state}">
60<INPUT TYPE="HIDDEN" NAME="user" VALUE="{f_user}">
61<INPUT TYPE="HIDDEN" NAME="id" VALUE="{f_id}">
62
63</FORM>
64
65<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
66<TR CLASS="toga">
67<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
68<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
69<TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
70<TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
71<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
72<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
73<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
74<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></B></TH>
75<TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
76<TH><B><A HREF="#" onClick="setSort( 'runningtime' )">Runningtime</A></B></TH>
77</TR>
78
79<!-- START BLOCK : node -->
80  <TR CLASS="{nodeclass}">
81    <TD><A HREF="#" onClick="setFilter( 'id', '{id}' )">{id}</A></TD>
82    <TD><A HREF="#" onClick="setFilter( 'state', '{state}' )">{state}</A></TD>
83    <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
84    <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
85    <TD>{name}</TD>
86    <TD>{req_cpu}</TD>
87    <TD>{req_memory}</TD>
88    <TD>{nodes}/{cpus}</TD>
89    <TD>{started}</TD>
90    <TD>{runningtime}</TD>
91  </TR>
92<!-- END BLOCK : node -->
93</TABLE>
94</CENTER>
Note: See TracBrowser for help on using the repository browser.