Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fakuivan opened this issue Mar 3, 2017 · 4 comments

Comments

@fakuivan
Copy link
Contributor

fakuivan commented Mar 3, 2017

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

@Kiougar
Copy link
Owner

Kiougar commented Mar 3, 2017

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

@fakuivan
Copy link
Contributor Author

fakuivan commented Mar 3, 2017

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

@Kiougar
Copy link
Owner

Kiougar commented Mar 3, 2017

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

@Kiougar Kiougar closed this as completed in #6 Mar 3, 2017
@fakuivan
Copy link
Contributor Author

fakuivan commented Mar 3, 2017

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>```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants