- function iface_shutdown(id, reconnect) {
- if (!reconnect && !confirm(String.format('<%_Really shutdown network ?\nYou might lose access to this router if you are connected via this interface.%>', id)))
- return;
-
- var a = document.getElementById(id + '-ifc-addrs');
- if (a)
- {
- a.innerHTML = reconnect
- ? '<em><%:Interface is reconnecting...%></em>'
- : '<em><%:Interface is shutting down...%></em>';
- }
-
- var s = document.getElementById('ifc-rc-status');
- if (s)
- {
- s.parentNode.style.display = 'block';
- s.innerHTML = '<%:Waiting for router...%>';
- }
-
- var rcxhr = new XHR();
- rcxhr.get('<%=luci.dispatcher.build_url("admin", "network")%>/iface_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, null,
- function(x)
- {
- if (s)
- {
- s.innerHTML = reconnect
- ? '<%:Interface reconnected%>'
- : '<%:Interface shut down%>';
-
- window.setTimeout(function() {
- s.parentNode.style.display = 'none';
- }, 1000);
- }
- }
- );
- }
-
-