1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#212: Introduced BASE_PATH configuration setting

This commit is contained in:
Jeremy Stretch
2016-09-29 16:32:16 -04:00
parent 5b7f350ded
commit 833499ffe8
8 changed files with 59 additions and 31 deletions

View File

@@ -26,7 +26,7 @@
<pre><strong>{{ exception }}</strong><br />
{{ error }}</pre>
<div class="text-right">
<a href="/" class="btn btn-primary">Home Page</a>
<a href="{% url 'home' %}" class="btn btn-primary">Home Page</a>
</div>
</div>
</div>

View File

@@ -21,7 +21,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<a class="navbar-brand" href="{% url 'home' %}">
<img src="{% static 'img/netbox_logo.png' %}" />
</a>
</div>
@@ -289,7 +289,7 @@
<div class="col-xs-4 text-right">
<p class="text-muted">
<i class="fa fa-fw fa-book text-primary"></i> <a href="http://netbox.readthedocs.io/" target="_blank">Docs</a> &middot;
<i class="fa fa-fw fa-cloud text-primary"></i> <a href="/api/docs/">API</a> &middot;
<i class="fa fa-fw fa-cloud text-primary"></i> <a href="{% url 'django.swagger.base.view' %}">API</a> &middot;
<i class="fa fa-fw fa-code text-primary"></i> <a href="https://github.com/digitalocean/netbox">Code</a>
</p>
</div>

View File

@@ -545,13 +545,13 @@ function toggleConnection(elem, api_url) {
return false;
}
$(".consoleport-toggle").click(function() {
return toggleConnection($(this), "/api/dcim/console-ports/");
return toggleConnection($(this), "/{{ settings.BASE_PATH }}api/dcim/console-ports/");
});
$(".powerport-toggle").click(function() {
return toggleConnection($(this), "/api/dcim/power-ports/");
return toggleConnection($(this), "/{{ settings.BASE_PATH }}api/dcim/power-ports/");
});
$(".interface-toggle").click(function() {
return toggleConnection($(this), "/api/dcim/interface-connections/");
return toggleConnection($(this), "/{{ settings.BASE_PATH }}api/dcim/interface-connections/");
});
</script>
<script src="{% static 'js/graphs.js' %}"></script>