Merge branch 'feature/context-sensitive-command-forms-8279'
resolves #8279
This commit is contained in:
commit
9f9f6274de
|
@ -218,6 +218,25 @@ EOT;
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a tab
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function remove($name)
|
||||
{
|
||||
if ($this->has($name)) {
|
||||
unset($this->tabs[$name]);
|
||||
if (($dropdownIndex = array_search($name, $this->dropdownTabs)) !== false) {
|
||||
array_splice($this->dropdownTabs, $dropdownIndex, 2);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a tab to the dropdown on the right side of the tab-bar.
|
||||
*
|
||||
|
|
|
@ -34,15 +34,7 @@ class Monitoring_HostController extends MonitoredObjectController
|
|||
}
|
||||
$this->object = $host;
|
||||
$this->createTabs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a host
|
||||
*/
|
||||
public function showAction()
|
||||
{
|
||||
$this->getTabs()->activate('host');
|
||||
parent::showAction();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,15 +34,7 @@ class Monitoring_ServiceController extends MonitoredObjectController
|
|||
}
|
||||
$this->object = $service;
|
||||
$this->createTabs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a service
|
||||
*/
|
||||
public function showAction()
|
||||
{
|
||||
$this->getTabs()->activate('service');
|
||||
parent::showAction();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="controls">
|
||||
<?= $this->tabs->showOnlyCloseButton() ?>
|
||||
<?= $this->tabs->remove('dashboard') ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
|
||||
|
|
|
@ -35,7 +35,7 @@ if ($object->acknowledged): ?>
|
|||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $ackLink ?>">
|
||||
<a href="<?= $ackLink ?>" data-base-target="_self">
|
||||
<?= $this->icon('ok') ?> <?= $this->translate('Acknowledge') ?>
|
||||
</a>
|
||||
<?php } else {
|
||||
|
|
|
@ -39,7 +39,7 @@ if ($object->getType() === $object::TYPE_HOST) {
|
|||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $reschedule ?>">
|
||||
<a href="<?= $reschedule ?>" data-base-target="_self">
|
||||
<?= $this->icon('reschedule') ?>
|
||||
<?= $this->translate('Reschedule') ?>
|
||||
</a>
|
||||
|
|
|
@ -21,7 +21,7 @@ $command = array_shift($parts);
|
|||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||
);
|
||||
} ?>
|
||||
<a href="<?= $processCheckResult ?>">
|
||||
<a href="<?= $processCheckResult ?>" data-base-target="_self">
|
||||
<?= $this->icon('reply') ?>
|
||||
<?= $this->translate('Process check result') ?>
|
||||
</a>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $addCommentLink ?>">
|
||||
<a href="<?= $addCommentLink ?>" data-base-target="_self">
|
||||
<?= $this->icon('comment') ?>
|
||||
<?= $this->translate('Add comment') ?>
|
||||
</a>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $scheduleDowntimeLink ?>">
|
||||
<a href="<?= $scheduleDowntimeLink ?>" data-base-target="_self">
|
||||
<?= $this->icon('plug') ?>
|
||||
<?= $this->translate('Schedule downtime') ?>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue