From: robert Date: Tue, 7 Jun 2005 15:20:39 +0000 (+0000) Subject: make some additional scaling options available (logarithmic, claculated ranges);... X-Git-Url: https://git-public.kairo.at/?a=commitdiff_plain;h=d6ad10a5002de85419858a9881bc46835946c5c0;p=php-utility-classes.git make some additional scaling options available (logarithmic, claculated ranges); support info text for normal pages, only show defined long descriptions --- diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 60b925f..2593e75 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -628,11 +628,15 @@ class rrdstat { if (($gconf['height'] <= 32) && isset($gconf['thumb']) && ($gconf['thumb'])) { $gOpts .= ' --only-graph'; } } if (!isset($gconf['show_legend']) || (!$gconf['show_legend'])) { $gOpts .= ' --no-legend'; } + if (isset($gconf['logarithmic']) && $gconf['logarithmic']) { $gOpts .= ' --logarithmic'; } if (isset($gconf['min_y'])) { $gOpts .= ' --lower-limit '.$gconf['min_y']; } if (isset($gconf['max_y'])) { $gOpts .= ' --upper-limit '.$gconf['max_y']; } if (isset($gconf['fix_scale_y']) && $gconf['fix_scale_y']) { $gOpts .= ' --rigid'; } if (isset($gconf['grid_x'])) { $gOpts .= ' --x-grid '.$gconf['grid_x']; } if (isset($gconf['grid_y'])) { $gOpts .= ' --y-grid '.$gconf['grid_y']; } + if (isset($gconf['gridfit']) && (!$gconf['gridfit'])) { $gOpts .= ' --no-gridfit'; } + if (isset($gconf['calc_scale_y']) && $gconf['calc_scale_y']) { $gOpts .= ' --alt-autoscale'; } + if (isset($gconf['calc_max_y']) && $gconf['calc_max_y']) { $gOpts .= ' --alt-autoscale-max'; } if (isset($gconf['units_exponent'])) { $gOpts .= ' --units-exponent '.$gconf['units_exponent']; } if (isset($gconf['units_length'])) { $gOpts .= ' --units-length '.$gconf['units_length']; } if (!isset($gconf['force_recreate']) || (!$gconf['force_recreate'])) { $gOpts .= ' --lazy'; } @@ -847,7 +851,7 @@ class rrdstat { $out .= ''; $out .= '

'.$ptitle.'

'; - if (isset($pconf['text_intro'])) { $out .= '

'.$pconf['text_intro'].'

'; } + if (isset($pconf['text_intro']) && strlen($pconf['text_intro'])) { $out .= '

'.$pconf['text_intro'].'

'; } $stats = $this->h_page_statsArray($pconf); @@ -957,6 +961,7 @@ class rrdstat { $out .= ''; $out .= '

'.$ptitle.'

'; + if (isset($pconf['text_intro']) && strlen($pconf['text_intro'])) { $out .= '

'.$pconf['text_intro'].'

'; } if (!isset($pconf['show_update']) || $pconf['show_update']) { $out .= '

'; if (is_null($this->last_update())) { $up_time = dgettext($td, 'unknown'); } @@ -1023,17 +1028,19 @@ class rrdstat { $out .= '

'.$ltitle.'

'; $out .= ''; foreach ($gmeta['legend'] as $field=>$legend) { - $out .= ''; + $out .= ''; + $out .= ''; } - $out .= '>'.$field.''; - $out .= ''; - $out .= ''; } $out .= '
'.$legend['desc_long'].'
'.$legend['desc_long'].'
'; $out .= '';