Kiougar / luci-wrtbwmon

Bandwidth tracker for OpenWRT that uses wrtbwmon
https://github.com/pyrovski/wrtbwmon
MIT License
319 stars 56 forks source link

Link to configuration page from usage page throws 404 due to a missing slash #5

Closed fakuivan closed 7 years ago

fakuivan commented 7 years ago

The href "<%=controller%>admin/network/usage_config" should be formatted like "<%=controller%>/admin/network/usage_config" on wrtbwmon.htm@L4

Kiougar commented 7 years ago

What version of luci are you using? My <%=controller%> adds a trailing slash.

fakuivan commented 7 years ago

LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55) / OpenWrt Chaos Calmer 15.05.1

Kiougar commented 7 years ago

I see. I guess even with a double slash it still works. I will accept the pull request. Thanks! 👍

fakuivan commented 7 years ago

Nice, at least in my vesion of luci, all references to <%=controller%> are preceded by a slash.


root@router:/usr/lib/lua/luci/view# grep -r '<%=controller%>' ./
./admin_system/reboot.htm:<p><a href="<%=controller%>/admin/system/reboot?reboot=1"><%:Perform reboot%></a></p>
./admin_system/reboot.htm:<script type="text/javascript">setTimeout("location='<%=controller%>/admin'", 60000)</script>
./admin_uci/changes.htm:                <form class="inline" method="get" action="<%=controller%>/admin/uci/apply">
./admin_uci/changes.htm:                <form class="inline" method="get" action="<%=controller%>/admin/uci/saveapply">
./admin_uci/changes.htm:                <form class="inline" method="get" action="<%=controller%>/admin/uci/revert">
./themes/bootstrap/footer.htm:              <li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
./themes/bootstrap/header.htm:    <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><%:Unsaved Changes%>: <%=ucichanges%></a>
./wrtbwmon.htm:    <a href="<%=controller%>/admin/network/usage_config">Configuration</a>```