Commit 7c82fe62 authored by Ad Schellevis's avatar Ad Schellevis

(hassync) trigger xmlrpc sync before service action, for...

(hassync) trigger xmlrpc sync before service action, for https://github.com/opnsense/core/issues/1217
parent b27e0269
...@@ -97,6 +97,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -97,6 +97,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
xmlrpc_exec('opnsense.configd_reload_all_templates'); xmlrpc_exec('opnsense.configd_reload_all_templates');
echo json_encode(array("status" => "done")); echo json_encode(array("status" => "done"));
break; break;
case 'exec_sync':
configd_run('filter sync load');
echo json_encode(array("status" => "done"));
break;
} }
} }
exit; exit;
...@@ -155,10 +159,12 @@ include("head.inc"); ...@@ -155,10 +159,12 @@ include("head.inc");
} }
// reload all templates first // reload all templates first
$("#action_templates").show(); $("#action_templates").show();
$.post(window.location, {action: 'reload_templates'}, function(data) { $.post(window.location, {action: 'exec_sync'}, function(data) {
$("#action_templates").hide(); $.post(window.location, {action: 'reload_templates'}, function(data) {
$("#action_templates_done").show(); $("#action_templates").hide();
perform_actions_reload(todo); $("#action_templates_done").show();
perform_actions_reload(todo);
});
}); });
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment