Fix BarChart padding in Dashboard
Use max-width instead of width in the chart layout to make better use of the available space, but prevent the charts from growing too big. Use a bigger weight and height in the default dashboard configuration. fixes #6744
This commit is contained in:
parent
091ddbe552
commit
53c9292b41
|
@ -23,13 +23,21 @@ sort = host_severity
|
||||||
title = "Landing page"
|
title = "Landing page"
|
||||||
|
|
||||||
[Landing.Hostgroups]
|
[Landing.Hostgroups]
|
||||||
url = "monitoring/chart/hostgroup?height=400&width=500"
|
url = "monitoring/chart/hostgroup"
|
||||||
|
height = 540
|
||||||
|
width = 540
|
||||||
|
|
||||||
[Landing.Servicegroups]
|
[Landing.Servicegroups]
|
||||||
url = "monitoring/chart/servicegroup?height=360&width=450"
|
url = "monitoring/chart/servicegroup"
|
||||||
|
height = 540
|
||||||
|
width = 540
|
||||||
|
|
||||||
[Landing.Unhandled Problem Services]
|
[Landing.Unhandled Problem Services]
|
||||||
url = "monitoring/list/services?service_handled=0&service_problem=1"
|
url = "monitoring/list/services"
|
||||||
|
service_handled = 0
|
||||||
|
service_problem = 1
|
||||||
|
|
||||||
[Landing.Unhandled Problem Hosts]
|
[Landing.Unhandled Problem Hosts]
|
||||||
url = "monitoring/list/hosts?host_handled=0&host_problem=1"
|
url = "monitoring/list/hosts"
|
||||||
|
host_handled = 0
|
||||||
|
host_problem = 1
|
||||||
|
|
|
@ -94,8 +94,8 @@ class Monitoring_ChartController extends Controller
|
||||||
'services_pending'
|
'services_pending'
|
||||||
)
|
)
|
||||||
)->getQuery()->fetchAll();
|
)->getQuery()->fetchAll();
|
||||||
$this->view->height = intval($this->getParam('height', 220));
|
$this->view->height = intval($this->getParam('height', 500));
|
||||||
$this->view->width = intval($this->getParam('width', 520));
|
$this->view->width = intval($this->getParam('width', 500));
|
||||||
if (count($query) === 1) {
|
if (count($query) === 1) {
|
||||||
$this->drawGroupPie($query[0]);
|
$this->drawGroupPie($query[0]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -119,8 +119,8 @@ class Monitoring_ChartController extends Controller
|
||||||
'services_pending'
|
'services_pending'
|
||||||
)
|
)
|
||||||
)->getQuery()->fetchAll();
|
)->getQuery()->fetchAll();
|
||||||
$this->view->height = intval($this->getParam('height', 220));
|
$this->view->height = intval($this->getParam('height', 500));
|
||||||
$this->view->width = intval($this->getParam('width', 520));
|
$this->view->width = intval($this->getParam('width', 500));
|
||||||
|
|
||||||
$this->drawServiceGroupChart($query);
|
$this->drawServiceGroupChart($query);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
<div style="width:<?= $this->width; ?>px;height:<?= $this->height; ?>px;margin:auto;">
|
<div style="max-width:<?= $this->width; ?>px;max-height:<?= $this->height; ?>px;margin:auto;">
|
||||||
<?=
|
<?=
|
||||||
$chart->render();
|
$chart->render();
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
<div style="width:<?= $this->width; ?>px;height:<?= $this->height; ?>px">
|
<div style="max-width:<?= $this->width; ?>px;max-height:<?= $this->height; ?>px;margin:auto;">
|
||||||
<?=
|
<?=
|
||||||
$chart->render();
|
$chart->render();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue