Merge branch 'ent-11233-bug-dashboard-no-data' into 'develop'

Ent 11233 bug dashboard no data

See merge request artica/pandorafms!5911
This commit is contained in:
Matias Didier 2023-05-22 08:19:54 +00:00
commit efd2adac06
1 changed files with 13 additions and 10 deletions

View File

@ -561,7 +561,6 @@ class BasicChart extends Widget
global $config; global $config;
$size = parent::getSize(); $size = parent::getSize();
hd($size, true);
include_once $config['homedir'].'/include/functions_graph.php'; include_once $config['homedir'].'/include/functions_graph.php';
include_once $config['homedir'].'/include/functions_agents.php'; include_once $config['homedir'].'/include/functions_agents.php';
@ -625,16 +624,20 @@ class BasicChart extends Widget
], ],
]; ];
$graph = \grafico_modulo_sparse($params);
$output = '<div class="container-center widget-mrgn-0px">'; $output = '<div class="container-center widget-mrgn-0px">';
$output .= '<div class="basic-chart-title">'; if (str_contains($graph, '<img') === false) {
$output .= '<span style="color:'.$this->values['colorLabel'].'; font-size:'.$this->values['sizeLabel'].'px;">'; $output .= '<div class="basic-chart-title">';
$output .= ((bool) $this->values['showLabel'] === true) ? $title : ''; $output .= '<span style="color:'.$this->values['colorLabel'].'; font-size:'.$this->values['sizeLabel'].'px;">';
$output .= '</span>'; $output .= ((bool) $this->values['showLabel'] === true) ? $title : '';
$output .= '<span style="color:'.$color_status.'; font-size:'.$this->values['sizeValue'].'px;">'; $output .= '</span>';
$output .= ((bool) $this->values['showValue'] === true) ? $value : ''; $output .= '<span style="color:'.$color_status.'; font-size:'.$this->values['sizeValue'].'px;">';
$output .= '</span>'; $output .= ((bool) $this->values['showValue'] === true) ? $value : '';
$output .= '</div>'; $output .= '</span>';
$output .= \grafico_modulo_sparse($params); $output .= '</div>';
}
$output .= $graph;
$output .= '</div>'; $output .= '</div>';
return $output; return $output;
} }