mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Adding config element for alert message in navbar (#938)
This commit is contained in:
parent
e243a14c64
commit
1b9458dcf0
@ -202,3 +202,8 @@ div.widget .slice_container {
|
|||||||
.alert a:not(.close) {
|
.alert a:not(.close) {
|
||||||
color: gray !important;
|
color: gray !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar .alert {
|
||||||
|
padding: 5px 10px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
@ -7,7 +7,6 @@ from __future__ import unicode_literals
|
|||||||
import logging
|
import logging
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
import textwrap
|
|
||||||
|
|
||||||
from flask_migrate import MigrateCommand
|
from flask_migrate import MigrateCommand
|
||||||
from flask_script import Manager
|
from flask_script import Manager
|
||||||
|
@ -180,6 +180,11 @@ BACKUP_COUNT = 30
|
|||||||
# Set this API key to enable Mapbox visualizations
|
# Set this API key to enable Mapbox visualizations
|
||||||
MAPBOX_API_KEY = ""
|
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:
|
try:
|
||||||
from caravel_config import * # noqa
|
from caravel_config import * # noqa
|
||||||
|
@ -18,6 +18,14 @@
|
|||||||
{% include 'appbuilder/navbar_menu.html' %}
|
{% include 'appbuilder/navbar_menu.html' %}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
{% set WARNING_MSG = appbuilder.app.config.get('WARNING_MSG') %}
|
||||||
|
{% if WARNING_MSG %}
|
||||||
|
<li>
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
{{ WARNING_MSG | safe }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
<li><a href="https://github.com/airbnb/caravel" title="Caravel's Github">
|
<li><a href="https://github.com/airbnb/caravel" title="Caravel's Github">
|
||||||
<i class="fa fa-github fa-lg"></i></a>
|
<i class="fa fa-github fa-lg"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user