Changeset 1756

Show
Ignore:
Timestamp:
12/03/08 11:31:47 (1 month ago)
Author:
jlmartinez
Message:

/rrdgraph now accepts new params

vertical-label: Displays a text in the left margin of the graph
title: Displays a title at the top of the graph

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/DEV-capside/opsview-web/lib/Opsview/Web/Controller/RRDgraph.pm

    r1651 r1756  
    6262        my $showlegend = $params->{legend}; 
    6363        $showlegend = 1 if not defined $showlegend; 
     64        my $vertical_label = $params->{'vertical-label'}; 
     65        my $title = $params->{'title'}; 
    6466        my $stacked = $params->{stack} || 0; 
    6567        my $type = "LINE1"; 
     
    140142                "--width", $width 
    141143        ]; 
     144        if (defined $vertical_label){ 
     145                push @$rrdoptions, "--vertical-label", $vertical_label; 
     146        } 
     147        if (defined $title){ 
     148                push @$rrdoptions, "--title", $title; 
     149        } 
    142150        foreach my $dsname (sort keys %$ds) { 
    143151                foreach my $hash (@{ $ds->{$dsname} }) {