Changeset 603 for trunk


Ignore:
Timestamp:
02/17/09 00:19:52 (15 years ago)
Author:
ramonb
Message:

jobstore.php:

  • sort metrics list
  • include reports in metric list
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web2/addons/job_monarch/jobstore.php

    r602 r603  
    111111function getMetrics( $host=null )
    112112{
    113         global $metrics;
     113        global $metrics, $reports;
    114114
    115115        reset($metrics);
     116
     117        $context_metrics        = array();
     118
    116119        if( !$host)
    117120        {
    118           $firsthost = key($metrics);
     121                $firsthost = key($metrics);
    119122        }
    120123        else
    121124        {
    122           $firsthost = $host;
     125                $firsthost = $host;
    123126        }
    124127
    125128        $first_metrics = $metrics[$firsthost];
    126129
     130        foreach( $first_metrics as $metricname => $metricval )
     131        {
     132                $context_metrics[] = $metricname;
     133        }
     134
     135        foreach ($reports as $mr => $mfoo)
     136        {
     137                $context_metrics[] = $mr;
     138        }
     139
     140        sort( $context_metrics );
     141
    127142        $metric_list    = array();
    128 
    129143        $metric_count   = 0;
    130144
    131         foreach( $first_metrics as $metricname => $metricval )
     145        foreach( $context_metrics as $metricname )
    132146        {
    133147                $metric         = array();
Note: See TracChangeset for help on using the changeset viewer.