diff --git a/docker-compose.yml b/docker-compose.yml index 860022707..d435066d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: POSTGRES_PASSWORD: J5brHrAXFLQSif0K POSTGRES_DB: netbox netbox: + build: . image: digitalocean/netbox links: - postgres diff --git a/docs/installation/netbox.md b/docs/installation/netbox.md index 96692af18..fde5ab019 100644 --- a/docs/installation/netbox.md +++ b/docs/installation/netbox.md @@ -9,9 +9,10 @@ NetBox requires following system dependencies: * libxslt1-dev * libffi-dev * 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. diff --git a/netbox/dcim/admin.py b/netbox/dcim/admin.py index 4dae1d998..775f046cd 100644 --- a/netbox/dcim/admin.py +++ b/netbox/dcim/admin.py @@ -89,7 +89,7 @@ class DeviceTypeAdmin(admin.ModelAdmin): power_port_count=Count('power_port_templates', distinct=True), power_outlet_count=Count('power_outlet_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): diff --git a/netbox/netbox/configuration.example.py b/netbox/netbox/configuration.example.py index 96e605859..aba0eb3f5 100644 --- a/netbox/netbox/configuration.example.py +++ b/netbox/netbox/configuration.example.py @@ -73,3 +73,8 @@ TIME_FORMAT = 'g:i a' SHORT_TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'N j, Y g:i a' 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 = '' diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index e8b0b2289..c34b93833 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -38,6 +38,8 @@ TIME_FORMAT = getattr(configuration, 'TIME_FORMAT', 'g:i a') SHORT_TIME_FORMAT = getattr(configuration, 'SHORT_TIME_FORMAT', 'H:i:s') 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') +BANNER_TOP = getattr(configuration, 'BANNER_TOP', False) +BANNER_BOTTOM = getattr(configuration, 'BANNER_BOTTOM', False) CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS # Attempt to import LDAP configuration if it has been defined diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index 04bab2c63..b1a9e88c3 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -28,6 +28,42 @@ body { footer p { 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 */ label { @@ -259,6 +295,9 @@ ul.rack_near_face li.empty:hover a { .dark_gray:hover { background-color: #2c3e50; } /* Misc */ +.banner-bottom { + margin-bottom: 50px; +} .panel table { margin-bottom: 0; } diff --git a/netbox/templates/_base.html b/netbox/templates/_base.html index 438ffdff5..a6ab34c26 100644 --- a/netbox/templates/_base.html +++ b/netbox/templates/_base.html @@ -224,6 +224,11 @@