mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
config/diff: allow to flip shown configs, even...
...undeployed ones
This commit is contained in:
parent
5fc9aabd3e
commit
6642d8cf74
@ -213,7 +213,14 @@ class ConfigController extends ActionController
|
|||||||
$rightSum = $this->view->rightSum = $this->params->get('right');
|
$rightSum = $this->view->rightSum = $this->params->get('right');
|
||||||
$left = IcingaConfig::load(Util::hex2binary($leftSum), $db);
|
$left = IcingaConfig::load(Util::hex2binary($leftSum), $db);
|
||||||
|
|
||||||
$this->view->configs = $db->enumDeployedConfigs();
|
$configs = $db->enumDeployedConfigs();
|
||||||
|
foreach (array($leftSum, $rightSum) as $sum) {
|
||||||
|
if (! array_key_exists($sum, $configs)) {
|
||||||
|
$configs[$sum] = substr($sum, 0, 7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->view->configs = $configs;
|
||||||
if ($rightSum === null) {
|
if ($rightSum === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -8,14 +8,23 @@
|
|||||||
<?= $this->formSelect(
|
<?= $this->formSelect(
|
||||||
'left',
|
'left',
|
||||||
$this->leftSum,
|
$this->leftSum,
|
||||||
array('class' => 'autosubmit'),
|
array('class' => 'autosubmit', 'style' => 'width: 37%'),
|
||||||
array(null => $this->translate('- please choose -')) + $this->configs
|
array(null => $this->translate('- please choose -')) + $this->configs
|
||||||
)
|
)
|
||||||
?>
|
?>
|
||||||
|
<?= $this->qlink(
|
||||||
|
'',
|
||||||
|
$this->url(),
|
||||||
|
array(
|
||||||
|
'left' => $this->rightSum,
|
||||||
|
'right' => $this->leftSum
|
||||||
|
),
|
||||||
|
array('class' => 'icon-flapping')
|
||||||
|
) ?>
|
||||||
<?= $this->formSelect(
|
<?= $this->formSelect(
|
||||||
'right',
|
'right',
|
||||||
$this->rightSum,
|
$this->rightSum,
|
||||||
array('class' => 'autosubmit'),
|
array('class' => 'autosubmit', 'style' => 'width: 37%'),
|
||||||
array(null => $this->translate('- please choose -')) + $this->configs
|
array(null => $this->translate('- please choose -')) + $this->configs
|
||||||
)
|
)
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user