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');
|
||||
$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) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,14 +8,23 @@
|
|||
<?= $this->formSelect(
|
||||
'left',
|
||||
$this->leftSum,
|
||||
array('class' => 'autosubmit'),
|
||||
array('class' => 'autosubmit', 'style' => 'width: 37%'),
|
||||
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(
|
||||
'right',
|
||||
$this->rightSum,
|
||||
array('class' => 'autosubmit'),
|
||||
array('class' => 'autosubmit', 'style' => 'width: 37%'),
|
||||
array(null => $this->translate('- please choose -')) + $this->configs
|
||||
)
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue