source: branches/0.4/web/addons/job_monarch/templates/search.tpl @ 805

Last change on this file since 805 was 805, checked in by ramonb, 11 years ago

search.php,
templates/search.tpl:

  • pass self to search pages

overview.php:

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