This commit is contained in:
Chagara 2016-07-11 20:30:35 -04:00
commit bf98f63fab
7 changed files with 61 additions and 3 deletions

View File

@ -9,6 +9,7 @@ services:
POSTGRES_PASSWORD: J5brHrAXFLQSif0K POSTGRES_PASSWORD: J5brHrAXFLQSif0K
POSTGRES_DB: netbox POSTGRES_DB: netbox
netbox: netbox:
build: .
image: digitalocean/netbox image: digitalocean/netbox
links: links:
- postgres - postgres

View File

@ -9,9 +9,10 @@ NetBox requires following system dependencies:
* libxslt1-dev * libxslt1-dev
* libffi-dev * libffi-dev
* graphviz * graphviz
* libpq-dev
``` ```
# sudo apt-get install -y python2.7 python-dev git python-pip libxml2-dev libxslt1-dev libffi-dev graphviz # sudo apt-get install -y python2.7 python-dev git python-pip libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev
``` ```
You may opt to install NetBox either from a numbered release or by cloning the master branch of its repository on GitHub. You may opt to install NetBox either from a numbered release or by cloning the master branch of its repository on GitHub.

View File

@ -89,7 +89,7 @@ class DeviceTypeAdmin(admin.ModelAdmin):
power_port_count=Count('power_port_templates', distinct=True), power_port_count=Count('power_port_templates', distinct=True),
power_outlet_count=Count('power_outlet_templates', distinct=True), power_outlet_count=Count('power_outlet_templates', distinct=True),
interface_count=Count('interface_templates', distinct=True), interface_count=Count('interface_templates', distinct=True),
devicebay_count=Count('devicebay_templates', distinct=True), devicebay_count=Count('device_bay_templates', distinct=True),
) )
def console_ports(self, instance): def console_ports(self, instance):

View File

@ -73,3 +73,8 @@ TIME_FORMAT = 'g:i a'
SHORT_TIME_FORMAT = 'H:i:s' SHORT_TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'N j, Y g:i a' DATETIME_FORMAT = 'N j, Y g:i a'
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' SHORT_DATETIME_FORMAT = 'Y-m-d H:i'
# Optionally display a persistent banner at the top and/or bottom of every page. To display the same content in both
# banners, define BANNER_TOP and set BANNER_BOTTOM = BANNER_TOP.
BANNER_TOP = ''
BANNER_BOTTOM = ''

View File

@ -38,6 +38,8 @@ TIME_FORMAT = getattr(configuration, 'TIME_FORMAT', 'g:i a')
SHORT_TIME_FORMAT = getattr(configuration, 'SHORT_TIME_FORMAT', 'H:i:s') SHORT_TIME_FORMAT = getattr(configuration, 'SHORT_TIME_FORMAT', 'H:i:s')
DATETIME_FORMAT = getattr(configuration, 'DATETIME_FORMAT', 'N j, Y g:i a') DATETIME_FORMAT = getattr(configuration, 'DATETIME_FORMAT', 'N j, Y g:i a')
SHORT_DATETIME_FORMAT = getattr(configuration, 'SHORT_DATETIME_FORMAT', 'Y-m-d H:i') SHORT_DATETIME_FORMAT = getattr(configuration, 'SHORT_DATETIME_FORMAT', 'Y-m-d H:i')
BANNER_TOP = getattr(configuration, 'BANNER_TOP', False)
BANNER_BOTTOM = getattr(configuration, 'BANNER_BOTTOM', False)
CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS
# Attempt to import LDAP configuration if it has been defined # Attempt to import LDAP configuration if it has been defined

View File

@ -28,6 +28,42 @@ body {
footer p { footer p {
margin: 20px 0; margin: 20px 0;
} }
@media (max-width: 1120px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin-top: 7.5px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.collapse.in {
display:block !important;
}
}
/* Forms */ /* Forms */
label { label {
@ -259,6 +295,9 @@ ul.rack_near_face li.empty:hover a {
.dark_gray:hover { background-color: #2c3e50; } .dark_gray:hover { background-color: #2c3e50; }
/* Misc */ /* Misc */
.banner-bottom {
margin-bottom: 50px;
}
.panel table { .panel table {
margin-bottom: 0; margin-bottom: 0;
} }

View File

@ -224,6 +224,11 @@
</div> </div>
</nav> </nav>
<div class="container wrapper"> <div class="container wrapper">
{% if settings.BANNER_TOP %}
<div class="alert alert-info text-center" role="alert">
{{ settings.BANNER_TOP|safe }}
</div>
{% endif %}
{% if settings.MAINTENANCE_MODE %} {% if settings.MAINTENANCE_MODE %}
<div class="alert alert-warning text-center" role="alert"> <div class="alert alert-warning text-center" role="alert">
<h4><i class="fa fa-exclamation-triangle"></i> Maintenance Mode</h4> <h4><i class="fa fa-exclamation-triangle"></i> Maintenance Mode</h4>
@ -239,7 +244,12 @@
</div> </div>
{% endfor %} {% endfor %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
<div class="push"></div> <div class="push"></div>
{% if settings.BANNER_BOTTOM %}
<div class="alert alert-info text-center banner-bottom" role="alert">
{{ settings.BANNER_BOTTOM|safe }}
</div>
{% endif %}
</div> </div>
<footer class="footer"> <footer class="footer">
<div class="container"> <div class="container">