mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
SyncruleController: distinct between failed and...
...no change
This commit is contained in:
parent
695aa19f04
commit
3d0a31127c
@ -61,7 +61,9 @@ class SyncruleController extends ActionController
|
|||||||
{
|
{
|
||||||
$id = $this->params->get('id');
|
$id = $this->params->get('id');
|
||||||
$rule = SyncRule::load($id, $this->db());
|
$rule = SyncRule::load($id, $this->db());
|
||||||
if ($rule->applyChanges()) {
|
$changed = $rule->applyChanges();
|
||||||
|
|
||||||
|
if ($changed) {
|
||||||
$runId = $rule->getCurrentSyncRunId();
|
$runId = $rule->getCurrentSyncRunId();
|
||||||
Notification::success('Source has successfully been synchronized');
|
Notification::success('Source has successfully been synchronized');
|
||||||
$this->redirectNow(
|
$this->redirectNow(
|
||||||
@ -73,10 +75,13 @@ class SyncruleController extends ActionController
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
} elseif ($rule->sync_state === 'in-sync') {
|
||||||
|
Notification::success('Nothing changed, rule is in sync');
|
||||||
} else {
|
} else {
|
||||||
Notification::error('Synchronization failed');
|
Notification::error('Synchronization failed');
|
||||||
$this->redirectNow('director/list/syncrule');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->redirectNow('director/syncrule?id=' . $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function propertyAction()
|
public function propertyAction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user