diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-10-31 17:37:55 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-01 12:03:33 +0100 |
commit | c72c78bed979f2d85a3c71fe8c7ab26aefe8bae2 (patch) | |
tree | b5d37f0ba65b56105b23d5ee9b72d4d67ad1ad3a /modules/luci-mod-network/htdocs/luci-static/resources/view | |
parent | 6aa4b83f2460ff6fe989b39675ce0b001c05ddae (diff) |
luci-mod-network: interfaces.js: issue iface restart via file/exec rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/view')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index bfff2575bd..60d61adfec 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -1,4 +1,5 @@ 'use strict'; +'require fs'; 'require uci'; 'require form'; 'require network'; @@ -934,11 +935,9 @@ return L.view.extend({ if (dsc.getAttribute('reconnect') == '') { dsc.setAttribute('reconnect', '1'); - tasks.push(L.Request.post( - L.url('admin/network/iface_reconnect', section_ids[i]), - 'token=' + L.env.token, - { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } - ).catch(function() {})); + tasks.push(fs.exec('/sbin/ifup', [section_ids[i]]).catch(function(e) { + L.ui.addNotification(null, E('p', e.message)); + })); } else if (dsc.getAttribute('disconnect') == '' || dsc.getAttribute('disconnect') == 'force') { var force = dsc.getAttribute('disconnect'); |