mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
parent
64a4dc67bc
commit
f6cbc17ff7
@ -189,10 +189,12 @@ class Monitoring_ShowController extends Controller
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($object->getType() === $object::TYPE_HOST) {
|
if ($object->getType() === $object::TYPE_HOST) {
|
||||||
|
$isService = false;
|
||||||
$params = array(
|
$params = array(
|
||||||
'host' => $object->getName()
|
'host' => $object->getName()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
$isService = true;
|
||||||
$params = array(
|
$params = array(
|
||||||
'host' => $object->getHost()->getName(),
|
'host' => $object->getHost()->getName(),
|
||||||
'service' => $object->getName()
|
'service' => $object->getName()
|
||||||
@ -202,17 +204,26 @@ class Monitoring_ShowController extends Controller
|
|||||||
$tabs->add(
|
$tabs->add(
|
||||||
'host',
|
'host',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Host'),
|
'title' => sprintf(
|
||||||
|
$this->translate('Show detailed information for host %s'),
|
||||||
|
$isService ? $object->getHost()->getName() : $object->getName()
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Host'),
|
||||||
'icon' => 'host',
|
'icon' => 'host',
|
||||||
'url' => 'monitoring/show/host',
|
'url' => 'monitoring/show/host',
|
||||||
'urlParams' => $params,
|
'urlParams' => $params,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (isset($params['service'])) {
|
if ($isService) {
|
||||||
$tabs->add(
|
$tabs->add(
|
||||||
'service',
|
'service',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Service'),
|
'title' => sprintf(
|
||||||
|
$this->translate('Show detailed information for service %s on host %s'),
|
||||||
|
$object->getName(),
|
||||||
|
$object->getHost()->getName()
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Service'),
|
||||||
'icon' => 'service',
|
'icon' => 'service',
|
||||||
'url' => 'monitoring/show/service',
|
'url' => 'monitoring/show/service',
|
||||||
'urlParams' => $params,
|
'urlParams' => $params,
|
||||||
@ -222,7 +233,11 @@ class Monitoring_ShowController extends Controller
|
|||||||
$tabs->add(
|
$tabs->add(
|
||||||
'services',
|
'services',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Services'),
|
'title' => sprintf(
|
||||||
|
$this->translate('List all services on host %s'),
|
||||||
|
$isService ? $object->getHost()->getName() : $object->getName()
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Services'),
|
||||||
'icon' => 'services',
|
'icon' => 'services',
|
||||||
'url' => 'monitoring/show/services',
|
'url' => 'monitoring/show/services',
|
||||||
'urlParams' => $params,
|
'urlParams' => $params,
|
||||||
@ -232,7 +247,15 @@ class Monitoring_ShowController extends Controller
|
|||||||
$tabs->add(
|
$tabs->add(
|
||||||
'history',
|
'history',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('History'),
|
'title' => $isService
|
||||||
|
? sprintf(
|
||||||
|
$this->translate('Show all event records of service %s on host %s'),
|
||||||
|
$object->getName(),
|
||||||
|
$object->getHost()->getName()
|
||||||
|
)
|
||||||
|
: sprintf($this->translate('Show all event records of host %s'), $object->getName())
|
||||||
|
,
|
||||||
|
'label' => $this->translate('History'),
|
||||||
'icon' => 'rewind',
|
'icon' => 'rewind',
|
||||||
'url' => 'monitoring/show/history',
|
'url' => 'monitoring/show/history',
|
||||||
'urlParams' => $params,
|
'urlParams' => $params,
|
||||||
|
@ -164,10 +164,12 @@ abstract class MonitoredObjectController extends Controller
|
|||||||
$tabs = $this->getTabs();
|
$tabs = $this->getTabs();
|
||||||
$object = $this->object;
|
$object = $this->object;
|
||||||
if ($object->getType() === $object::TYPE_HOST) {
|
if ($object->getType() === $object::TYPE_HOST) {
|
||||||
|
$isService = false;
|
||||||
$params = array(
|
$params = array(
|
||||||
'host' => $object->getName()
|
'host' => $object->getName()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
$isService = true;
|
||||||
$params = array(
|
$params = array(
|
||||||
'host' => $object->getHost()->getName(),
|
'host' => $object->getHost()->getName(),
|
||||||
'service' => $object->getName()
|
'service' => $object->getName()
|
||||||
@ -176,17 +178,26 @@ abstract class MonitoredObjectController extends Controller
|
|||||||
$tabs->add(
|
$tabs->add(
|
||||||
'host',
|
'host',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Host'),
|
'title' => sprintf(
|
||||||
|
$this->translate('Show detailed information for host %s'),
|
||||||
|
$isService ? $object->getHost()->getName() : $object->getName()
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Host'),
|
||||||
'icon' => 'host',
|
'icon' => 'host',
|
||||||
'url' => 'monitoring/host/show',
|
'url' => 'monitoring/host/show',
|
||||||
'urlParams' => $params
|
'urlParams' => $params
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (isset($params['service'])) {
|
if ($isService) {
|
||||||
$tabs->add(
|
$tabs->add(
|
||||||
'service',
|
'service',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Service'),
|
'title' => sprintf(
|
||||||
|
$this->translate('Show detailed information for service %s on host %s'),
|
||||||
|
$object->getName(),
|
||||||
|
$object->getHost()->getName()
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Service'),
|
||||||
'icon' => 'service',
|
'icon' => 'service',
|
||||||
'url' => 'monitoring/service/show',
|
'url' => 'monitoring/service/show',
|
||||||
'urlParams' => $params
|
'urlParams' => $params
|
||||||
@ -196,7 +207,11 @@ abstract class MonitoredObjectController extends Controller
|
|||||||
$tabs->add(
|
$tabs->add(
|
||||||
'services',
|
'services',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Services'),
|
'title' => sprintf(
|
||||||
|
$this->translate('List all services on host %s'),
|
||||||
|
$isService ? $object->getHost()->getName() : $object->getName()
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Services'),
|
||||||
'icon' => 'services',
|
'icon' => 'services',
|
||||||
'url' => 'monitoring/show/services',
|
'url' => 'monitoring/show/services',
|
||||||
'urlParams' => $params
|
'urlParams' => $params
|
||||||
@ -206,7 +221,15 @@ abstract class MonitoredObjectController extends Controller
|
|||||||
$tabs->add(
|
$tabs->add(
|
||||||
'history',
|
'history',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('History'),
|
'title' => $isService
|
||||||
|
? sprintf(
|
||||||
|
$this->translate('Show all event records of service %s on host %s'),
|
||||||
|
$object->getName(),
|
||||||
|
$object->getHost()->getName()
|
||||||
|
)
|
||||||
|
: sprintf($this->translate('Show all event records of host %s'), $object->getName())
|
||||||
|
,
|
||||||
|
'label' => $this->translate('History'),
|
||||||
'icon' => 'rewind',
|
'icon' => 'rewind',
|
||||||
'url' => 'monitoring/show/history',
|
'url' => 'monitoring/show/history',
|
||||||
'urlParams' => $params
|
'urlParams' => $params
|
||||||
|
Loading…
x
Reference in New Issue
Block a user