- Timestamp:
- 04/08/13 22:15:47 (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
r794 r811 61 61 $filter = array(); 62 62 63 if( !isset($view) ) $view = "overview";63 if( !isset($view) && $clustername!='') $view = "overview"; 64 64 if( !isset($sortorder) ) $sortorder = "desc"; 65 65 if( !isset($sortby) ) $sortby = "id"; … … 238 238 } 239 239 240 if (!count($metrics) && $view!=' search' && $view!='host')240 if (!count($metrics) && $view!='' && $view!='search' && $view!='host') 241 241 { 242 242 echo "<h4>Cannot find any metrics for selected cluster \"$clustername\", exiting.</h4>\n"; … … 322 322 #$range = "job"; 323 323 324 if( $page_call != "host_view")324 if( ( $page_call != "host_view" ) && ( $page_call != "search" ) ) 325 325 { 326 326 … … 505 505 default: 506 506 507 include "./ overview.php";508 make Overview();507 include "./meta_view.php"; 508 makeMetaview(); 509 509 break; 510 510 } -
branches/0.4/web/addons/job_monarch/search.php
r810 r811 226 226 global $end_from_time, $end_to_time, $filter, $default_showhosts, $m, $hosts_up, $hc; 227 227 global $period_start, $period_stop, $sortby, $sortorder, $COLUMN_REQUESTED_MEMORY; 228 global $SEARCH_RESULT_LIMIT, $COLUMN_NODES, $metricname, $self ;228 global $SEARCH_RESULT_LIMIT, $COLUMN_NODES, $metricname, $self, $conf; 229 229 230 230 $longtitle = "Batch Archive Search :: Powered by Job Monarch!"; … … 420 420 } 421 421 422 $trd = new TarchRrdGraph( $clustername, $host ); 423 $rrd_dirs = $trd->getRrdDirs( $period_start, $period_stop ); 424 425 $metric_menu = "<B>Metric</B> " 426 ."<SELECT NAME=\"m\" OnChange=\"toga_form.submit();\">\n"; 427 428 $archive_reports = array( "load_report", "cpu_report", "network_report", "packet_report", "mem_report" ); 429 $file_metrics = $trd->dirList( $rrd_dirs[0] ); 430 431 $archive_metrics = array(); 432 433 foreach( $file_metrics as $k ) 434 { 435 $a_metric_file = explode( '.', $k); 436 $archive_metrics[] = $a_metric_file[0]; 437 } 438 439 $sorted_metrics = array_merge( $archive_reports, $archive_metrics ); 440 441 asort( $sorted_metrics ); 442 443 $selected_metric = $conf['default_metric']; 444 445 if( $metricname != '') 446 { 447 $selected_metric = $metricname; 448 } 449 450 foreach( $sorted_metrics as $k ) 451 { 452 $url = rawurlencode($k); 453 $metric_menu .= "<OPTION VALUE=\"$url\" "; 454 if ($k == $selected_metric ) 455 $metric_menu .= "SELECTED"; 456 $metric_menu .= ">$k\n"; 457 } 458 $metric_menu .= "</SELECT>\n"; 459 460 $tpl_data->assign("metric_menu", $metric_menu ); 461 422 462 # First pass to find the max value in all graphs for this 423 463 # metric. The $start,$end variables comes from get_context.php, -
branches/0.4/web/addons/job_monarch/templates/search.tpl
r806 r811 266 266 <INPUT TYPE="HIDDEN" NAME="period_start" VALUE="{$period_start}"> 267 267 <INPUT TYPE="HIDDEN" NAME="period_stop" VALUE="{$period_stop}"> 268 <BR><B R><B>Graph/from268 <BR><B>Graph {$metric_menu} from 269 269 <INPUT TYPE="text" NAME="period_start_pick" VALUE="{$period_start}" ALT="Start time" DISABLED="TRUE"> 270 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">
Note: See TracChangeset
for help on using the changeset viewer.