mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
DirectorObjectForm: handle data from/for assigns
This commit is contained in:
parent
98a5be4e68
commit
ec97306e66
@ -761,14 +761,24 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post = $this->getRequest()->getPost();
|
$post = $this->getRequest()->getPost();
|
||||||
|
// ?? $this->populate($post);
|
||||||
|
if (array_key_exists('assignlist', $post)) {
|
||||||
|
$object->assignments()->setFormValues($post['assignlist']);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($post as $key => $value) {
|
foreach ($post as $key => $value) {
|
||||||
$el = $this->getElement($key);
|
$el = $this->getElement($key);
|
||||||
if ($el && ! $el->getIgnore()) {
|
if ($el && ! $el->getIgnore()) {
|
||||||
$values[$key] = $value;
|
$values[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($object instanceof IcingaObject) {
|
if ($object instanceof IcingaObject) {
|
||||||
|
if ($object->isApplyRule()) {
|
||||||
|
$this->setElementValue('assignlist', $object->assignments()->getFormValues());
|
||||||
|
}
|
||||||
|
|
||||||
$this->handleProperties($object, $values);
|
$this->handleProperties($object, $values);
|
||||||
$this->handleCustomVars($object, $post);
|
$this->handleCustomVars($object, $post);
|
||||||
$this->handleRanges($object, $values);
|
$this->handleRanges($object, $values);
|
||||||
@ -1037,7 +1047,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
'description' => $this->translate(
|
'description' => $this->translate(
|
||||||
'Icinga cluster zone. Allows to manually override Directors decisions'
|
'Icinga cluster zone. Allows to manually override Directors decisions'
|
||||||
. ' of where to deploy your config to. You should consider not doing so'
|
. ' of where to deploy your config to. You should consider not doing so'
|
||||||
. ' unless you gained enough knowledge of you an Icinga Cluster stack'
|
. ' unless you gained deep understanding of how an Icinga Cluster stack'
|
||||||
. ' works'
|
. ' works'
|
||||||
),
|
),
|
||||||
'multiOptions' => $this->optionalEnum($zones)
|
'multiOptions' => $this->optionalEnum($zones)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user