Remove pie charts from multi-views

refs #8565
This commit is contained in:
Matthias Jentsch 2015-05-18 13:56:35 +02:00
parent 6658415b6f
commit fe2ee3617b
4 changed files with 2 additions and 47 deletions

View File

@ -134,11 +134,6 @@ class Monitoring_HostsController extends Controller
}
$hostStates = (object)$this->hostList->getStateSummary();
$this->view->hostStatesPieChart = InlinePie::createFromStateSummary(
$hostStates,
$this->translate('Host State'),
InlinePie::$colorsHostStatesHandledUnhandled
);
$this->setAutorefreshInterval(15);
$this->view->rescheduleAllLink = Url::fromRequest()->setPath('monitoring/hosts/reschedule-check');

View File

@ -92,17 +92,7 @@ class Monitoring_ServicesController extends Controller
$this->view->objects = $this->serviceList;
$this->view->stats = $this->serviceList->getServiceStateSummary();
$this->view->serviceStates = true;
$this->view->serviceStatesPieChart = InlinePie::createFromStateSummary(
$this->view->stats,
$this->translate('Service State'),
InlinePie::$colorsServiceStatesHandleUnhandled
);
$this->view->hostStates = $this->serviceList->getHostStateSummary();
$this->view->hostStatesPieChart = InlinePie::createFromStateSummary(
$this->view->hostStates,
$this->translate('Service State'),
InlinePie::$colorsHostStatesHandledUnhandled
);
$this->_helper->viewRenderer('partials/command/objects-command-form', null, true);
return $form;
}
@ -149,19 +139,6 @@ class Monitoring_ServicesController extends Controller
$this->view->removeAckForm = $removeAckForm;
}
$serviceStates = $this->serviceList->getServiceStateSummary();
$this->view->serviceStatesPieChart = InlinePie::createFromStateSummary(
$serviceStates,
$this->translate('Service State'),
InlinePie::$colorsServiceStatesHandleUnhandled
);
$hostStates = $this->serviceList->getHostStateSummary();
$this->view->hostStatesPieChart = InlinePie::createFromStateSummary(
$hostStates,
$this->translate('Host State'),
InlinePie::$colorsHostStatesHandledUnhandled
);
$this->setAutorefreshInterval(15);
$this->view->rescheduleAllLink = Url::fromRequest()->setPath('monitoring/services/reschedule-check');
$this->view->downtimeAllLink = Url::fromRequest()->setPath('monitoring/services/schedule-downtime');
@ -170,8 +147,8 @@ class Monitoring_ServicesController extends Controller
);
$this->view->addCommentLink = Url::fromRequest()->setPath('monitoring/services/add-comment');
$this->view->deleteCommentLink = Url::fromRequest()->setPath('monitoring/services/delete-comment');
$this->view->stats = $serviceStates;
$this->view->hostStats = $hostStates;
$this->view->stats = $this->serviceList->getServiceStateSummary();
$this->view->hostStats = $this->serviceList->getHostStateSummary();
$this->view->objects = $this->serviceList;
$this->view->unhandledObjects = $this->serviceList->getUnhandledObjects();
$this->view->problemObjects = $this->serviceList->getProblemObjects();

View File

@ -5,11 +5,6 @@ $i = 0;
?>
<?php if (($hostCount = count($objects)) > 0): ?>
<div class="hbox-item">
<?= $this->translate('States:') ?>
&nbsp;<?= $hostStatesPieChart; ?>
</div>
<p>
<table class="state statesummary">
<tbody>
@ -40,7 +35,5 @@ $i = 0;
);
?>
</div>
</p>
<?php endif ?>

View File

@ -4,15 +4,6 @@ use Icinga\Module\Monitoring\Object\Service;
$i = 0;
?>
<?php if (($serviceCount = count($objects)) > 0): ?>
<div class="hbox-item">
<?= $this->translate('Service states:') ?>
&nbsp;<?= $serviceStatesPieChart; ?>
</div>
<div class="hbox-item">
<?= $this->translate('Host states:') ?>
&nbsp;<?= $hostStatesPieChart; ?>
</div>
<p>
<table class="state statesummary">
<tbody>
<?php foreach ($objects as $service): /** @var Service $service */ ?>
@ -41,5 +32,4 @@ $i = 0;
);
?>
</div>
</p>
<?php endif ?>