Ignore:
Timestamp:
06/15/05 10:48:34 (18 years ago)
Author:
bastiaans
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/toga/templates/search.tpl

    r138 r140  
    22</FORM>
    33<SCRIPT LANGUAGE="javascript" SRC="ts_picker.js"></SCRIPT>
     4<SCRIPT TYPE="text/javascript" SRC="libtoga.js"></SCRIPT>
    45<SCRIPT LANGUAGE="javascript">
    56
    6         function setHiddenTimestamps() {
     7        function setSearchTimestamps() {
    78
    89                document.archive_search_form.start_from_time.value = document.archive_search_form.start_from_pick.value;
     
    1011                document.archive_search_form.end_from_time.value = document.archive_search_form.end_from_pick.value;
    1112                document.archive_search_form.end_to_time.value = document.archive_search_form.end_to_pick.value;
    12                 alert( "poep gezet" );
     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;
    1319        }
    1420
     
    139145  <TD>{form_error_msg}</TD>
    140146  <TD>
    141   <INPUT TYPE="submit" VALUE="Search archive" onClick="setHiddenTimestamps();">
     147  <INPUT TYPE="submit" VALUE="Search archive" onClick="setSearchTimestamps();">
    142148  </TD>
    143149
     
    147153</FORM>
    148154<BR><BR>
    149 <!-- INCLUDE BLOCK : search_results -->
    150 <BR><BR>
    151 <!-- INCLUDE BLOCK : job_details -->
     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>
    152199</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 TracChangeset for help on using the changeset viewer.