Changeset 811 for branches/0.4/web/addons/job_monarch/search.php
- Timestamp:
- 04/08/13 22:15:47 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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,
Note: See TracChangeset
for help on using the changeset viewer.