Cleanup the code

Remove unnecessary comments and unused namespaces.
This commit is contained in:
raviks789 2021-11-18 12:32:46 +01:00
parent 7b41906881
commit 3904791438
2 changed files with 0 additions and 42 deletions

View file

@ -487,47 +487,6 @@ class AddNodeForm extends QuickForm
return $serviceStateList;
}
// protected function enumHostListByFilter($filter)
// {
// $names = $this->backend
// ->select()
// ->from('hostStatus', ['hostname' => 'host_name'])
// ->applyFilter(Filter::fromQueryString($filter))
// ->applyFilter($this->getRestriction('monitoring/filter/objects'))
// ->order('host_name')
// ->getQuery()
// ->fetchColumn();
//
// // fetchPairs doesn't seem to work when using the same column with
// // different aliases twice
// $res = array();
// $suffix = ';Hoststatus';
// foreach ($names as $name) {
// $res[$name . $suffix] = $name;
// }
//
// return $res;
// }
//
// protected function enumServiceListByFilter($filter)
// {
// $objects = $this->backend
// ->select()
// ->from('serviceStatus', ['host' => 'host_name', 'service' => 'service_description'])
// ->applyFilter(Filter::fromQueryString($filter))
// ->applyFilter($this->getRestriction('monitoring/filter/objects'))
// ->order('service_description')
// ->getQuery()
// ->fetchAll();
//
// $services = array();
// foreach ($objects as $object) {
// $services[$object->host . ';' . $object->service] = $object->host . ':' . $object->service;
// }
//
// return $services;
// }
protected function hasProcesses()
{
return count($this->enumProcesses()) > 0;

View file

@ -5,7 +5,6 @@ namespace Icinga\Module\Businessprocess\Forms;
use Icinga\Module\Businessprocess\BpNode;
use Icinga\Module\Businessprocess\BpConfig;
use Icinga\Module\Businessprocess\Common\IcingadbDatabase;
use Icinga\Module\Businessprocess\IcingaDbObject;
use Icinga\Module\Businessprocess\Modification\ProcessChanges;
use Icinga\Module\Businessprocess\Web\Form\QuickForm;
use Icinga\Module\Monitoring\Backend\MonitoringBackend;