Globally replace luci.dispatcher.build_url(...) with url(...) invocations
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_network / iface_overview.htm
index 1de3498..4cdf2df 100644 (file)
@@ -49,7 +49,7 @@
                        s.innerHTML = '<%:Waiting for changes to be applied...%>';
                }
 
-               XHR.get('<%=luci.dispatcher.build_url("admin", "network")%>/iface_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, null,
+               XHR.get('<%=url('admin/network')%>/iface_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, null,
                        function(x)
                        {
                                if (s)
@@ -71,7 +71,7 @@
        var wifidevs = <%=luci.http.write_json(netdevs)%>;
        var arptable = <%=luci.http.write_json(arpcache)%>;
 
-       XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "iface_status", table.concat(ifaces, ","))%>', null,
+       XHR.poll(5, '<%=url('admin/network/iface_status', table.concat(ifaces, ","))%>', null,
                function(x, ifcs)
                {
                        if (ifcs)
                                                d.innerHTML = String.format(
                                                        '<em><%:Unsupported protocol type.%></em><br />' +
                                                        '<a href="%h"><%:Install protocol extensions...%></a>',
-                                                               '<%=luci.dispatcher.build_url("admin/system/packages")%>?query=luci-proto&display=available'
+                                                               '<%=url("admin/system/packages")%>?query=luci-proto&display=available'
                                                );
                                        }
                                        else if (d && !ifc.ifname)
                                        {
                                                d.innerHTML = String.format(
                                                        '<em><%:Network without interfaces.%></em><br />' +
-                                                       '<a href="<%=luci.dispatcher.build_url("admin/network/network/%s")%>?tab.network.%s=physical"><%:Assign interfaces...%></a>',
+                                                       '<a href="<%=url("admin/network/network/%s")%>?tab.network.%s=physical"><%:Assign interfaces...%></a>',
                                                                ifc.name, ifc.name
                                                );
                                        }
                                        <td style="width:420px">
                                                <input type="button" class="cbi-button cbi-button-reload" style="width:100px" onclick="iface_shutdown('<%=net[1]%>', true)" title="<%:Reconnect this interface%>" value="<%:Connect%>" />
                                                <input type="button" class="cbi-button cbi-button-reset" style="width:100px" onclick="iface_shutdown('<%=net[1]%>', false)" title="<%:Shutdown this interface%>" value="<%:Stop%>" />
-                                               <input type="button" class="cbi-button cbi-button-edit" style="width:100px" onclick="location.href='<%=luci.dispatcher.build_url("admin/network/network", net[1])%>'" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" />
-                                               <input type="button" class="cbi-button cbi-button-remove" style="width:100px" onclick="if (confirm('<%:Really delete this interface? The deletion cannot be undone!\nYou might lose access to this device if you are connected via this interface.%>')) location.href='<%=luci.dispatcher.build_url("admin/network/iface_delete", net[1])%>'" title="<%:Delete this interface%>" value="<%:Delete%>" />
+                                               <input type="button" class="cbi-button cbi-button-edit" style="width:100px" onclick="location.href='<%=url("admin/network/network", net[1])%>'" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" />
+                                               <input type="button" class="cbi-button cbi-button-remove" style="width:100px" onclick="if (confirm('<%:Really delete this interface? The deletion cannot be undone!\nYou might lose access to this device if you are connected via this interface.%>')) location.href='<%=url("admin/network/iface_delete", net[1])%>'" title="<%:Delete this interface%>" value="<%:Delete%>" />
                                        </td>
                                </tr>
                        <% end %>
                </table>
 
-               <input type="button" class="cbi-button cbi-button-add" value="<%:Add new interface...%>" onclick="location.href='<%=luci.dispatcher.build_url("admin/network/iface_add")%>'" />
+               <input type="button" class="cbi-button cbi-button-add" value="<%:Add new interface...%>" onclick="location.href='<%=url("admin/network/iface_add")%>'" />
        </fieldset>
 </div>