mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 21:34:28 +02:00
Only apply SVG responsiveness when not rendered in compact mode
Don't let SVGs grow vertically in when displayed in the dashboard, to avoid wasted space
This commit is contained in:
parent
648debff88
commit
e799d65d3f
@ -22,6 +22,11 @@ use Icinga\Chart\Unit\StaticAxis;
|
|||||||
|
|
||||||
class Monitoring_ChartController extends Controller
|
class Monitoring_ChartController extends Controller
|
||||||
{
|
{
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->view->compact = $this->_request->getParam('view') === 'compact';
|
||||||
|
}
|
||||||
|
|
||||||
public function testAction()
|
public function testAction()
|
||||||
{
|
{
|
||||||
$this->chart = new GridChart();
|
$this->chart = new GridChart();
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
|
|
||||||
<div class="chart">
|
<?php if (! $this->compact) { ?>
|
||||||
<?=
|
<div class="svg-container-responsive">
|
||||||
$chart->render();
|
<?= $chart->render(); ?>
|
||||||
?>
|
<?= isset($chart2) ? $chart2->render() : ''; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?= $chart->render(); ?>
|
||||||
|
<?php } ?>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
<div class="chart">
|
<?php if (! $this->compact) { ?>
|
||||||
<?=
|
<div class="svg-container-responsive">
|
||||||
$chart->render();
|
<?= $chart->render(); ?>
|
||||||
?>
|
</div>
|
||||||
</div>
|
<?php } else { ?>
|
||||||
|
<?= $chart->render(); ?>
|
||||||
|
<?php } ?>
|
||||||
|
@ -175,6 +175,7 @@ ul.tree li a.error:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* charts should grow as much as possible but never beyond the current viewport's size */
|
/* charts should grow as much as possible but never beyond the current viewport's size */
|
||||||
div.chart {
|
.svg-container-responsive {
|
||||||
height: 90vh;
|
padding: 1.5em;
|
||||||
|
height: 80vh;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user