mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-18 02:22:53 -05:00
Remove enumHostForServiceList, enumHostList, enumServiceList from EditNodeForm.
These methods are present in the trait EnumList and EditNodeForm is already using that trait.
This commit is contained in:
parent
3904791438
commit
407d4f98db
1 changed files with 0 additions and 56 deletions
|
|
@ -348,43 +348,6 @@ class EditNodeForm extends QuickForm
|
|||
return $this;
|
||||
}
|
||||
|
||||
protected function enumHostForServiceList()
|
||||
{
|
||||
$names = $this->backend
|
||||
->select()
|
||||
->from('hostStatus', ['hostname' => 'host_name'])
|
||||
->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
|
||||
|
||||
return array_combine((array) $names, (array) $names);
|
||||
}
|
||||
|
||||
protected function enumHostList()
|
||||
{
|
||||
$names = $this->backend
|
||||
->select()
|
||||
->from('hostStatus', ['hostname' => 'host_name'])
|
||||
->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 enumHostStateList()
|
||||
{
|
||||
$hostStateList = [
|
||||
|
|
@ -396,25 +359,6 @@ class EditNodeForm extends QuickForm
|
|||
return $hostStateList;
|
||||
}
|
||||
|
||||
protected function enumServiceList($host)
|
||||
{
|
||||
$names = $this->backend
|
||||
->select()
|
||||
->from('serviceStatus', ['service' => 'service_description'])
|
||||
->where('host_name', $host)
|
||||
->applyFilter($this->getRestriction('monitoring/filter/objects'))
|
||||
->order('service_description')
|
||||
->getQuery()
|
||||
->fetchColumn();
|
||||
|
||||
$services = array();
|
||||
foreach ($names as $name) {
|
||||
$services[$host . ';' . $name] = $name;
|
||||
}
|
||||
|
||||
return $services;
|
||||
}
|
||||
|
||||
protected function enumServiceStateList()
|
||||
{
|
||||
$serviceStateList = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue