source: trunk/web/addons/toga/templates/search.tpl @ 145

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

web/addons/toga/libtoga.php:

  • Small bugfixes
  • Added getRrdDirs and Files functions for graphs

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

  • Small rearrangement

web/addons/toga/index.php:

  • Outlining

web/addons/toga/search.php:

  • Fixed graphing output!


web/addons/toga/graph.php

  • Fixed to handle multiple RRD's from multiple timeperiods
File size: 9.4 KB
Line 
1<CENTER>
2
3<SCRIPT LANGUAGE="javascript" SRC="ts_picker.js"></SCRIPT>
4<SCRIPT LANGUAGE="javascript">
5function setSort( sortbyval ) {
6
7        if( sortbyval != document.archive_search_form.sortby.value ) {
8
9                document.archive_search_form.sortby.value = sortbyval;
10                document.archive_search_form.sortorder.value = "asc";
11
12        } else {
13
14                if( document.archive_search_form.sortorder.value == "desc" )
15                        document.archive_search_form.sortorder.value = "asc";
16                else if( document.archive_search_form.sortorder.value == "asc" )
17                        document.archive_search_form.sortorder.value = "desc";
18        }
19
20        document.forms['archive_search_form'].submit();
21}
22
23function setFilter( filtername, filterval ) {
24
25        var myfilterorder = document.archive_search_form.elements['filterorder'].value;
26
27        if( document.archive_search_form.elements[filtername] ) {
28                document.archive_search_form.elements[filtername].value = filterval;
29                if( myfilterorder != '')
30                        myfilterorder = myfilterorder + "," + filtername;
31                else
32                        myfilterorder = filtername;
33
34        }
35        document.archive_search_form.elements['filterorder'].value = myfilterorder;
36
37        //setTimeout( "document.forms['archive_search_form'].submit();", 1000 );
38
39        document.forms['archive_search_form'].submit();
40}
41</SCRIPT>
42<SCRIPT LANGUAGE="javascript">
43
44        function setSearchTimestamps() {
45
46                document.archive_search_form.start_from_time.value = document.archive_search_form.start_from_pick.value;
47                document.archive_search_form.start_to_time.value = document.archive_search_form.start_to_pick.value;
48                document.archive_search_form.end_from_time.value = document.archive_search_form.end_from_pick.value;
49                document.archive_search_form.end_to_time.value = document.archive_search_form.end_to_pick.value;
50        }
51
52        function setPeriodTimestamps() {
53
54                document.archive_search_form.start.value = document.archive_search_form.period_start_pick.value;
55                document.archive_search_form.stop.value = document.archive_search_form.period_stop_pick.value;
56        }
57
58</SCRIPT>
59
60<FORM NAME="archive_search_form" ACTION="./">
61
62<INPUT TYPE="hidden" NAME="view" VALUE="search">
63
64<BR><BR>
65
66<TABLE WIDTH="90%">
67
68<TR>
69  <TD CLASS=title COLSPAN="2">
70  <B>Search job archive</B>
71  </TD>
72</TR>
73
74</TABLE>
75
76<BR><BR>
77
78<TABLE WIDTH="90%">
79
80<TR>
81  <TD></TD>
82  <TD></TD>
83  <TD></TD>
84  <TD></TD>
85  <TD></TD>
86  <TD></TD>
87</TR>
88
89<TR>
90
91  <TD>
92  Id:
93  </TD>
94  <TD>
95  <INPUT TYPE="TEXT" NAME="id" VALUE="{id_value}">
96  </TD>
97
98</TR>
99
100<TR>
101
102  <TD>
103  User:
104  </TD>
105  <TD>
106  <INPUT TYPE="TEXT" NAME="user" VALUE="{user_value}">
107  </TD>
108
109  <TD>
110  Queue:
111  </TD>
112  <TD>
113  <INPUT TYPE="TEXT" NAME="queue" VALUE="{queue_value}">
114  </TD>
115
116  <TD>
117  Name:
118  </TD>
119  <TD>
120  <INPUT TYPE="TEXT" NAME="name" VALUE="{name_value}">
121  </TD>
122
123</TR>
124
125<TR>
126
127  <TD></TD>
128  <TD>
129  Job <B>start</B>
130  </TD>
131
132  <TD>
133  From:
134  </TD>
135  <TD>
136  <INPUT TYPE="HIDDEN" NAME="start_from_time" VALUE="{start_from_value}">
137  <INPUT TYPE="TEXT" NAME="start_from_pick" VALUE="{start_from_value}" DISABLED="TRUE">
138  <A HREF="javascript:show_calendar('document.archive_search_form.start_from_pick', document.archive_search_form.start_from_pick.value );">
139  <IMG SRC="cal.gif" width="16" height="16" border="0" title="Click to select a date/time" alt="Click to select a date/time"></a>
140  <a href="#" onClick="document.archive_search_form.start_from_pick.value=''" alt="Click here to clear field" title="Click here to clear field"><IMG SRC="redcross.jpg" BORDER=0></A>
141  </TD>
142 
143  <TD>
144  To:
145  </TD>
146  <TD>
147  <INPUT TYPE="HIDDEN" NAME="start_to_time" VALUE="{start_to_value}">
148  <INPUT TYPE="TEXT" NAME="start_to_pick" VALUE="{start_to_value}" DISABLED="TRUE">
149  <a href="javascript:show_calendar('document.archive_search_form.start_to_pick', document.archive_search_form.start_to_pick.value );">
150  <img src="cal.gif" width="16" height="16" border="0" title="Click to select a date/time" alt="Click to select a date/time"></a>
151  <a href="#" onClick="document.archive_search_form.start_to_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
152  <IMG SRC="redcross.jpg" BORDER=0></A>
153  </TD>
154 
155</TR>
156
157<TR>
158
159  <TD></TD>
160  <TD>
161  Job <B>finish</B>
162  </TD>
163
164  <TD>
165  From:
166  </TD>
167  <TD>
168  <INPUT TYPE="HIDDEN" NAME="end_from_time" VALUE="{end_from_value}">
169  <INPUT TYPE="TEXT" NAME="end_from_pick" VALUE="{end_from_value}" DISABLED="TRUE">
170  <A HREF="javascript:show_calendar('document.archive_search_form.end_from_pick', document.archive_search_form.end_from_pick.value );">
171  <IMG SRC="cal.gif" width="16" height="16" border="0" title="Click to select a date/time" alt="Click to select a date/time"></a>
172  <a href="#" onClick="document.archive_search_form.end_from_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
173  <IMG SRC="redcross.jpg" BORDER=0></A>
174  </TD>
175 
176  <TD>
177  To:
178  </TD>
179  <TD>
180  <INPUT TYPE="HIDDEN" NAME="end_to_time" VALUE="{end_to_value}">
181  <INPUT TYPE="TEXT" NAME="end_to_pick" VALUE="{end_to_value}" DISABLED="TRUE">
182  <a href="javascript:show_calendar('document.archive_search_form.end_to_pick', document.archive_search_form.end_to_pick.value );">
183  <img src="cal.gif" width="16" height="16" border="0" title="Click to select a date/time" alt="Click to select a date/time"></a>
184  <a href="#" onClick="document.archive_search_form.end_to_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
185  <IMG SRC="redcross.jpg" BORDER=0></A>
186  </TD>
187 
188</TR>
189
190<TR>
191
192  <TD></TD>
193  <TD></TD>
194  <TD></TD>
195  <TD></TD>
196  <TD>{form_error_msg}</TD>
197  <TD>
198  <INPUT TYPE="submit" VALUE="Search archive" onClick="setSearchTimestamps();">
199  </TD>
200
201</TR>
202
203</TABLE>
204<BR><BR>
205<!-- START BLOCK : search_results -->
206
207<INPUT TYPE="HIDDEN" NAME="sortby" VALUE="{sortby}">
208<INPUT TYPE="HIDDEN" NAME="sortorder" VALUE="{sortorder}">
209<INPUT TYPE="HIDDEN" NAME="filterorder" VALUE="{f_order}">
210
211<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
212<TR CLASS="toga">
213<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
214<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
215<TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
216<TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
217<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
218<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
219<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
220<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></
221B></TH>
222<TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
223<TH><B><A HREF="#" onClick="setSort( 'finished' )">Finished</A></B></TH>
224<TH><B><A HREF="#" onClick="setSort( 'runningtime' )">Runningtime</A></B></TH>
225</TR>
226
227<!-- START BLOCK : node -->
228  <TR CLASS="{nodeclass}">
229    <TD><A HREF="#" onClick="setFilter( 'id', '{id}' )">{id}</A></TD>
230    <TD><A HREF="#" onClick="setFilter( 'state', '{state}' )">{state}</A></TD>
231    <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
232    <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
233    <TD>{name}</TD>
234    <TD>{req_cpu}</TD>
235    <TD>{req_memory}</TD>
236    <TD>{nodes}/{cpus}</TD>
237    <TD>{started}</TD>
238    <TD>{finished}</TD>
239    <TD>{runningtime}</TD>
240  </TR>
241<!-- END BLOCK : node -->
242</TABLE>
243</CENTER>
244
245<!-- START BLOCK : showhosts -->
246<TABLE BORDER="0" WIDTH="100%">
247<TR>
248  <TD CLASS=title COLSPAN="2">
249  <FONT SIZE="-1">
250  Show Hosts:
251  yes<INPUT type=radio name="sh" value="1" OnClick="archive_search_form.submit();" {checked1}>
252  no<INPUT type=radio name="sh" value="0" OnClick="archive_search_form.submit();" {checked0}>
253  </FONT>
254  |
255  job <strong>{id}</strong> metric <strong>{metric}</strong>
256  |
257   <FONT SIZE="-1">
258   Columns&nbsp;&nbsp;{cols_menu}
259   </FONT><BR>
260   <FONT SIZE="-1">
261    <INPUT TYPE="HIDDEN" NAME="start" VALUE="{j_start}">
262    <INPUT TYPE="HIDDEN" NAME="stop" VALUE="{j_stop}">
263    Graph timeperiod from
264    <INPUT TYPE="text" NAME="period_start_pick" VALUE="{j_start}" ALT="Start time" DISABLED="TRUE">
265    <a href="javascript:show_calendar('document.archive_search_form.period_start_pick', document.archive_search_form.period_start_pick.value);" alt="Click to select a date/time" title="Click to select a date/time">
266    <img src="cal.gif" width="16" height="16" border="0"></a>
267    <a href="#" onClick="javascript: document.archive_search_form.period_start_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
268    <IMG SRC="redcross.jpg" BORDER=0></A>
269    to <INPUT TYPE="text" NAME="period_stop_pick" VALUE="{j_stop}" ALT="Stop time" DISABLED="TRUE">
270    <a href="javascript:show_calendar('document.archive_search_form.period_stop_pick', document.archive_search_form.period_stop_pick.value);" alt="Click to select a date/time" title="Click to select a date/time">
271    <img src="cal.gif" width="16" height="16" border="0"></a>
272    <a href="#" onClick="javascript: document.archive_search_form.period_stop_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
273    <IMG SRC="redcross.jpg" BORDER=0></A>
274    <INPUT TYPE="submit" onClick="setPeriodTimestamps();" VALUE="Refresh graphs">
275   </FONT>
276  </TD>
277</TR>
278
279</TABLE>
280
281<CENTER>
282<TABLE>
283<TR>
284<!-- START BLOCK : sorted_list -->
285{metric_image}{br}
286<!-- END BLOCK : sorted_list -->
287</TR>
288</TABLE>
289
290</CENTER>
291
292<!-- END BLOCK : showhosts -->
293<!-- END BLOCK : search_results -->
294</CENTER>
Note: See TracBrowser for help on using the repository browser.