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') {
xmlrpc_exec('opnsense.configd_reload_all_templates');
echo json_encode(array("status" => "done"));
break;
case 'exec_sync':
configd_run('filter sync load');
echo json_encode(array("status" => "done"));
break;
}
}
exit;
......@@ -155,10 +159,12 @@ include("head.inc");
}
// reload all templates first
$("#action_templates").show();
$.post(window.location, {action: 'reload_templates'}, function(data) {
$("#action_templates").hide();
$("#action_templates_done").show();
perform_actions_reload(todo);
$.post(window.location, {action: 'exec_sync'}, function(data) {
$.post(window.location, {action: 'reload_templates'}, function(data) {
$("#action_templates").hide();
$("#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