mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 21:04:25 +02:00
Remove unused piechart code
This commit is contained in:
parent
ef16ba5f48
commit
cb0ca6d6ac
@ -240,7 +240,6 @@ class LdapUserBackend extends UserBackend
|
|||||||
$users[] = $row->{$this->userNameAttribute};
|
$users[] = $row->{$this->userNameAttribute};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $users;
|
return $users;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleHostDowntimeCommandFor
|
|||||||
use Icinga\Module\Monitoring\Object\Host;
|
use Icinga\Module\Monitoring\Object\Host;
|
||||||
use Icinga\Module\Monitoring\Object\HostList;
|
use Icinga\Module\Monitoring\Object\HostList;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use Icinga\Web\Widget\Chart\InlinePie;
|
|
||||||
|
|
||||||
class Monitoring_HostsController extends Controller
|
class Monitoring_HostsController extends Controller
|
||||||
{
|
{
|
||||||
@ -58,11 +57,6 @@ class Monitoring_HostsController extends Controller
|
|||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
$this->view->objects = $this->hostList;
|
$this->view->objects = $this->hostList;
|
||||||
$this->view->hostStates = $hostStates;
|
$this->view->hostStates = $hostStates;
|
||||||
$this->view->hostStatesPieChart = $this->createPieChart(
|
|
||||||
$hostStates,
|
|
||||||
$this->translate('Host State'),
|
|
||||||
array('#44bb77', '#FF5566', '#E066FF', '#77AAFF')
|
|
||||||
);
|
|
||||||
$this->_helper->viewRenderer('partials/command/objects-command-form', null, true);
|
$this->_helper->viewRenderer('partials/command/objects-command-form', null, true);
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
@ -153,20 +147,6 @@ class Monitoring_HostsController extends Controller
|
|||||||
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
|
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
|
||||||
$this->view->commentsLink = Url::fromRequest()
|
$this->view->commentsLink = Url::fromRequest()
|
||||||
->setPath('monitoring/list/comments');
|
->setPath('monitoring/list/comments');
|
||||||
$this->view->hostStatesPieChart = $this->createPieChart(
|
|
||||||
$hostStates,
|
|
||||||
$this->translate('Host State'),
|
|
||||||
array('#44bb77', '#FF5566', '#E066FF', '#77AAFF')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function createPieChart(array $states, $title, array $colors)
|
|
||||||
{
|
|
||||||
$chart = new InlinePie(array_values($states), $title, $colors);
|
|
||||||
return $chart
|
|
||||||
->setSize(75)
|
|
||||||
->setTitle('')
|
|
||||||
->setSparklineClass('sparkline-multi');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,7 +16,6 @@ use Icinga\Module\Monitoring\Object\Host;
|
|||||||
use Icinga\Module\Monitoring\Object\Service;
|
use Icinga\Module\Monitoring\Object\Service;
|
||||||
use Icinga\Module\Monitoring\Object\ServiceList;
|
use Icinga\Module\Monitoring\Object\ServiceList;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use Icinga\Web\Widget\Chart\InlinePie;
|
|
||||||
|
|
||||||
class Monitoring_ServicesController extends Controller
|
class Monitoring_ServicesController extends Controller
|
||||||
{
|
{
|
||||||
@ -94,16 +93,6 @@ class Monitoring_ServicesController extends Controller
|
|||||||
$this->view->objects = $this->serviceList;
|
$this->view->objects = $this->serviceList;
|
||||||
$this->view->serviceStates = $serviceStates;
|
$this->view->serviceStates = $serviceStates;
|
||||||
$this->view->hostStates = $hostStates;
|
$this->view->hostStates = $hostStates;
|
||||||
$this->view->serviceStatesPieChart = $this->createPieChart(
|
|
||||||
$serviceStates,
|
|
||||||
$this->translate('Service State'),
|
|
||||||
array('#44bb77', '#FFCC66', '#FF5566', '#E066FF', '#77AAFF')
|
|
||||||
);
|
|
||||||
$this->view->hostStatesPieChart = $this->createPieChart(
|
|
||||||
$hostStates,
|
|
||||||
$this->translate('Host State'),
|
|
||||||
array('#44bb77', '#FF5566', '#E066FF', '#77AAFF')
|
|
||||||
);
|
|
||||||
$this->_helper->viewRenderer('partials/command/objects-command-form', null, true);
|
$this->_helper->viewRenderer('partials/command/objects-command-form', null, true);
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
@ -234,30 +223,8 @@ class Monitoring_ServicesController extends Controller
|
|||||||
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
|
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
|
||||||
$this->view->commentsLink = Url::fromRequest()
|
$this->view->commentsLink = Url::fromRequest()
|
||||||
->setPath('monitoring/list/comments');
|
->setPath('monitoring/list/comments');
|
||||||
/*
|
|
||||||
$this->view->serviceStatesPieChart = $this->createPieChart(
|
|
||||||
$serviceStates,
|
|
||||||
$this->translate('Service State'),
|
|
||||||
array('#44bb77', '#FFCC66', '#FF5566', '#E066FF', '#77AAFF')
|
|
||||||
);
|
|
||||||
$this->view->hostStatesPieChart = $this->createPieChart(
|
|
||||||
$hostStates,
|
|
||||||
$this->translate('Host State'),
|
|
||||||
array('#44bb77', '#FF5566', '#E066FF', '#77AAFF')
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function createPieChart(array $states, $title, array $colors)
|
|
||||||
{
|
|
||||||
$chart = new InlinePie(array_values($states), $title, $colors);
|
|
||||||
return $chart
|
|
||||||
->setSize(75)
|
|
||||||
->setTitle('')
|
|
||||||
->setSparklineClass('sparkline-multi');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a service comment
|
* Add a service comment
|
||||||
*/
|
*/
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
<?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?>
|
<?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="hbox-item">
|
|
||||||
<?= $hostStatesPieChart; ?>
|
|
||||||
</div>
|
|
||||||
<div class="hbox-item" style="font-size: 14px">
|
<div class="hbox-item" style="font-size: 14px">
|
||||||
<?php foreach (array_filter($hostStates) as $text => $count): ?>
|
<?php foreach (array_filter($hostStates) as $text => $count): ?>
|
||||||
<?= sprintf('%s: %u', $this->translate(strtoupper($text)), $count); ?><br>
|
<?= sprintf('%s: %u', $this->translate(strtoupper($text)), $count); ?><br>
|
||||||
|
@ -69,7 +69,6 @@ use Icinga\Web\Url;
|
|||||||
'Issue commands to the problematic services.'),
|
'Issue commands to the problematic services.'),
|
||||||
'<span class="badge badge-critical">' . $unhandledCount . '</span>') ?>
|
'<span class="badge badge-critical">' . $unhandledCount . '</span>') ?>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
sprintf(
|
sprintf(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user