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/12 18:47:45 UTC
(tooling-trusted-release) branch main updated: Convert a couple more routes to Bootstrap
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 677dd04 Convert a couple more routes to Bootstrap
677dd04 is described below
commit 677dd044c375be65b74950fa74ef48ad84479783
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Wed Mar 12 20:47:35 2025 +0200
Convert a couple more routes to Bootstrap
---
atr/static/css/atr-small.css | 14 +-
atr/templates/candidate-create.html | 152 +++++++-----------
atr/templates/candidate-signature-verify.html | 216 --------------------------
atr/templates/dev-send-email.html | 169 +++++++-------------
4 files changed, 118 insertions(+), 433 deletions(-)
diff --git a/atr/static/css/atr-small.css b/atr/static/css/atr-small.css
index 63e75ab..27d70a8 100644
--- a/atr/static/css/atr-small.css
+++ b/atr/static/css/atr-small.css
@@ -27,6 +27,13 @@ body {
font-weight: 425;
}
+input, textarea, select, option {
+ border-width: 2px !important;
+ border-color: #cccccc !important;
+ font-size: 17px !important;
+ font-weight: 425 !important;
+}
+
input, textarea, button, select, option {
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif;
font-size: 17px;
@@ -67,13 +74,6 @@ ul {
padding-left: 1rem;
}
-label {
- font-weight: 500;
- border-bottom: 1px dashed #b1b2b3;
- padding-bottom: 0.5rem;
- cursor: pointer;
-}
-
table {
border-collapse: collapse;
}
diff --git a/atr/templates/candidate-create.html b/atr/templates/candidate-create.html
index 5922607..90c9fd0 100644
--- a/atr/templates/candidate-create.html
+++ b/atr/templates/candidate-create.html
@@ -8,117 +8,73 @@
Create a new release candidate.
{% endblock description %}
+{% block theme_css %}
+ <link rel="stylesheet"
+ href="{{ url_for('static', filename='css/atr-small.css') }}" />
+{% endblock theme_css %}
+
{% block stylesheets %}
{{ super() }}
- <style>
- .form-table {
- width: 100%;
- }
-
- .form-table th {
- width: 200px;
- text-align: right;
- padding-right: 1rem;
- vertical-align: top;
- font-weight: 500;
- }
-
- .form-table td {
- vertical-align: top;
- }
-
- .form-table label {
- border-bottom: none;
- padding-bottom: 0;
- }
-
- select,
- input[type="file"] {
- display: block;
- margin-bottom: 0.5rem;
- }
-
- .help-text {
- color: #666;
- font-size: 0.9em;
- display: block;
- margin-top: 0.25rem;
- }
-
- .error-message {
- color: #dc3545;
- margin-top: 0.25rem;
- }
-
- button {
- margin-top: 1rem;
- }
-
- button:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
- </style>
{% endblock stylesheets %}
{% block content %}
<h1>Create release candidate</h1>
- <p class="intro">
+ <p>
Welcome, <strong>{{ asf_id }}</strong>! Use this form to create a new release candidate for
your project. You can create a new release candidate for any project of which you are a release
manager. Release managers at the ASF must be either PMC members or committers.
</p>
- <p>
+ <p class="mb-4">
ATR will guide you through the process of turning your release candidate into a final release,
providing tools and automation to help during each step of the workflow.
</p>
- <form method="post" enctype="multipart/form-data" class="striking">
- <table class="form-table">
- <tbody>
- <tr>
- <th>
- <label for="project_name">Project:</label>
- </th>
- <td>
- <select id="project_name" name="project_name" required>
- <option value="">Select a project...</option>
- {% for pmc in user_pmcs|sort(attribute='project_name') %}
- <option value="{{ pmc.project_name }}">{{ pmc.display_name }}</option>
- {% endfor %}
- </select>
- {% if not user_pmcs %}
- <p class="error-message">You must be a PMC member or committer to submit a release candidate.</p>
- {% endif %}
- </td>
- </tr>
-
- <tr>
- <th>
- <label for="version">Version:</label>
- </th>
- <td>
- <input type="text" id="version" name="version" required />
- </td>
- </tr>
-
- <tr>
- <th>
- <label for="product_name">Product name:</label>
- </th>
- <td>
- <!-- TODO: Add a dropdown for the product name, plus "add new product" -->
- <input type="text" id="product_name" name="product_name" required />
- </td>
- </tr>
-
- <tr>
- <td></td>
- <td>
- <button type="submit" {% if not user_pmcs %}disabled{% endif %}>Create release</button>
- </td>
- </tr>
- </tbody>
- </table>
+ <form method="post"
+ enctype="multipart/form-data"
+ class="striking py-4 px-5">
+ <div class="mb-3 pb-3 row border-bottom">
+ <label for="project_name" class="col-sm-3 col-form-label text-sm-end">Project:</label>
+ <div class="col-sm-8">
+ <select id="project_name"
+ name="project_name"
+ class="mb-2 form-select"
+ required>
+ <option value="">Select a project...</option>
+ {% for pmc in user_pmcs|sort(attribute='project_name') %}
+ <option value="{{ pmc.project_name }}">{{ pmc.display_name }}</option>
+ {% endfor %}
+ </select>
+ {% if not user_pmcs %}
+ <p class="text-danger">You must be a PMC member or committer to submit a release candidate.</p>
+ {% endif %}
+ </div>
+ </div>
+
+ <div class="mb-3 pb-3 row border-bottom">
+ <label for="version" class="col-sm-3 col-form-label text-sm-end">Version:</label>
+ <div class="col-sm-8">
+ <input type="text" id="version" name="version" class="form-control" required />
+ </div>
+ </div>
+
+ <div class="mb-3 pb-3 row border-bottom">
+ <label for="product_name" class="col-sm-3 col-form-label text-sm-end">Product name:</label>
+ <div class="col-sm-8">
+ <!-- TODO: Add a dropdown for the product name, plus "add new product" -->
+ <input type="text"
+ id="product_name"
+ name="product_name"
+ class="form-control"
+ required />
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-sm-9 offset-sm-3">
+ <button type="submit"
+ class="btn btn-primary mt-2"
+ {% if not user_pmcs %}disabled{% endif %}>Create release</button>
+ </div>
+ </div>
</form>
{% endblock content %}
diff --git a/atr/templates/candidate-signature-verify.html b/atr/templates/candidate-signature-verify.html
deleted file mode 100644
index 6893d8d..0000000
--- a/atr/templates/candidate-signature-verify.html
+++ /dev/null
@@ -1,216 +0,0 @@
-{% extends "layouts/base.html" %}
-
-{% block title %}
- Verify release signatures ~ ATR
-{% endblock title %}
-
-{% block description %}
- Verify release candidate signatures.
-{% endblock description %}
-
-{% block stylesheets %}
- {{ super() }}
- <style>
- .candidate-info {
- margin-bottom: 2rem;
- }
-
- .package-list {
- margin: 1rem 0;
- }
-
- .package {
- border: 1px solid #ddd;
- padding: 1rem;
- margin: 1rem 0;
- border-radius: 4px;
- }
-
- .package-info {
- margin-bottom: 1rem;
- }
-
- .verification-status {
- margin-top: 1rem;
- padding: 1rem;
- border-radius: 4px;
- background: #f5f5f5;
- }
-
- .verification-status .status {
- font-weight: bold;
- }
-
- .navigation {
- margin-top: 2rem;
- }
-
- .navigation a {
- margin-right: 1rem;
- }
-
- .error {
- color: #dc3545;
- font-weight: bold;
- }
-
- .status.success {
- color: #219f3f;
- }
-
- .status.failure {
- color: #dc3545;
- }
-
- .signature-details {
- margin-top: 1rem;
- padding: 1rem;
- border-radius: 4px;
- background: #f5f5f5;
- }
-
- .debug-info {
- margin-top: 1rem;
- padding: 1rem;
- border-radius: 4px;
- background: #f8f9fa;
- border: 1px solid #dee2e6;
- }
-
- .debug-info summary {
- color: #666;
- font-weight: bold;
- cursor: pointer;
- padding-bottom: 0.5rem;
- }
-
- .debug-info summary:hover {
- color: #333;
- }
-
- .debug-info[open] summary {
- border-bottom: 1px solid #dee2e6;
- margin-bottom: 1rem;
- }
-
- .debug-info dl {
- margin: 0;
- display: grid;
- grid-template-columns: auto 1fr;
- gap: 0.5rem 1rem;
- }
-
- .debug-info dt {
- font-weight: bold;
- color: #666;
- }
-
- .debug-info dd {
- margin: 0;
- word-break: break-all;
- }
-
- .candidate-header {
- border: 1px solid #ddd;
- border-radius: 4px;
- padding: 1rem;
- margin-bottom: 1rem;
- background-color: #f8f8f8;
- }
-
- .candidate-header h3 {
- margin: 0 0 0.5rem 0;
- }
-
- .candidate-meta {
- color: #666;
- font-size: 0.9em;
- display: flex;
- flex-wrap: wrap;
- gap: 1rem;
- }
-
- .candidate-meta-item::after {
- content: "•";
- margin-left: 1rem;
- color: #ccc;
- }
-
- .candidate-meta-item:last-child::after {
- content: none;
- }
-
- pre.stderr {
- background: #f8f9fa;
- border-radius: 2px;
- overflow-x: auto;
- margin: 0.5rem 0;
- white-space: pre-wrap;
- }
- </style>
-{% endblock stylesheets %}
-
-{% block content %}
- <h1>Verify release signatures</h1>
-
- <div class="candidate-header">
- <h3>{{ release.pmc.display_name }}</h3>
- <div class="candidate-meta">
- <span class="candidate-meta-item">Version: {{ release.version }}</span>
- <span class="candidate-meta-item">Stage: {{ release.stage.value }}</span>
- <span class="candidate-meta-item">Phase: {{ release.phase.value }}</span>
- <span class="candidate-meta-item">Created: {{ release.created.strftime("%Y-%m-%d %H:%M UTC") }}</span>
- </div>
- </div>
-
- <div class="package-list">
- {% for result in verification_results %}
- <div class="package">
- <div class="package-info">
- <div>
- <strong>File:</strong> {{ result.filename }}
- </div>
- </div>
-
- <div class="verification-status">
- {% if result.error %}
- <p class="error">Error: {{ result.error }}</p>
- {% else %}
- <p class="status {% if result.verified %}success{% else %}failure{% endif %}">Status: {{ result.status }}</p>
- {% if result.verified %}
- <div class="signature-details">
- <p>
- <strong>Key ID:</strong> {{ result.key_id }}
- </p>
- <p>
- <strong>Signed by:</strong> {{ result.username }} <{{ result.email }}>
- </p>
- <p>
- <strong>Timestamp:</strong> {{ result.timestamp }}
- </p>
- </div>
- {% endif %}
- {% endif %}
-
- {% if result.debug_info %}
- <details class="debug-info">
- <summary>Debug Information</summary>
- <dl>
- {% for key, value in result.debug_info.items() %}
- <dt>{{ key }}</dt>
- <dd>
- {% if key == 'stderr' and value != 'Not available' %}
- <pre class="stderr">{{ value }}</pre>
- {% else %}
- {{ value }}
- {% endif %}
- </dd>
- {% endfor %}
- </dl>
- </details>
- {% endif %}
- </div>
- </div>
- {% endfor %}
- </div>
-{% endblock content %}
diff --git a/atr/templates/dev-send-email.html b/atr/templates/dev-send-email.html
index eaaff3f..886d25a 100644
--- a/atr/templates/dev-send-email.html
+++ b/atr/templates/dev-send-email.html
@@ -8,79 +8,32 @@
Test email sending functionality.
{% endblock description %}
+{% block theme_css %}
+ <link rel="stylesheet"
+ href="{{ url_for('static', filename='css/atr-small.css') }}" />
+{% endblock theme_css %}
+
{% block stylesheets %}
{{ super() }}
- <style>
- .form-table {
- width: 100%;
- }
-
- .form-table th {
- width: 200px;
- text-align: right;
- padding-right: 1rem;
- vertical-align: top;
- font-weight: 500;
- }
-
- .form-table td {
- vertical-align: top;
- }
-
- .form-table label {
- border-bottom: none;
- padding-bottom: 0;
- }
-
- input[type="text"],
- input[type="email"] {
- width: 100%;
- max-width: 600px;
- padding: 0.375rem;
- border: 1px solid #ced4da;
- border-radius: 0.25rem;
- }
-
- .help-text {
- color: #666;
- font-size: 0.9em;
- display: block;
- margin-top: 0.25rem;
- }
-
- .error-message {
- color: #dc3545;
- margin-top: 0.25rem;
- }
-
- .success-message {
- color: #28a745;
- margin-top: 0.25rem;
- }
-
- button {
- margin-top: 1rem;
- }
- </style>
{% endblock stylesheets %}
{% block content %}
<h1>Test email sending</h1>
- <p class="intro">
+ <p>
Welcome, <strong>{{ asf_id }}</strong>! Use this form to test the email sending functionality.
</p>
{% if error %}
- <div class="error-message">
- <p>
+ <div class="alert alert-danger">
+ <p class="mb-0">
<strong>Error:</strong> {{ error }}
</p>
</div>
{% endif %}
{% if success %}
- <div class="success-message">
- <p>
+ <div class="alert alert-success">
+ <p class="mb-0">
<strong>Success!</strong>
{% if message %}
{{ message }}
@@ -91,63 +44,55 @@
</div>
{% endif %}
- <form method="post" class="striking">
- <table class="form-table">
- <tbody>
- <tr>
- <th>
- <label for="email_recipient">Recipient email:</label>
- </th>
- <td>
- <input type="email"
- id="email_recipient"
- name="email_recipient"
- required
- value="{{ email_recipient or '' }}"
- placeholder="recipient@example.com"
- aria-describedby="email-help" />
- <span id="email-help" class="help-text">Enter the email address to send the test email to</span>
- </td>
- </tr>
+ <form method="post" class="striking py-4 px-5">
+ <div class="mb-3 pb-3 row border-bottom">
+ <label for="email_recipient" class="col-sm-3 col-form-label text-sm-end">Recipient email:</label>
+ <div class="col-sm-8">
+ <input type="email"
+ id="email_recipient"
+ name="email_recipient"
+ class="form-control"
+ required
+ value="{{ email_recipient or '' }}"
+ placeholder="recipient@example.com"
+ aria-describedby="email-help" />
+ <code id="email-help" class="form-text text-muted d-block mt-2">Enter the email address to send the test email to</code>
+ </div>
+ </div>
- <tr>
- <th>
- <label for="artifact_name">Artifact name:</label>
- </th>
- <td>
- <input type="text"
- id="artifact_name"
- name="artifact_name"
- required
- value="{{ artifact_name or '' }}"
- placeholder="my-artifact-1.0.0"
- aria-describedby="artifact-help" />
- <span id="artifact-help" class="help-text">Enter a name for the artifact</span>
- </td>
- </tr>
+ <div class="mb-3 pb-3 row border-bottom">
+ <label for="artifact_name" class="col-sm-3 col-form-label text-sm-end">Artifact name:</label>
+ <div class="col-sm-8">
+ <input type="text"
+ id="artifact_name"
+ name="artifact_name"
+ class="form-control"
+ required
+ value="{{ artifact_name or '' }}"
+ placeholder="my-artifact-1.0.0"
+ aria-describedby="artifact-help" />
+ <code id="artifact-help" class="form-text text-muted d-block mt-2">Enter a name for the artifact</code>
+ </div>
+ </div>
- <tr>
- <th>
- <label for="token">Token (optional):</label>
- </th>
- <td>
- <input type="text"
- id="token"
- name="token"
- value="{{ token or '' }}"
- placeholder="Optional token"
- aria-describedby="token-help" />
- <span id="token-help" class="help-text">Optional token to include in the email</span>
- </td>
- </tr>
+ <div class="mb-3 pb-3 row border-bottom">
+ <label for="token" class="col-sm-3 col-form-label text-sm-end">Token (optional):</label>
+ <div class="col-sm-8">
+ <input type="text"
+ id="token"
+ name="token"
+ class="form-control"
+ value="{{ token or '' }}"
+ placeholder="Optional token"
+ aria-describedby="token-help" />
+ <code id="token-help" class="form-text text-muted d-block mt-2">Optional token to include in the email</code>
+ </div>
+ </div>
- <tr>
- <td></td>
- <td>
- <button type="submit">Send test email</button>
- </td>
- </tr>
- </tbody>
- </table>
+ <div class="row">
+ <div class="col-sm-9 offset-sm-3">
+ <button type="submit" class="btn btn-primary mt-2">Send test email</button>
+ </div>
+ </div>
</form>
{% endblock content %}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org