summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js b/applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js
index d115ca973b..28004215b8 100644
--- a/applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js
+++ b/applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js
@@ -43,15 +43,17 @@ return view.extend({
scripts = data[1];
if (qdiscs.length === 0) {
- ui.addNotification(null,
+ ui.addNotification(null,
E('div', { 'class': 'left' }, [
E('p', _("The SQM service seems to be disabled. Please use the button below to activate this service.")),
E('button', {
'class': 'btn cbi-button-active',
'click': ui.createHandlerFn(this, function() {
- fs.exec_direct('/etc/init.d/sqm', ['enable']);
- fs.exec_direct('/etc/init.d/sqm', ['start']);
- location.reload();
+ return fs.exec('/etc/init.d/sqm', ['enable']).then(function() {
+ return fs.exec('/etc/init.d/sqm', ['start']);
+ }).then(function() {
+ location.reload();
+ });
})
}, _('Enable SQM'))
]));
@@ -223,4 +225,4 @@ return view.extend({
return m.render();
}
-}) \ No newline at end of file
+})