From 281d2f617899a0c3a171a66c6a3a14e834aa000c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 7 Oct 2015 19:07:36 +0200 Subject: Globally replace luci.dispatcher.build_url(...) with url(...) invocations Also concat multiple string arguments into one while we're at it. Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/admin_network/diagnostics.htm | 2 +- .../luasrc/view/admin_network/iface_overview.htm | 14 +++++++------- .../luasrc/view/admin_network/iface_status.htm | 2 +- .../luasrc/view/admin_network/lease_status.htm | 2 +- .../luasrc/view/admin_network/switch_status.htm | 2 +- .../luasrc/view/admin_network/wifi_join.htm | 2 +- .../luasrc/view/admin_network/wifi_overview.htm | 10 +++++----- .../luasrc/view/admin_network/wifi_status.htm | 2 +- .../luasrc/view/admin_status/iptables.htm | 4 ++-- .../luasrc/view/admin_system/backupfiles.htm | 2 +- .../luasrc/view/admin_system/clock_status.htm | 4 ++-- .../luci-mod-admin-full/luasrc/view/admin_system/ipkg.htm | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) (limited to 'modules/luci-mod-admin-full/luasrc') diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm index 8a6c90fc21..e06a88debe 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm @@ -34,7 +34,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6") legend.parentNode.style.display = 'block'; legend.style.display = 'inline'; - stxhr.get('<%=luci.dispatcher.build_url("admin", "network")%>/diag_' + tool + protocol + '/' + addr, null, + stxhr.get('<%=url('admin/network')%>/diag_' + tool + protocol + '/' + addr, null, function(x) { if (x.responseText) diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm index 1de349856e..4cdf2df958 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm @@ -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) @@ -178,14 +178,14 @@ d.innerHTML = String.format( '<%:Unsupported protocol type.%>
' + '<%:Install protocol extensions...%>', - '<%=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( '<%:Network without interfaces.%>
' + - '?tab.network.%s=physical"><%:Assign interfaces...%>', + '?tab.network.%s=physical"><%:Assign interfaces...%>', ifc.name, ifc.name ); } @@ -239,13 +239,13 @@ - '" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" /> - '" title="<%:Delete this interface%>" value="<%:Delete%>" /> + '" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" /> + '" title="<%:Delete this interface%>" value="<%:Delete%>" /> <% end %> - '" /> + '" /> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm index 8136383969..1ebdbfcfb4 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm @@ -1,7 +1,7 @@ <%+cbi/valueheader%>