make app portable through uri_base

This commit is contained in:
Oliver Gorwits
2012-01-15 23:09:43 +00:00
parent e2e032de18
commit c555fc9330
18 changed files with 59 additions and 54 deletions

View File

@@ -14,7 +14,7 @@
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td><a href="/device?ip=[% row.ip %]">[% row.dns.remove(settings.domain_suffix) %]</a></td>
<td><a href="[% uri_base %]/device?ip=[% row.ip %]">[% row.dns.remove(settings.domain_suffix) %]</a></td>
<td>[% row.contact %]</td>
<td>[% row.location %]</td>
<td>[% row.name %]</td>

View File

@@ -17,12 +17,12 @@
[% WHILE (row = results.next) %]
<tr>
<td><a class="nd_linkcell"
href="/search?[% vars.query_defaults.node %]&q=[% row.mac | uri %]">[% row.mac %]</a></td>
href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% row.mac | uri %]">[% row.mac %]</a></td>
[% IF params.vendor %]
<td>[% row.oui.company %]</td>
[% END %]
<td>IP &rarr; MAC</td>
<td><a href="/search?[% vars.query_defaults.node %]&q=[% row.ip | uri %]">[% row.ip %]</a>
<td><a href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% row.ip | uri %]">[% row.ip %]</a>
[% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %]
[% ' <span class="label warning">a</span>' IF NOT row.active %]
</td>
@@ -38,7 +38,7 @@
<td>&nbsp;</td>
[% END %]
<td>Switch Port</td>
<td><a href="/device?tab=ports&ip=[% node.switch | url %]&q=[% node.port | url %]">[% node.switch %] [ [% node.port %] ]</a>
<td><a href="[% uri_base %]/device?tab=ports&ip=[% node.switch | url %]&q=[% node.port | url %]">[% node.switch %] [ [% node.port %] ]</a>
[% ' (' _ node.device.dns.remove(settings.domain_suffix) _ ')' IF node.device.dns %]
[% ' <span class="label warning">a</span>' IF NOT node.active %]
</td>
@@ -55,7 +55,7 @@
<td>&nbsp;</td>
[% END %]
<td>MAC &rarr; IP</td>
<td><a href="/search?[% vars.query_defaults.node %]&q=[% nodeip.ip | uri %]">[% nodeip.ip %]</a>
<td><a href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% nodeip.ip | uri %]">[% nodeip.ip %]</a>
[% ' (' _ nodeip.dns.remove(settings.domain_suffix) _ ')' IF nodeip.dns %]
[% ' <span class="label warning">a</span>' IF NOT nodeip.active %]
</td>

View File

@@ -20,7 +20,7 @@
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="/search?[% vars.query_defaults.node %]&q=[% row.mac | uri %]">[% row.mac %]</a>
href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% row.mac | uri %]">[% row.mac %]</a>
[% ELSE %]
&nbsp;
[% END %]
@@ -35,7 +35,7 @@
</td>
[% END %]
<td>MAC &rarr; IP</td>
<td><a href="/search?[% vars.query_defaults.node %]&q=[% row.ip | uri %]">[% row.ip %]</a>
<td><a href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% row.ip | uri %]">[% row.ip %]</a>
[% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %]
[% ' <span class="label warning">a</span>' IF NOT row.active %]
</td>
@@ -51,7 +51,7 @@
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="/search?[% vars.query_defaults.node %]&q=[% node.mac | uri %]">[% node.mac %]</a>
href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% node.mac | uri %]">[% node.mac %]</a>
[% ELSE %]
&nbsp;
[% END %]
@@ -66,7 +66,7 @@
</td>
[% END %]
<td>Switch Port</td>
<td><a href="/device?tab=ports&ip=[% node.switch | url %]&q=[% node.port | url %]">[% node.switch %] [ [% node.port %] ]</a>
<td><a href="[% uri_base %]/device?tab=ports&ip=[% node.switch | url %]&q=[% node.port | url %]">[% node.switch %] [ [% node.port %] ]</a>
[% ' (' _ node.device.dns.remove(settings.domain_suffix) _ ')' IF node.device.dns %]
[% ' <span class="label warning">a</span>' IF NOT node.active %]
</td>
@@ -82,7 +82,7 @@
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="/search?[% vars.query_defaults.node %]&q=[% port.mac | uri %]">[% port.mac %]</a>
href="[% uri_base %]/search?[% vars.query_defaults.node %]&q=[% port.mac | uri %]">[% port.mac %]</a>
[% ELSE %]
&nbsp;
[% END %]
@@ -97,7 +97,7 @@
</td>
[% END %]
<td>Switch Port</td>
<td><a href="/device?tab=ports&ip=[% port.ip | url %]&q=[% port.port | url %]">[% port.ip %] [ [% port.port %] ]</a>
<td><a href="[% uri_base %]/device?tab=ports&ip=[% port.ip | url %]&q=[% port.port | url %]">[% port.ip %] [ [% port.port %] ]</a>
[% ' (' _ port.device.dns.remove(settings.domain_suffix) _ ')' IF port.device.dns %]
</td>
[% IF params.stamps %]

View File

@@ -11,7 +11,7 @@
[% WHILE (row = results.next) %]
<tr>
<td>[% row.name %]</td>
<td><a href="/device?tab=ports&ip=[% row.ip %]&q=[% row.port %]">[% row.ip %] [ [% row.port %] ]</a>
<td><a href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.port %]">[% row.ip %] [ [% row.port %] ]</a>
[% ' (' _ row.device.dns.remove(settings.domain_suffix) _ ')' IF row.device.dns %]
</td>
<td>[% row.descr %]</td>

View File

@@ -13,17 +13,17 @@
[% WHILE (row = results.next) %]
<tr>
<td><a class="nd_linkcell nd_stealthlink"
href="/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.vlan.vlan %]</a></td>
href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.vlan.vlan %]</a></td>
<td><a class="nd_linkcell"
href="/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.dns %]</a></td>
href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.dns %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
href="/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.vlan.description %]</a></td>
href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.vlan.description %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
href="/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.model %]</a></td>
href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.model %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
href="/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.os %]</a></td>
href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.os %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
href="/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.vendor %]</a></td>
href="[% uri_base %]/device?tab=ports&ip=[% row.ip %]&q=[% row.vlan.vlan %]">[% row.vendor %]</a></td>
</tr>
[% END %]
</tbody>