diff --git a/caravel/assets/stylesheets/caravel.css b/caravel/assets/stylesheets/caravel.css index a26d2bf164886..52a64748441da 100644 --- a/caravel/assets/stylesheets/caravel.css +++ b/caravel/assets/stylesheets/caravel.css @@ -202,3 +202,8 @@ div.widget .slice_container { .alert a:not(.close) { color: gray !important; } + +.navbar .alert { + padding: 5px 10px; + margin-top: 15px; +} diff --git a/caravel/bin/caravel b/caravel/bin/caravel index 3ae2b68516da3..c53cdc2b338fb 100755 --- a/caravel/bin/caravel +++ b/caravel/bin/caravel @@ -7,7 +7,6 @@ from __future__ import unicode_literals import logging from datetime import datetime from subprocess import Popen -import textwrap from flask_migrate import MigrateCommand from flask_script import Manager diff --git a/caravel/config.py b/caravel/config.py index 79c87d0a9215a..06fded524694a 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -180,6 +180,11 @@ # Set this API key to enable Mapbox visualizations MAPBOX_API_KEY = "" +# If defined, shows this text in an alert-warning box in the navbar +# one example use case may be "STAGING" to make it clear that this is +# not the production version of the site. +WARNING_MSG = None + try: from caravel_config import * # noqa diff --git a/caravel/templates/appbuilder/navbar.html b/caravel/templates/appbuilder/navbar.html index d997b8dbd9cd3..edd90da4907ba 100644 --- a/caravel/templates/appbuilder/navbar.html +++ b/caravel/templates/appbuilder/navbar.html @@ -18,6 +18,14 @@ {% include 'appbuilder/navbar_menu.html' %}