mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
Show all tabs except "Add to Dashboard" when issuing a command
refs #8279
This commit is contained in:
parent
49b82af704
commit
6fde4eec30
@ -218,6 +218,25 @@ EOT;
|
|||||||
return $this;
|
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.
|
* 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->object = $host;
|
||||||
$this->createTabs();
|
$this->createTabs();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show a host
|
|
||||||
*/
|
|
||||||
public function showAction()
|
|
||||||
{
|
|
||||||
$this->getTabs()->activate('host');
|
$this->getTabs()->activate('host');
|
||||||
parent::showAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,15 +34,7 @@ class Monitoring_ServiceController extends MonitoredObjectController
|
|||||||
}
|
}
|
||||||
$this->object = $service;
|
$this->object = $service;
|
||||||
$this->createTabs();
|
$this->createTabs();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show a service
|
|
||||||
*/
|
|
||||||
public function showAction()
|
|
||||||
{
|
|
||||||
$this->getTabs()->activate('service');
|
$this->getTabs()->activate('service');
|
||||||
parent::showAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs->showOnlyCloseButton() ?>
|
<?= $this->tabs->remove('dashboard') ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
|
<h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user