MonitoredObjectController: Show the service tab, if it was already shown

This commit is contained in:
Johannes Meyer 2015-06-16 16:36:13 +02:00
parent 4a2a17aba1
commit e96c6958b2

View File

@ -145,6 +145,9 @@ abstract class MonitoredObjectController extends Controller
$params = array( $params = array(
'host' => $object->getName() 'host' => $object->getName()
); );
if ($this->params->has('service')) {
$params['service'] = $this->params->get('service');
}
} else { } else {
$isService = true; $isService = true;
$params = array( $params = array(
@ -165,14 +168,14 @@ abstract class MonitoredObjectController extends Controller
'urlParams' => $params 'urlParams' => $params
) )
); );
if ($isService) { if ($isService || $this->params->has('service')) {
$tabs->add( $tabs->add(
'service', 'service',
array( array(
'title' => sprintf( 'title' => sprintf(
$this->translate('Show detailed information for service %s on host %s'), $this->translate('Show detailed information for service %s on host %s'),
$object->getName(), $isService ? $object->getName() : $this->params->get('service'),
$object->getHost()->getName() $isService ? $object->getHost()->getName() : $object->getName()
), ),
'label' => $this->translate('Service'), 'label' => $this->translate('Service'),
'icon' => 'service', 'icon' => 'service',