You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2025/03/25 18:40:52 UTC
(tooling-trusted-release) branch main updated: Improve the style of the files table
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 5949fc6 Improve the style of the files table
5949fc6 is described below
commit 5949fc6471b7b6f5d2b2b340a61bc43d8ce0a58d
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Tue Mar 25 20:40:43 2025 +0200
Improve the style of the files table
---
atr/static/css/bootstrap.custom.css | 4 ++
atr/templates/files-list.html | 90 ++++++++++++++++++++++---------------
bootstrap/custom.scss | 4 ++
3 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/atr/static/css/bootstrap.custom.css b/atr/static/css/bootstrap.custom.css
index 24cb8bc..9f0a5c4 100644
--- a/atr/static/css/bootstrap.custom.css
+++ b/atr/static/css/bootstrap.custom.css
@@ -11453,6 +11453,10 @@ th {
cursor: pointer;
}
+.atr-sans {
+ font-family: "Inter", sans-serif;
+}
+
small, .small, .text-muted {
font-variation-settings: "opsz" 14;
}
diff --git a/atr/templates/files-list.html b/atr/templates/files-list.html
index 5bd9674..f62b1ff 100644
--- a/atr/templates/files-list.html
+++ b/atr/templates/files-list.html
@@ -50,7 +50,7 @@
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Files</h5>
<a href="{{ url_for('root_files_add') }}"
- class="btn btn-sm btn-outline-primary">Back to Add files</a>
+ class="btn btn-sm btn-outline-secondary">Back to Add files</a>
</div>
<div class="card-body">
{% if paths|length > 0 %}
@@ -59,7 +59,8 @@
<thead>
<tr>
<th>Path</th>
- <th>Tools, checks, errors, and warnings</th>
+ <th>Status</th>
+ <th>Actions and messages</th>
</tr>
</thead>
<tbody>
@@ -67,35 +68,33 @@
<tr>
<td>
{% if path in artifacts %}
- <strong><a href="{{ url_for('root_download', phase='candidate-draft', project=release.project.name, version=release.version, path=path) }}">{{ path }}</a></strong>
+ <strong>{{ path }}</strong>
{% elif path in metadata %}
- <em><a href="{{ url_for('root_download', phase='candidate-draft', project=release.project.name, version=release.version, path=path) }}">{{ path }}</a></em>
+ <em>{{ path }}</em>
{% else %}
- <a href="{{ url_for('root_download', phase='candidate-draft', project=release.project.name, version=release.version, path=path) }}">{{ path }}</a>
+ {{ path }}
{% endif %}
</td>
<td>
- {% if path in tasks and tasks[path]|length > 0 %}
- <a href="{{ url_for('root_files_tools', project_name=project_name, version_name=version_name, file_path=path) }}">Tools</a> ·
- <a href="{{ url_for('root_files_checks', project_name=project_name, version_name=version_name, file_path=path) }}">Check results</a>
- {% set completed_count = namespace(value=0) %}
- {% set failed_count = namespace(value=0) %}
- {% set active_count = namespace(value=0) %}
- {% set queued_count = namespace(value=0) %}
+ {% set completed_count = namespace(value=0) %}
+ {% set failed_count = namespace(value=0) %}
+ {% set active_count = namespace(value=0) %}
+ {% set queued_count = namespace(value=0) %}
- {% for task_type, task in tasks[path].items() %}
- {% if task.status.value == 'completed' %}
- {% set completed_count.value = completed_count.value + 1 %}
- {% elif task.status.value == 'failed' %}
- {% set failed_count.value = failed_count.value + 1 %}
- {% elif task.status.value == 'active' %}
- {% set active_count.value = active_count.value + 1 %}
- {% elif task.status.value == 'queued' %}
- {% set queued_count.value = queued_count.value + 1 %}
- {% endif %}
- {% endfor %}
+ {% for task_type, task in tasks[path].items() %}
+ {% if task.status.value == 'completed' %}
+ {% set completed_count.value = completed_count.value + 1 %}
+ {% elif task.status.value == 'failed' %}
+ {% set failed_count.value = failed_count.value + 1 %}
+ {% elif task.status.value == 'active' %}
+ {% set active_count.value = active_count.value + 1 %}
+ {% elif task.status.value == 'queued' %}
+ {% set queued_count.value = queued_count.value + 1 %}
+ {% endif %}
+ {% endfor %}
- <div class="d-flex flex-wrap gap-2 mt-2 mb-3">
+ {% if completed_count.value > 0 or failed_count.value > 0 or active_count.value > 0 or queued_count.value > 0 %}
+ <div class="d-flex flex-wrap gap-2 mt-1 mb-2">
{% if completed_count.value > 0 %}<span class="badge bg-success">{{ completed_count.value }} Passed</span>{% endif %}
{% if failed_count.value > 0 %}
<span class="badge bg-danger">{{ failed_count.value }} {{ "Issue" if failed_count.value == 1 else "Issues" }}</span>
@@ -103,20 +102,37 @@
{% if active_count.value > 0 %}<span class="badge bg-info">{{ active_count.value }} Running</span>{% endif %}
{% if queued_count.value > 0 %}<span class="badge bg-secondary">{{ queued_count.value }} Pending</span>{% endif %}
</div>
- {% else %}
- <a href="{{ url_for('root_files_tools', project_name=project_name, version_name=version_name, file_path=path) }}">Tools</a> ·
- No check results
{% endif %}
- {% for error in errors[path] %}
- <div class="alert alert-danger p-1 px-2 mt-2 mb-2">
- <i class="fas fa-exclamation-triangle"></i> {{ error }}
- </div>
- {% endfor %}
- {% for warning in warnings[path] %}
- <div class="alert alert-warning p-1 px-2 mt-2 mb-2">
- <i class="fas fa-exclamation-triangle"></i> {{ warning }}
- </div>
- {% endfor %}
+ {% if errors[path]|length > 0 %}
+ <details>
+ <summary>{{ errors[path]|length }} Errors</summary>
+ {% for error in errors[path] %}
+ <div class="alert alert-danger p-1 px-2 mt-0 mb-3">
+ <i class="fas fa-exclamation-triangle"></i> {{ error }}
+ </div>
+ {% endfor %}
+ </details>
+ {% endif %}
+ {% if warnings[path]|length > 0 %}
+ <details>
+ <summary>{{ warnings[path]|length }} Warnings</summary>
+ {% for warning in warnings[path] %}
+ <div class="alert alert-warning p-1 px-2 mt-0 mb-3">
+ <i class="fas fa-exclamation-triangle"></i> {{ warning }}
+ </div>
+ {% endfor %}
+ </details>
+ {% endif %}
+ </td>
+ <td class="atr-sans">
+ <a href="{{ url_for('root_download', phase='candidate-draft', project=release.project.name, version=release.version, path=path) }}"
+ class="btn btn-sm btn-outline-primary">Download</a>
+ <a href="{{ url_for('root_files_tools', project_name=project_name, version_name=version_name, file_path=path) }}"
+ class="btn btn-sm btn-outline-primary ms-2">Tools</a>
+ {% if path in tasks and tasks[path]|length > 0 %}
+ <a href="{{ url_for('root_files_checks', project_name=project_name, version_name=version_name, file_path=path) }}"
+ class="btn btn-sm btn-outline-primary ms-2">Check results</a>
+ {% endif %}
</td>
</tr>
{% endfor %}
diff --git a/bootstrap/custom.scss b/bootstrap/custom.scss
index 510d2d4..a6a7b44 100644
--- a/bootstrap/custom.scss
+++ b/bootstrap/custom.scss
@@ -75,6 +75,10 @@ th {
cursor: pointer;
}
+.atr-sans {
+ font-family: $font-family-sans-serif;
+}
+
small, .text-muted {
font-variation-settings: "opsz" 14;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org