Changeset 399


Ignore:
Timestamp:
07/01/07 18:38:47 (14 years ago)
Author:
bastiaans
Message:

web/addons/job_monarch/search.php:

  • set host view for host detail

web/addons/job_monarch/index.php:

  • enable host view again

web/addons/job_monarch/host_view.php:

  • get available metrics from archive

web/addons/job_monarch/templates/host_view.tpl:

  • remove size restrictions from graphs
Location:
trunk/web/addons/job_monarch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/host_view.php

    r231 r399  
    6767        global $job_start, $job_stop;
    6868
     69        //print_r( $metrics );
     70
     71        //printf( "c %s\n", $clustername );
     72
     73        $trd = new TarchRrdGraph( $clustername, $hostname );
     74        $rrdirs = $trd->getRrdDirs( $period_start, $period_stop );
     75
    6976        $metrics = $metrics[$hostname];
    70         //print_r( $metrics );
     77        $mymetrics = array();
     78
     79        foreach( $rrdirs as $rrdir )
     80        {
     81                $ml     = $trd->dirList( $rrdir );
     82
     83                foreach( $ml as $lmetr )
     84                {
     85                        $metrn_fields   = explode( '.', $lmetr );
     86
     87                        $metrn          = $metrn_fields[0];
     88
     89                        if( !in_array( $metrn, $mymetrics ) )
     90                        {
     91                                $mymetrics[$metrn]      = $metrics[$metrn];
     92                        }
     93                }
     94        }
     95
    7196        $hosts_up = $hosts_up[$hostname];
    7297        //print_r( $hosts_up );
     
    106131        $tpl->assign("ip", $hosts_up[IP]);
    107132
    108         foreach ($metrics as $name => $v)
     133        foreach ($mymetrics as $name => $v)
    109134           {
    110135               if ($v[TYPE] == "string" or $v[TYPE]=="timestamp" or $always_timestamp[$name])
  • trunk/web/addons/job_monarch/index.php

    r398 r399  
    404404                break;
    405405
    406         //case "host":
    407 
    408         //      includeHostPage();
    409         //      break;
     406        case "host":
     407
     408                includeHostPage();
     409                break;
    410410
    411411        default:
     
    438438                break;
    439439
    440         //case "host":
    441 
    442         //      include "./host_view.php";
    443         //      makeHostView();
    444         //      break;
     440        case "host":
     441
     442                include "./host_view.php";
     443                makeHostView();
     444                break;
    445445
    446446        default:
  • trunk/web/addons/job_monarch/search.php

    r357 r399  
    500500                                        $val = $metrics[$host][$metricname];
    501501                                        $class = "metric";
    502                                         $host_link="\"?c=$cluster_url&h=$host_url&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop\"";
     502                                        $host_link="\"?view=host&c=$cluster_url&h=$host_url&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop\"";
    503503
    504504                                        if ($val[TYPE]=="timestamp" or $always_timestamp[$metricname]) {
  • trunk/web/addons/job_monarch/templates/host_view.tpl

    r149 r399  
    5151
    5252<TD ALIGN="CENTER" VALIGN="TOP" WIDTH="395">
    53 <IMG HEIGHT="147" WIDTH="395" ALT="{cluster_url} LOAD"
     53<IMG ALT="{cluster_url} LOAD"
    5454   SRC="./graph.php?g=load_report&z=medium&c={cluster_url}&{graphargs}">
    55 <IMG HEIGHT="160" WIDTH="395" ALT="{cluster_url} MEM"
     55<IMG ALT="{cluster_url} MEM"
    5656   SRC="./graph.php?g=mem_report&z=medium&c={cluster_url}&{graphargs}">
    57 <IMG HEIGHT="147" WIDTH="395" ALT="{cluster_url} CPU"
     57<IMG ALT="{cluster_url} CPU"
    5858   SRC="./graph.php?g=cpu_report&z=medium&c={cluster_url}&{graphargs}">
    59 <IMG HEIGHT="147" WIDTH="395" ALT="{cluster_url} NETWORK"
     59<IMG ALT="{cluster_url} NETWORK"
    6060   SRC="./graph.php?g=network_report&z=medium&c={cluster_url}&{graphargs}">
    61 <IMG HEIGHT="147" WIDTH="395" ALT="{cluster_url} PACKETS"
     61<IMG ALT="{cluster_url} PACKETS"
    6262   SRC="./graph.php?g=packet_report&z=medium&c={cluster_url}&{graphargs}">
    6363
     
    8383
    8484<!-- START BLOCK : vol_metric_info -->
    85 <IMG HEIGHT="147" WIDTH="395" ALT="{alt}" SRC="./graph.php?{graphargs}">{br}
     85<IMG ALT="{alt}" SRC="./graph.php?{graphargs}">{br}
    8686<!-- END BLOCK : vol_metric_info -->
    8787
Note: See TracChangeset for help on using the changeset viewer.