Permalink
Browse files

Merge pull request #119 from sni/feature_hide_legend

add new url option hide_legend
  • Loading branch information...
lingej committed Dec 1, 2015
2 parents 48598f9 + f9c147e commit c015e016967e6aadf17af98371c9022eb5d3f4bb
Showing with 7 additions and 1 deletion.
  1. +3 −0 share/pnp/application/controllers/image.php
  2. +4 −1 share/pnp/application/models/rrdtool.php
@@ -31,6 +31,9 @@ public function index()
if($this->input->get('graph_only') !== null)
$this->rrdtool->config->conf['graph_only'] = 1;
if($this->input->get('hide_legend') !== null)
$this->rrdtool->config->conf['hide_legend'] = 1;
$this->data->getTimeRange($this->start,$this->end,$this->view);
if($this->tpl != ""){
@@ -107,7 +107,10 @@ public function doImage($RRD_CMD, $out='STDOUT') {
$command .= " --height=$height";
}
if ($height < 81 || (isset($conf['graph_only']) && $conf['graph_only'])){
$command .= " --only-graph ";
$command .= " --only-graph";
}
elseif (isset($conf['no_legend']) && $conf['no_legend']){
$command .= " --no-legend";
}
$command .= $RRD_CMD;

0 comments on commit c015e01

Please sign in to comment.