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

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

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

  • Removed size limit on input field

web/addons/toga/index.php:

  • Bugfix on metric menu choice/submit
File size: 9.6 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="c" VALUE="{cluster}">
63<INPUT TYPE="hidden" NAME="view" VALUE="search">
64
65<BR><BR>
66
67<TABLE WIDTH="90%">
68
69<TR>
70  <TD CLASS=title COLSPAN="2">
71  <B>Search job archive</B>
72  </TD>
73</TR>
74
75</TABLE>
76
77<BR><BR>
78
79<TABLE WIDTH="90%">
80
81<TR>
82  <TD></TD>
83  <TD></TD>
84  <TD></TD>
85  <TD></TD>
86  <TD></TD>
87  <TD></TD>
88</TR>
89
90<TR>
91
92  <TD>
93  Id:
94  </TD>
95  <TD>
96  <INPUT TYPE="TEXT" NAME="id" VALUE="{id_value}">
97  </TD>
98
99</TR>
100
101<TR>
102
103  <TD>
104  User:
105  </TD>
106  <TD>
107  <INPUT TYPE="TEXT" NAME="user" VALUE="{user_value}">
108  </TD>
109
110  <TD>
111  Queue:
112  </TD>
113  <TD>
114  <INPUT TYPE="TEXT" NAME="queue" VALUE="{queue_value}">
115  </TD>
116
117  <TD>
118  Name:
119  </TD>
120  <TD>
121  <INPUT TYPE="TEXT" NAME="name" VALUE="{name_value}">
122  </TD>
123
124</TR>
125
126<TR>
127
128  <TD></TD>
129  <TD>
130  Job <B>start</B>
131  </TD>
132
133  <TD>
134  From:
135  </TD>
136  <TD>
137  <INPUT TYPE="HIDDEN" NAME="start_from_time" VALUE="{start_from_value}">
138  <INPUT TYPE="TEXT" NAME="start_from_pick" VALUE="{start_from_value}" DISABLED="TRUE">
139  <A HREF="javascript:show_calendar('document.archive_search_form.start_from_pick', document.archive_search_form.start_from_pick.value );">
140  <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>
141  <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>
142  </TD>
143 
144  <TD>
145  To:
146  </TD>
147  <TD>
148  <INPUT TYPE="HIDDEN" NAME="start_to_time" VALUE="{start_to_value}">
149  <INPUT TYPE="TEXT" NAME="start_to_pick" VALUE="{start_to_value}" DISABLED="TRUE">
150  <a href="javascript:show_calendar('document.archive_search_form.start_to_pick', document.archive_search_form.start_to_pick.value );">
151  <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>
152  <a href="#" onClick="document.archive_search_form.start_to_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
153  <IMG SRC="redcross.jpg" BORDER=0></A>
154  </TD>
155 
156</TR>
157
158<TR>
159
160  <TD></TD>
161  <TD>
162  Job <B>finish</B>
163  </TD>
164
165  <TD>
166  From:
167  </TD>
168  <TD>
169  <INPUT TYPE="HIDDEN" NAME="end_from_time" VALUE="{end_from_value}">
170  <INPUT TYPE="TEXT" NAME="end_from_pick" VALUE="{end_from_value}" DISABLED="TRUE">
171  <A HREF="javascript:show_calendar('document.archive_search_form.end_from_pick', document.archive_search_form.end_from_pick.value );">
172  <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>
173  <a href="#" onClick="document.archive_search_form.end_from_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
174  <IMG SRC="redcross.jpg" BORDER=0></A>
175  </TD>
176 
177  <TD>
178  To:
179  </TD>
180  <TD>
181  <INPUT TYPE="HIDDEN" NAME="end_to_time" VALUE="{end_to_value}">
182  <INPUT TYPE="TEXT" NAME="end_to_pick" VALUE="{end_to_value}" DISABLED="TRUE">
183  <a href="javascript:show_calendar('document.archive_search_form.end_to_pick', document.archive_search_form.end_to_pick.value );">
184  <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>
185  <a href="#" onClick="document.archive_search_form.end_to_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
186  <IMG SRC="redcross.jpg" BORDER=0></A>
187  </TD>
188 
189</TR>
190
191<TR>
192
193  <TD></TD>
194  <TD></TD>
195  <TD></TD>
196  <TD></TD>
197  <TD>{form_error_msg}</TD>
198  <TD>
199  <INPUT TYPE="submit" VALUE="Search archive" onClick="setSearchTimestamps();">
200  </TD>
201
202</TR>
203
204</TABLE>
205<BR><BR>
206<!-- START BLOCK : search_results -->
207
208<INPUT TYPE="HIDDEN" NAME="sortby" VALUE="{sortby}">
209<INPUT TYPE="HIDDEN" NAME="sortorder" VALUE="{sortorder}">
210<INPUT TYPE="HIDDEN" NAME="filterorder" VALUE="{f_order}">
211
212<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
213<TR CLASS="toga">
214<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
215<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
216<TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
217<TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
218<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
219<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
220<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
221<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></
222B></TH>
223<TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
224<TH><B><A HREF="#" onClick="setSort( 'finished' )">Finished</A></B></TH>
225<TH><B><A HREF="#" onClick="setSort( 'runningtime' )">Runningtime</A></B></TH>
226</TR>
227
228<!-- START BLOCK : node -->
229  <TR CLASS="{nodeclass}">
230    <TD><A HREF="#" onClick="setFilter( 'id', '{id}' )">{id}</A></TD>
231    <TD><A HREF="#" onClick="setFilter( 'state', '{state}' )">{state}</A></TD>
232    <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
233    <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
234    <TD>{name}</TD>
235    <TD>{req_cpu}</TD>
236    <TD>{req_memory}</TD>
237    <TD>{nodes}/{cpus}</TD>
238    <TD>{started}</TD>
239    <TD>{finished}</TD>
240    <TD>{runningtime}</TD>
241  </TR>
242<!-- END BLOCK : node -->
243</TABLE>
244</CENTER>
245
246<!-- START BLOCK : showhosts -->
247<TABLE BORDER="0" WIDTH="100%">
248<TR>
249  <TD CLASS=title COLSPAN="2">
250  <FONT SIZE="-1">
251  Show Hosts:
252  yes<INPUT type=radio name="sh" value="1" OnClick="archive_search_form.submit();" {checked1}>
253  no<INPUT type=radio name="sh" value="0" OnClick="archive_search_form.submit();" {checked0}>
254  </FONT>
255  |
256  job <strong>{id}</strong> metric <strong>{metric}</strong>
257  |
258   <FONT SIZE="-1">
259   Columns&nbsp;&nbsp;{cols_menu}
260   </FONT><BR>
261   <FONT SIZE="-1">
262    <INPUT TYPE="HIDDEN" NAME="start" VALUE="{start}">
263    <INPUT TYPE="HIDDEN" NAME="stop" VALUE="{stop}">
264    Set graph timeperiod from
265    <INPUT TYPE="text" NAME="period_start_pick" VALUE="{start}" ALT="Start time" DISABLED="TRUE">
266    <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">
267    <img src="cal.gif" width="16" height="16" border="0"></a>
268    <a href="#" onClick="javascript: document.archive_search_form.period_start_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
269    <IMG SRC="redcross.jpg" BORDER=0></A>
270    to <INPUT TYPE="text" NAME="period_stop_pick" VALUE="{stop}" ALT="Stop time" DISABLED="TRUE">
271    <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">
272    <img src="cal.gif" width="16" height="16" border="0"></a>
273    <a href="#" onClick="javascript: document.archive_search_form.period_to_pick.value=''" alt="Click here to clear field" title="Click here to clear field">
274    <IMG SRC="redcross.jpg" BORDER=0></A>
275    <INPUT TYPE="submit" onClick="setPeriodTimestamps();" VALUE="Refresh graphs">
276   </FONT>
277  </TD>
278</TR>
279
280</TABLE>
281
282<CENTER>
283<TABLE>
284<TR>
285<!-- START BLOCK : sorted_list -->
286{metric_image}{br}
287<!-- END BLOCK : sorted_list -->
288</TR>
289</TABLE>
290
291<p>
292(Nodes colored by 1-minute load) | <A HREF="../../node_legend.html" ALT="Node Image egend">Legend</A>
293
294</CENTER>
295
296<!-- END BLOCK : showhosts -->
297<!-- END BLOCK : search_results -->
298</CENTER>
Note: See TracBrowser for help on using the repository browser.