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

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

web/addons/toga/libtoga.php:

  • Removed debug print

web/addons/toga/redcross.jpg:

  • Image for clearing date/time fields (tnx walter ;))

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

  • Header form name configurable

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

  • Moved javascript back in for modification
  • Misc. cosmetic changes
  • Added clear buttons for date/time fields

web/addons/toga/index.php:

  • Header will now label "Jobsearch" in header

web/addons/toga/search.php:

  • Misc. cleanup
  • Initial graphing code setup

web/addons/toga/graph.php:

  • Modified / modifyable graphing script for archive jobs

web/addons/toga/next.gif:

  • Next month button of datepicker

web/addons/toga/prev.gif:

  • Previous month button of datepicker

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

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