Changeset 780
- Timestamp:
- 03/29/13 22:05:27 (11 years ago)
- Location:
- branches/0.4/web/addons/job_monarch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/web/addons/job_monarch/index.php
r776 r780 236 236 } 237 237 238 if (!count($metrics) && $view!='search' )238 if (!count($metrics) && $view!='search' && $view!='host') 239 239 { 240 240 echo "<h4>Cannot find any metrics for selected cluster \"$clustername\", exiting.</h4>\n"; … … 344 344 $tpl_data->assign("metric_menu", $metric_menu ); 345 345 346 if( $view == " search" or $view == "host" or $view == "overview-host" )346 if( $view == "host" or $view == "overview-host" ) 347 347 { 348 348 $tpl_data->assign("timeperiod", "yes" ); -
branches/0.4/web/addons/job_monarch/search.php
r779 r780 304 304 $node_list["req_cpu"]= makeTime( TimeToEpoch( $job['requested_time'] ) ); 305 305 306 if( $COLUMN_REQUESTED_MEMORY ) { 306 if( $COLUMN_REQUESTED_MEMORY ) 307 { 307 308 $node_list["column_req_mem"] = "yes"; 308 309 $node_list["req_memory"]= $job['requested_memory']; 309 310 } 310 if( $COLUMN_NODES) { 311 if( $COLUMN_NODES) 312 { 311 313 312 314 $job_nodes = array(); 313 315 314 316 foreach( $nodes[$foundid] as $mynode ) 315 $job_nodes[] = $mynode['hostname']; 316 317 $node_list["column_nodes"] = "yes"; 317 { 318 if( strpos( $mynode['hostname'], "." ) !== false ) 319 { 320 $shorthost = explode( '.', $mynode['hostname'] ); 321 $job_nodes[] = $shorthost[0]; 322 } 323 else 324 { 325 $job_nodes[] = $mynode['hostname']; 326 } 327 } 328 329 $node_list["column_nodes_hostnames"] = "yes"; 318 330 $nodes_hostnames = implode( " ", $job_nodes ); 319 331 $node_list["nodes_hostnames"]= $nodes_hostnames; … … 357 369 $tpl_data->assign("checked$showhosts", "checked"); 358 370 359 # Present a width list360 $cols_menu = "<SELECT NAME=\"hc\" OnChange=\"archive_search_form.submit();\">\n";361 362 $hostcols = ($hc) ? $hc : 4;363 364 foreach(range(1,25) as $cols) {365 $cols_menu .= "<OPTION VALUE=$cols ";366 if ($cols == $hostcols)367 $cols_menu .= "SELECTED";368 $cols_menu .= ">$cols\n";369 }370 $cols_menu .= "</SELECT>\n";371 372 $tpl_data->assign("metric","$metricname $units");373 $tpl_data->assign("id", $id);374 # Host columns menu defined in header.php375 $tpl_data->assign("cols_menu", $cols_menu);376 377 371 if( $showhosts ) { 378 372 … … 387 381 $period_stop = datetimeToEpoch( $period_stop ); 388 382 389 # $tpl_data->gotoBlock( "timeperiod" );390 391 #$tpl_data->assign("period_start", epochToDatetime( $period_start ) );392 #$tpl_data->assign("period_stop", epochToDatetime( $period_stop ) );383 $tpl_data->assign( "timeperiod", "yes" ); 384 385 $tpl_data->assign("period_start", epochToDatetime( $period_start ) ); 386 $tpl_data->assign("period_stop", epochToDatetime( $period_stop ) ); 393 387 394 388 $hosts_up = array(); … … 447 441 $textval = $val['VAL']." ".$val['UNITS']; 448 442 } else { 449 $graphargs = "z= small&c=$cluster_url&m=$metricname&h=$host_url&v=".$val['VAL']."&x=$max&n=$min&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop&min=$min&max=$max";443 $graphargs = "z=medium&c=$cluster_url&m=$metricname&h=$host_url&v=".$val['VAL']."&x=$max&n=$min&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop&min=$min&max=$max"; 450 444 } 451 445 if ($textval) { -
branches/0.4/web/addons/job_monarch/templates/search.tpl
r778 r780 243 243 {/if} 244 244 <TD>{$nodes}/{$cpus}</TD> 245 {if "$column_ req_mem" == "yes"}245 {if "$column_nodes_hostnames" == "yes"} 246 246 <TD>{$nodes_hostnames}</TD> 247 247 {/if} … … 263 263 no<INPUT type=radio name="sh" value="0" OnClick="archive_search_form.submit();" {$checked0}> 264 264 </FONT> 265 | 266 job <strong>{$id}</strong> metric <strong>{$metric}</strong> 267 | 268 <FONT SIZE="-1"> 269 Columns {$cols_menu} 270 </FONT><BR> 265 {if "$timeperiod" == "yes"} 266 <INPUT TYPE="HIDDEN" NAME="period_start" VALUE="{$period_start}"> 267 <INPUT TYPE="HIDDEN" NAME="period_stop" VALUE="{$period_stop}"> 268 <BR><BR><B>Graph/ from 269 <INPUT TYPE="text" NAME="period_start_pick" VALUE="{$period_start}" ALT="Start time" DISABLED="TRUE"> 270 <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"> 271 <img src="cal.gif" width="16" height="16" border="0"></a> 272 <a href="#" onClick="javascript: document.{$form_name}.period_start_pick.value=''" alt="Click here to clear field" title="Click here to clear field"> 273 <IMG SRC="redcross.jpg" BORDER=0></A> 274 to <INPUT TYPE="text" NAME="period_stop_pick" VALUE="{$period_stop}" ALT="Stop time" DISABLED="TRUE"> 275 <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"> 276 <img src="cal.gif" width="16" height="16" border="0"></a> 277 <a href="#" onClick="javascript: document.{$form_name}.period_stop_pick.value=''" alt="Click here to clear field" title="Click here to clear field"> 278 </B> 279 <IMG SRC="redcross.jpg" BORDER=0></A> 280 281 {if "$hostview" == "yes"} 282 <INPUT TYPE="HIDDEN" NAME="job_start" VALUE="{$job_start}"> 283 <INPUT TYPE="HIDDEN" NAME="job_stop" VALUE="{$job_stop}"> 284 {/if} 285 <INPUT TYPE="submit" onClick="setPeriodTimestamps();" VALUE="Refresh graphs"> 286 {/if} 271 287 </TD> 272 288 </TR> … … 275 291 276 292 <CENTER> 277 <TABLE> 278 < TR>293 294 <div id="monarchimage"> 279 295 {loop $sorted_list} 280 296 {$metric_image}{$br} 281 297 {/loop} 282 </TR> 283 </TABLE> 298 </div> 284 299 285 300 </CENTER>
Note: See TracChangeset
for help on using the changeset viewer.