Commit 62352cbd authored by Ad Schellevis's avatar Ad Schellevis

(trafficshaper) improve error handling

parent c85b9ed2
......@@ -49,7 +49,12 @@ class ServiceController extends ApiControllerBase
$backend = new Backend();
$backend->configdRun("template reload OPNsense.IPFW");
$status = $backend->configdRun("ipfw reload");
$bckresult = trim($backend->configdRun("ipfw reload"));
if ($bckresult == "OK") {
$status = "ok";
} else {
$status = "error reloading shaper (".$bckresult.")";
}
return array("status" => $status);
} else {
......
......@@ -254,7 +254,7 @@ POSSIBILITY OF SUCH DAMAGE.
BootstrapDialog.show({
type: BootstrapDialog.TYPE_WARNING,
title: "Error reconfiguring trafficshaper",
message: JSON.stringify(data),
message: data['status'],
draggable: true
});
}
......
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