Skip to content

Commit

Permalink
Display message and docs link when no plugins are loaded (apache#13599)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanahamilton authored Jan 10, 2021
1 parent ef0f5cd commit 87a7557
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions airflow/www/templates/airflow/plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,30 @@

{% extends base_template %}


{% block title %}

{{ title }}

{% endblock %}


{% block content %}

<div>

<h2>{{ title }}</h2>

{% for plugin in plugins %}
<h4>{{ plugin["plugin_no"] }}. {{ plugin["plugin_name"] }}</h4>

<table class="table table-striped table-bordered">
<h2>{{ title }}</h2>
{% if plugins|length == 0 %}
<p>No plugins loaded. Learn more in the
<a href="https://airflow.apache.org/docs/apache-airflow/stable/plugins.html" target="_blank">plugins documentation</a>.
</p>
{% endif %}
{% for plugin in plugins %}
<h4>{{ plugin["plugin_no"] }}. {{ plugin["plugin_name"] }}</h4>
<table class="table table-striped table-bordered">
<tr>
<th>Attribute</th>
<th>Value</th>
</tr>
{% for attr, value in plugin["attrs"].items() %}
<tr>
<th>Attribute</th>
<th>Value</th>
<td>{{ attr }}</td>
<td class='code'>{{ value }}</td>
</tr>
{% for attr, value in plugin["attrs"].items() %}
<tr>
<td>{{ attr }}</td>
<td class='code'>{{ value }}</td>
</tr>
{% endfor %}
</table>

{% endfor %}

</div>

{% endfor %}
</table>
{% endfor %}
{% endblock %}

0 comments on commit 87a7557

Please sign in to comment.