Repository URL to install this package:
|
Version:
2.2.1 ▾
|
{#
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
#}
{% extends "airflow/dag.html" %}
{% block page_title %}{{ dag.dag_id }} - Tree - {{ appbuilder.app_name }}{% endblock %}
{% from 'appbuilder/loading_dots.html' import loading_dots %}
{% block head_css %}
{{ super() }}
<link rel="stylesheet" type="text/css" href="{{ url_for_asset('tree.css') }}">
<style type="text/css">
{% for state, state_color in state_color_mapping.items() %}
rect.{{state}} {
fill: {{state_color}};
}
{% endfor %}
</style>
{% endblock %}
{% block head_meta %}
{{ super() }}
<meta name="num_runs" content="{{ num_runs }}">
<meta name="root" content="{{ root if root else '' }}">
{% endblock %}
{% block content %}
{{ super() }}
<div class="row dag-view-tools">
<div class="col-md-12">
<form method="get" class="form-inline">
<input type="hidden" name="root" value="{{ root if root else '' }}">
<input type="hidden" value="{{ dag.dag_id }}" name="dag_id">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="form-group">
<label class="sr-only" for="base_date">Base date</label>
<div class="input-group">
{{ form.base_date(class_="form-control", disabled=not(dag.has_dag_runs())) }}
</div>
</div>
<div class="form-group">
<label class="sr-only" for="num_runs">Number of runs</label>
<div class="input-group">
<div class="input-group-addon">Runs</div>
{{ form.num_runs(class_="form-control", disabled=not(dag.has_dag_runs())) }}
</div>
</div>
<button type="submit" class="btn"{{' disabled' if not dag.has_dag_runs() else ''}}>Update</button>
{% if not dag.has_dag_runs() %}<span class="text-warning" style="margin-left:16px;">No DAG runs yet.</span>{% endif %}
</form>
</div>
</div>
<div class="legend-row">
<div>
{% for op in operators %}<span class="legend-item legend-item--no-border">
<span class="legend-item__swatch legend-item__swatch--circle" style="background: {{ op.ui_color }};"></span>
{{ op.task_type }}
</span>{% endfor %}
</div>
<div>
{% for state, state_color in state_color_mapping.items() %}
<span class="legend-item legend-item--no-border">
<span class="legend-item__swatch legend-item__swatch--no-border" style="background: {{ state_color }};"></span>
{{state}}
</span>
{% endfor %}
<span class="legend-item legend-item--no-border">
<span class="legend-item__swatch"></span>
no_status
</span>
</div>
</div>
<hr>
<div id="svg_container">
<img id='loading' width="50" src="{{ url_for('static', filename='loading.gif') }}">
<div id="error" style="display: none; margin-top: 10px;" class="alert alert-danger" role="alert">
<span class="material-icons" aria-hidden="true">error</span>
<span id="error_msg">Oops.</span>
</div>
<div class="refresh-actions">
{{ loading_dots(id='loading-dots', classes='refresh-loading') }}
<label class="switch-label">
<input class="switch-input" id="auto_refresh" type="checkbox">
<span class="switch" aria-hidden="true"></span>
Auto-refresh
</label>
<button class="btn btn-default btn-sm" id="refresh_button">
<span class="material-icons" aria-hidden="true">refresh</span>
</button>
</div>
<svg id="tree-svg" class='tree' width="100%"></svg>
</div>
{% endblock %}
{% block tail_js %}
{{ super() }}
<script src="{{ url_for_asset('d3.min.js') }}"></script>
<script src="{{ url_for_asset('d3-tip.js') }}"></script>
<script src="{{ url_for_asset('tree.js') }}"></script>
<script>
const treeData = {{ data|tojson }};
const autoRefreshInterval = {{ auto_refresh_interval }};
</script>
{% endblock %}