Skip to content

Commit

Permalink
[AIRFLOW-6733] Extend not replace template (apache#7366)
Browse files Browse the repository at this point in the history
cherry-picked from 220bc0e
  • Loading branch information
kaxil committed Mar 30, 2020
1 parent 05e5d05 commit e9e964a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 98 deletions.
2 changes: 1 addition & 1 deletion airflow/www_rbac/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def create_app(config=None, session=None, testing=False, app_name="Airflow"):
app,
db.session if not session else session,
security_manager_class=security_manager_class,
base_template='appbuilder/baselayout.html',
base_template='airflow/master.html',
update_perms=conf.getboolean('webserver', 'UPDATE_FAB_PERMS'))

def init_views(appbuilder):
Expand Down
49 changes: 48 additions & 1 deletion airflow/www_rbac/templates/airflow/master.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,51 @@
limitations under the License.

#}
{% extends "appbuilder/baselayout.html" %}

{% extends 'appbuilder/baselayout.html' %}

{% block head_css %}
{{ super() }}

{% if not appbuilder.app_theme %}
{# airflowDefaultTheme.css file contains the styles from local bootstrap-theme.css #}
<link href="{{ url_for_asset('airflowDefaultTheme.css') }}" rel="stylesheet">
{% endif %}
<link href="{{ url_for_asset('main.css') }}" rel="stylesheet">

<link rel="icon" type="image/png" href="{{ url_for('static', filename='pin_32.png') }}">
{% endblock %}


{% block messages %}
{% include 'appbuilder/flash.html' %}
{% if scheduler_job is defined and (not scheduler_job or not scheduler_job.is_alive()) %}
<div class="alert alert-warning">
<p>The scheduler does not appear to be running.
{% if scheduler_job %}
Last heartbeat was received <time title="{{ scheduler_job.latest_heartbeat.isoformat() }}" datetime="{{ scheduler_job.latest_heartbeat.isoformat() }}">{{ macros.datetime_diff_for_humans(scheduler_job.latest_heartbeat) }}</time>.
{% endif %}
</p>
<p>The DAGs list may not update, and new tasks will not be scheduled.</p>
</div>
{% endif %}
{% endblock %}

{% block tail_js %}
{{ super() }}

<script type="text/javascript">
// below variables are used in base.js
var hostName = '{{ hostname }}';
var csrfToken = '{{ csrf_token() }}';
$("time[title]").tooltip()
</script>
<!--[if IE ]>
<script src="{{ url_for_asset('ie.js') }}" type="text/javascript"></script>
<![endif]-->
<script src="{{ url_for_asset('base.js') }}" type="text/javascript"></script>

{% if analytics_tool is defined and analytics_tool %}
{% include "analytics/" + analytics_tool + ".html" %}
{% endif %}
{% endblock %}
96 changes: 0 additions & 96 deletions airflow/www_rbac/templates/appbuilder/baselayout.html

This file was deleted.

0 comments on commit e9e964a

Please sign in to comment.