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

Last change on this file since 126 was 126, checked in by bastiaans, 17 years ago

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

  • Changed form action to /

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

  • Added showhosts HTML

web/addons/toga/index.php:

  • Header will now show metricmenu
  • Form changed to 1 global form

web/addons/toga/overview.php:

  • Setup for different pie graphs for filters
  • Added showhosts code for a job

web/addons/toga/libtoga.php:

  • Some extra global ganglia vars we need
File size: 4.2 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" SRC="ts_picker.js"></SCRIPT>
20<SCRIPT TYPE="text/javascript">
21        function setSort( sortbyval ) {
22
23                if( sortbyval != document.toga_form.sortby.value ) {
24
25                        document.toga_form.sortby.value = sortbyval;
26                        document.toga_form.sortorder.value = "asc";
27
28                } else {
29
30                        if( document.toga_form.sortorder.value == "desc" )
31                                document.toga_form.sortorder.value = "asc";
32                        else if( document.toga_form.sortorder.value == "asc" )
33                                document.toga_form.sortorder.value = "desc";
34                }
35
36                document.forms['toga_form'].submit();
37        }
38
39        function setFilter( filtername, filterval ) {
40
41                //document.toga_form.id.value = '';
42                //document.toga_form.queue.value = '';
43                //document.toga_form.state.value = '';
44                //document.toga_form.user.value = '';
45
46                if( document.toga_form.elements[filtername] ) {
47                        document.toga_form.elements[filtername].value = filterval;
48                }
49
50                document.forms['toga_form'].submit();
51        }
52</SCRIPT>
53
54<INPUT TYPE="HIDDEN" NAME="sortby" VALUE="{sortby}">
55<INPUT TYPE="HIDDEN" NAME="sortorder" VALUE="{sortorder}">
56<INPUT TYPE="HIDDEN" NAME="c" VALUE="{clustername}">
57<INPUT TYPE="HIDDEN" NAME="queue" VALUE="{f_queue}">
58<INPUT TYPE="HIDDEN" NAME="state" VALUE="{f_state}">
59<INPUT TYPE="HIDDEN" NAME="user" VALUE="{f_user}">
60<INPUT TYPE="HIDDEN" NAME="id" VALUE="{f_id}">
61
62<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
63<TR CLASS="toga">
64<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
65<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
66<TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
67<TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
68<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
69<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
70<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
71<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></B></TH>
72<TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
73<TH><B><A HREF="#" onClick="setSort( 'runningtime' )">Runningtime</A></B></TH>
74</TR>
75
76<!-- START BLOCK : node -->
77  <TR CLASS="{nodeclass}">
78    <TD><A HREF="#" onClick="setFilter( 'id', '{id}' )">{id}</A></TD>
79    <TD><A HREF="#" onClick="setFilter( 'state', '{state}' )">{state}</A></TD>
80    <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
81    <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
82    <TD>{name}</TD>
83    <TD>{req_cpu}</TD>
84    <TD>{req_memory}</TD>
85    <TD>{nodes}/{cpus}</TD>
86    <TD>{started}</TD>
87    <TD>{runningtime}</TD>
88  </TR>
89<!-- END BLOCK : node -->
90</TABLE>
91</CENTER>
92
93<!-- START BLOCK : showhosts -->
94<TABLE BORDER="0" WIDTH="100%">
95<TR>
96  <TD CLASS=title COLSPAN="2">
97  <FONT SIZE="-1">
98  Show Hosts:
99  yes<INPUT type=radio name="sh" value="1" OnClick="toga_form.submit();" {checked1}>
100  no<INPUT type=radio name="sh" value="0" OnClick="toga_form.submit();" {checked0}>
101  </FONT>
102  |
103  job <strong>{id}</strong> metric <strong>{metric}</strong>
104  |
105   <FONT SIZE="-1">
106   Columns&nbsp;&nbsp;{cols_menu}
107   </FONT><!-- <BR>
108   <FONT SIZE="-1">
109    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">
110   </FONT> -->
111  </TD>
112</TR>
113   
114</TABLE>
115
116<CENTER>
117<TABLE>
118<TR>
119<!-- START BLOCK : sorted_list -->
120{metric_image}{br}
121<!-- END BLOCK : sorted_list -->
122</TR>
123</TABLE>
124
125<p>
126(Nodes colored by 1-minute load) | <A HREF="../../node_legend.html" ALT="Node Image egend">Legend</A>
127
128</CENTER>
129
130<!-- END BLOCK : showhosts -->
Note: See TracBrowser for help on using the repository browser.