Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor] Fix padding on home page #19025

Merged
merged 7 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions airflow/www/static/css/dags.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
.dags-table-body {
margin: 0 1px;
overflow-x: auto;
padding-bottom: 34px;
}

/* This allows small dropdowns to overlap the table element */
padding-bottom: 55px;
margin-bottom: -55px;
.no-padding {
prabhjyotsingh marked this conversation as resolved.
Show resolved Hide resolved
padding-left: 0;
padding-right: 0;
}

.dags-table-more {
Expand Down
68 changes: 34 additions & 34 deletions airflow/www/templates/airflow/dags.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,41 +78,41 @@
{% block content %}
<h2>{{ page_title }}</h2>
<div id="main_content">
<div class="dags-table-wrap">
<div class="row dags-table-header">
<div class="col-md-4">
<div class="form-group btn-group">
<a href="{{ url_for('Airflow.index', status='all', search=request.args.get('search', None), tags=request.args.getlist('tags', None)) }}" class="btn {{'btn-primary' if status_filter == 'all' else 'btn-default'}}" title="Show active and paused DAGs">All <span class="badge">{{ "{:,}".format(status_count_all) }}</span></a>
<a href="{{ url_for('Airflow.index', status='active', search=request.args.get('search', None), tags=request.args.getlist('tags', None)) }}" class="btn {{'btn-primary' if status_filter == 'active' else 'btn-default'}}" title="Show only active DAGs">Active <span class="badge">{{ "{:,}".format(status_count_active) }}</span></a>
<a href="{{ url_for('Airflow.index', status='paused', search=request.args.get('search', None), tags=request.args.getlist('tags', None)) }}" class="btn {{'btn-primary' if status_filter == 'paused' else 'btn-default'}}" title="Show only paused DAGs">Paused <span class="badge">{{ "{:,}".format(status_count_paused) }}</span></a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<form id="tags_form" style="width: 100%; text-align: left;">
<div class="form-group search-input" style="width:100%;">
<select multiple name="tags" id="tags_filter" class="select2-drop-mask" style="width: 100%;">
{% for tag in tags %}
<option value="{{ tag.name }}" {% if tag.selected %}selected{% endif %}>{{ tag.name }}</option>
{% endfor %}
</select>
{% if tags_filter|length > 0 %}
<button type="reset" aria-label="Clear all tags" class="btn btn-default btn-sm material-icons search-input__clear-btn">cancel</button>
{% endif %}
</div>
</form>
</div>
<div class="col-sm-6 col-md-3 col-md-offset-2">
<form id="search_form">
<div class="form-group search-input" style="width: 100%;">
<label for="dag_query" class="sr-only">Search DAGs</label>
<input type="search" id="dag_query" class="typeahead form-control search-input__input" data-provide="typeahead" style="width:100%;" value="{{search_query}}" autocomplete="off" placeholder="Search DAGs">
{% if search_query %}
<button type="reset" aria-label="Clear DAG Search Term" class="btn btn-default btn-sm material-icons search-input__clear-btn">cancel</button>
{% endif %}
</div>
</form>
<div class="row dags-table-header">
<div class="col-md-4 no-padding">
<div class="form-group btn-group">
<a href="{{ url_for('Airflow.index', status='all', search=request.args.get('search', None), tags=request.args.getlist('tags', None)) }}" class="btn {{'btn-primary' if status_filter == 'all' else 'btn-default'}}" title="Show active and paused DAGs">All <span class="badge">{{ "{:,}".format(status_count_all) }}</span></a>
<a href="{{ url_for('Airflow.index', status='active', search=request.args.get('search', None), tags=request.args.getlist('tags', None)) }}" class="btn {{'btn-primary' if status_filter == 'active' else 'btn-default'}}" title="Show only active DAGs">Active <span class="badge">{{ "{:,}".format(status_count_active) }}</span></a>
<a href="{{ url_for('Airflow.index', status='paused', search=request.args.get('search', None), tags=request.args.getlist('tags', None)) }}" class="btn {{'btn-primary' if status_filter == 'paused' else 'btn-default'}}" title="Show only paused DAGs">Paused <span class="badge">{{ "{:,}".format(status_count_paused) }}</span></a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<form id="tags_form" style="width: 100%; text-align: left;">
<div class="form-group search-input" style="width:100%;">
<select multiple name="tags" id="tags_filter" class="select2-drop-mask" style="width: 100%;">
{% for tag in tags %}
<option value="{{ tag.name }}" {% if tag.selected %}selected{% endif %}>{{ tag.name }}</option>
{% endfor %}
</select>
{% if tags_filter|length > 0 %}
<button type="reset" aria-label="Clear all tags" class="btn btn-default btn-sm material-icons search-input__clear-btn">cancel</button>
{% endif %}
</div>
</form>
</div>
<div class="col-sm-6 col-md-3 col-md-offset-2 no-padding">
<form id="search_form">
<div class="form-group search-input" style="width: 100%;">
<label for="dag_query" class="sr-only">Search DAGs</label>
<input type="search" id="dag_query" class="typeahead form-control search-input__input" data-provide="typeahead" style="width:100%;" value="{{search_query}}" autocomplete="off" placeholder="Search DAGs">
{% if search_query %}
<button type="reset" aria-label="Clear DAG Search Term" class="btn btn-default btn-sm material-icons search-input__clear-btn">cancel</button>
{% endif %}
</div>
</form>
</div>
</div>
<div class="dags-table-wrap">
<div class="dags-table-body">
<table class="table table-striped table-bordered table-hover">
<thead>
Expand Down Expand Up @@ -141,7 +141,7 @@ <h2>{{ page_title }}</h2>
</thead>
<tbody>
{% if dags|length == 0 %}
<tr><td colspan="9">No results</td></tr>
<tr><td colspan="10">No results</td></tr>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

{% endif %}
{% for dag in dags %}
<tr>
Expand Down