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

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

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

  • Use block to include link to archive search

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

  • Cleanup
  • Javascript moved to seperate .js file

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

  • Added search results and future showhosts block section

web/addons/toga/index.php:

  • Use block instead of include for archive search link

web/addons/toga/search.php:

  • Setup of working search style

web/addons/toga/libtoga.php:

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