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-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new cd5a696  Remove some unused keys and voting templates
cd5a696 is described below

commit cd5a696cb885dfd1c3ecf284dc077eb8d6ce8923
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Dec 5 11:23:32 2025 +0000

    Remove some unused keys and voting templates
---
 atr/templates/keys-add.html                 | 126 ---------------
 atr/templates/keys-ssh-add.html             |  39 -----
 atr/templates/voting-selected-revision.html | 236 ----------------------------
 3 files changed, 401 deletions(-)

diff --git a/atr/templates/keys-add.html b/atr/templates/keys-add.html
deleted file mode 100644
index 908ed5c..0000000
--- a/atr/templates/keys-add.html
+++ /dev/null
@@ -1,126 +0,0 @@
-{% extends "layouts/base.html" %}
-
-{% block title %}
-  Add your OpenPGP key ~ ATR
-{% endblock title %}
-
-{% block description %}
-  Add your public signing key to your ATR account.
-{% endblock description %}
-
-{% block content %}
-  <p>
-    <a href="{{ as_url(get.keys.keys) }}" class="atr-back-link">← Back to 
Manage keys</a>
-  </p>
-
-  <div class="my-4">
-    <h1 class="mb-4">Add your OpenPGP key</h1>
-
-    <p>Add your public key to use for signing release artifacts.</p>
-    {% if form.errors %}<div class="alert alert-danger">Please correct the 
errors below:</div>{% endif %}
-
-    <form method="post"
-          class="atr-canary py-4 px-5"
-          action="{{ as_url(post.keys.add) }}"
-          novalidate>
-      {{ form.hidden_tag() }}
-
-      <div class="mb-4">
-        <div class="row mb-3 pb-3 border-bottom">
-          {{ forms.label(form.public_key, col="md3") }}
-          <div class="col-md-9">
-            {{ forms.widget(form.public_key, classes="form-control 
font-monospace", rows=10) }}
-            {{ forms.description(form.public_key) }}
-            {{ forms.errors(form.public_key, classes="invalid-feedback 
d-block") }}
-          </div>
-        </div>
-
-        <div class="row mb-3 pb-3 border-bottom">
-          {{ forms.label(form.selected_committees, col="md3") }}
-          <div class="col-md-9">
-            <div class="row">
-              {% for subfield in form.selected_committees %}
-                <div class="col-sm-12 col-md-6 col-lg-4">
-                  <div class="form-check mb-2">
-                    {{ forms.widget(subfield, classes="form-check-input") }}
-                    {{ forms.label(subfield, classes="form-check-label") }}
-                  </div>
-                </div>
-              {% endfor %}
-            </div>
-            <div class="mt-2 mb-2">
-              <button type="button"
-                      id="toggleCommitteesBtn"
-                      class="btn btn-sm btn-outline-secondary">Select 
all</button>
-            </div>
-            {{ forms.description(form.selected_committees) }}
-            {{ forms.errors(form.selected_committees, 
classes="invalid-feedback d-block") }}
-          </div>
-        </div>
-      </div>
-
-      <div class="mt-4 col-md-9 offset-md-3 px-1">
-        {{ form.submit(class_='btn btn-primary') }}
-        <a href="{{ as_url(get.keys.keys) }}"
-           class="btn btn-link text-secondary">Cancel</a>
-      </div>
-    </form>
-
-    {% if key_info and key_info.status == 'success' %}
-      <div class="mt-5">
-        <h2 class="mb-3 fs-5">Key details added:</h2>
-        <div class="p-3 bg-light border rounded">
-          <p>
-            <strong>Key ID:</strong> {{ key_info.key_id }}
-            <br />
-            <strong>Fingerprint:</strong> <code>{{ 
key_info.fingerprint.upper() }}</code>
-            <br />
-            <strong>User ID:</strong> {{ key_info.user_id }}
-            <br />
-            <strong>Created:</strong> {{ 
key_info.creation_date.strftime("%Y-%m-%d") }}
-            <br />
-            <strong>Expires:</strong> {{ 
key_info.expiration_date.strftime("%Y-%m-%d") if key_info.expiration_date else 
'Never' }}
-          </p>
-        </div>
-      </div>
-    {% endif %}
-  </div>
-{% endblock content %}
-
-{% block javascripts %}
-  {{ super() }}
-  <script>
-      document.addEventListener("DOMContentLoaded", () => {
-          const btn = document.getElementById("toggleCommitteesBtn");
-          const checkboxes = 
document.querySelectorAll("input[name='selected_committees']");
-
-          if (!btn || checkboxes.length === 0) return;
-
-          function updateButtonText() {
-              let allChecked = true;
-              checkboxes.forEach(cb => {
-                  if (!cb.checked) allChecked = false;
-              });
-              btn.textContent = allChecked ? "Select none" : "Select all";
-          }
-
-          btn.addEventListener("click", () => {
-              let allChecked = true;
-              checkboxes.forEach(cb => {
-                  if (!cb.checked) allChecked = false;
-              });
-              const shouldCheck = !allChecked;
-              checkboxes.forEach(cb => {
-                  cb.checked = shouldCheck;
-              });
-              updateButtonText();
-          });
-
-          checkboxes.forEach(cb => {
-              cb.addEventListener("change", updateButtonText);
-          });
-
-          updateButtonText();
-      });
-  </script>
-{% endblock javascripts %}
diff --git a/atr/templates/keys-ssh-add.html b/atr/templates/keys-ssh-add.html
deleted file mode 100644
index c6c2e56..0000000
--- a/atr/templates/keys-ssh-add.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{% extends "layouts/base.html" %}
-
-{% block title %}
-  Add your SSH key ~ ATR
-{% endblock title %}
-
-{% block description %}
-  Add your SSH public key to your account.
-{% endblock description %}
-
-{% block content %}
-  <p>
-    <a href="{{ as_url(get.keys.keys) }}" class="atr-back-link">← Back to 
Manage keys</a>
-  </p>
-
-  <h1>Add your SSH key</h1>
-  <p>Add your SSH public key to use for rsync authentication.</p>
-
-  <div>
-    <p>
-      Welcome, <strong>{{ asf_id }}</strong>! You are authenticated as an ASF 
committer.
-    </p>
-  </div>
-
-  {{ forms.errors_summary(form) }}
-
-  <form method="post" class="atr-canary py-4 px-5" novalidate>
-    {{ form.hidden_tag() }}
-
-    <div class="mb-4">
-      {{ forms.label(form.key) }}
-      {{ forms.widget(form.key, classes="form-control mb-2", rows=4, 
id=form.key.id) }}
-      {{ forms.errors(form.key, classes="invalid-feedback d-block") }}
-      {{ forms.description(form.key) }}
-    </div>
-
-    {{ form.submit(class_="btn btn-primary") }}
-  </form>
-{% endblock content %}
diff --git a/atr/templates/voting-selected-revision.html 
b/atr/templates/voting-selected-revision.html
deleted file mode 100644
index ada9580..0000000
--- a/atr/templates/voting-selected-revision.html
+++ /dev/null
@@ -1,236 +0,0 @@
-{% extends "layouts/base.html" %}
-
-{% block title %}
-  Start release vote ~ ATR
-{% endblock title %}
-
-{% block description %}
-  Initiate a vote for a release candidate.
-{% endblock description %}
-
-{% block content %}
-  <p class="d-flex justify-content-between align-items-center">
-    <a href="{{ as_url(get.compose.selected, 
project_name=release.project.name, version_name=release.version) }}"
-       class="atr-back-link">← Back to Compose {{ release.short_display_name 
}}</a>
-    <span>
-      <strong class="atr-phase-one atr-phase-symbol">①</strong>
-      <span class="atr-phase-one atr-phase-label">COMPOSE</span>
-      <span class="atr-phase-arrow">→</span>
-      <span class="atr-phase-symbol-other">②</span>
-      <span class="atr-phase-arrow">→</span>
-      <span class="atr-phase-symbol-other">③</span>
-    </span>
-  </p>
-
-  <h1 class="mb-4">
-    Start voting on <strong>{{ release.project.short_display_name }}</strong> 
<em>{{ release.version }}</em>
-  </h1>
-
-  <div class="px-3 py-4 mb-4 bg-light border rounded">
-    <!-- TODO: Specify the draft revision too? -->
-    <p class="mb-0">
-      Starting a vote for this draft release will cause an email to be sent to 
the appropriate mailing list, and advance the draft to the VOTE phase. Please 
note that this feature is currently in development.
-    </p>
-  </div>
-
-  {% if keys_warning %}
-    <div class="p-3 mb-4 bg-warning-subtle border border-warning rounded">
-      <i class="bi bi-exclamation-triangle-fill"></i>
-      <strong>Warning:</strong>
-      The KEYS file is missing.
-      Please autogenerate one on the <a href="{{ as_url(get.keys.keys) 
}}#committee-{{ release.committee.name|slugify }}">KEYS page</a>.
-    </div>
-  {% endif %}
-
-  {% set revision_number = release.latest_revision_number %}
-  {% if revision_number and (not manual_vote_process_form) %}
-    {{ forms.errors_summary(form) }}
-
-    <form method="post"
-          id="vote-initiate-form"
-          class="atr-canary py-4 px-5"
-          action="{{ as_url(post.voting.selected_revision, 
project_name=release.project.name, version_name=release.version, 
revision=revision_number) }}"
-          novalidate>
-      {{ form.hidden_tag() }}
-
-      {{ form.release_name }}
-      <div class="mb-4">
-        <div class="row mb-3 pb-3 border-bottom">
-          {{ forms.label(form.mailing_list, col="md3-high") }}
-          <div class="col-md-9">
-            <div class="d-flex flex-wrap gap-2 mb-2">
-              {% for subfield in form.mailing_list %}
-                <div class="form-check">
-                  {{ subfield(class_='form-check-input') }}
-                  {{ subfield.label(class_='form-check-label') }}
-                </div>
-              {% endfor %}
-            </div>
-            {{ forms.errors(form.mailing_list) }}
-            {{ forms.description(form.mailing_list, classes="form-text 
text-muted") }}
-          </div>
-        </div>
-
-        <div class="row mb-3 pb-3 border-bottom">
-          {{ forms.label(form.vote_duration, col="md3") }}
-          <div class="col-md-9">
-            {{ forms.widget(form.vote_duration, classes="form-select w-75") }}
-            {{ forms.errors(form.vote_duration) }}
-            {{ forms.description(form.vote_duration, classes="form-text 
text-muted") }}
-          </div>
-        </div>
-
-        <div class="row mb-3 pb-3 border-bottom">
-          {{ forms.label(form.subject, col="md3") }}
-          <div class="col-md-9">
-            {{ forms.widget(form.subject, classes="form-control w-75") }}
-            {{ forms.errors(form.subject) }}
-          </div>
-        </div>
-
-        <div class="row mb-3 pb-3">
-          {{ forms.label(form.body, col="md3") }}
-          <div class="col-md-9">
-            <ul class="nav nav-tabs" id="emailBodyTab" role="tablist">
-              <li class="nav-item" role="presentation">
-                <button class="nav-link active"
-                        id="edit-body-tab"
-                        data-bs-toggle="tab"
-                        data-bs-target="#edit-body-pane"
-                        type="button"
-                        role="tab"
-                        aria-controls="edit-body-pane"
-                        aria-selected="true">Edit</button>
-              </li>
-              <li class="nav-item" role="presentation">
-                <button class="nav-link"
-                        id="text-preview-body-tab"
-                        data-bs-toggle="tab"
-                        data-bs-target="#text-preview-body-pane"
-                        type="button"
-                        role="tab"
-                        aria-controls="text-preview-body-pane"
-                        aria-selected="false">Text preview</button>
-              </li>
-            </ul>
-            <div class="tab-content" id="emailBodyTabContent">
-              <div class="tab-pane fade show active"
-                   id="edit-body-pane"
-                   role="tabpanel"
-                   aria-labelledby="edit-body-tab">
-                {{ forms.widget(form.body, classes="form-control 
font-monospace mt-2", rows="20") }}
-                {{ forms.errors(form.body) }}
-                {{ forms.description(form.body, classes="form-text 
text-muted") }}
-              </div>
-              <div class="tab-pane fade"
-                   id="text-preview-body-pane"
-                   role="tabpanel"
-                   aria-labelledby="text-preview-body-tab">
-                <pre class="mt-2 p-3 bg-light border rounded font-monospace 
overflow-auto"><code id="text-preview-content">Loading preview...</code></pre>
-              </div>
-            </div>
-          </div>
-        </div>
-
-      </div>
-
-      <div class="mt-4 col-md-9 offset-md-3 px-1">
-        {{ form.submit(class_='btn btn-primary') }}
-        <a href="{{ as_url(get.compose.selected, 
project_name=release.project.name, version_name=release.version) }}"
-           class="btn btn-link text-secondary">Cancel</a>
-      </div>
-    </form>
-  {% elif manual_vote_process_form %}
-    <p>This release has the manual vote process enabled. Press the button 
below to start a vote.</p>
-    <form method="post"
-          action="{{ as_url(post.voting.selected_revision, 
project_name=release.project.name, version_name=release.version, 
revision=revision_number) }}"
-          novalidate>
-      {{ manual_vote_process_form.hidden_tag() }}
-      <div>
-        <button type="submit" class="btn btn-primary">Start vote</button>
-      </div>
-    </form>
-    <p>
-      Once the vote is started, you must manually send the vote email to the 
appropriate mailing list, wait for the vote to complete, and then manually 
advance the release to the next phase. The ATR will then require you to submit 
the vote and vote result thread URLs to proceed.
-    </p>
-  {% else %}
-    <div class="p-3 mb-4 bg-danger-subtle border border-danger rounded">
-      <i class="bi bi-exclamation-triangle-fill"></i>
-      <strong>Error:</strong> This release has no revisions. Please create a 
revision first.
-    </div>
-  {% endif %}
-{% endblock content %}
-
-{% block javascripts %}
-  {{ super() }}
-  <script>
-      document.addEventListener("DOMContentLoaded", () => {
-          let debounceTimeout;
-          const debounceDelay = 500;
-
-          const bodyTextarea = document.getElementById("body");
-          const voteDurationInput = document.getElementById("vote_duration");
-          const textPreviewContent = 
document.getElementById("text-preview-content");
-          const voteForm = document.getElementById("vote-initiate-form");
-
-          if (!bodyTextarea || !voteDurationInput || !textPreviewContent || 
!voteForm) {
-              console.error("Required elements for preview not found.");
-              return;
-          }
-
-          const previewUrl = "{{ as_url(post.draft.vote_preview, 
project_name=release.project.name, version_name=release.version) }}";
-          const csrfTokenInput = 
voteForm.querySelector('input[name="csrf_token"]');
-
-          if (!previewUrl || !csrfTokenInput) {
-              console.error("Required data attributes or CSRF token not 
found.");
-              return;
-          }
-          const csrfToken = csrfTokenInput.value;
-
-          function fetchAndUpdatePreview() {
-              const bodyContent = bodyTextarea.value;
-              const voteDuration = voteDurationInput.value;
-
-              fetch(previewUrl, {
-                      method: "POST",
-                      headers: {
-                          "Content-Type": "application/x-www-form-urlencoded",
-                          "X-CSRFToken": csrfToken
-                      },
-                      body: new URLSearchParams({
-                          "body": bodyContent,
-                          "vote_duration": voteDuration,
-                          "csrf_token": csrfToken
-                      })
-                  })
-                  .then(response => {
-                      if (!response.ok) {
-                          return response.text().then(text => {
-                              throw new Error(`HTTP error ${response.status}: 
${text}`)
-                          });
-                      }
-                      return response.text();
-                  })
-                  .then(previewText => {
-                      textPreviewContent.textContent = previewText;
-                  })
-                  .catch(error => {
-                      console.error("Error fetching email preview:", error);
-                      textPreviewContent.textContent = `Error loading 
preview:\n${error.message}`;
-                  });
-          }
-
-          bodyTextarea.addEventListener("input", () => {
-              clearTimeout(debounceTimeout);
-              debounceTimeout = setTimeout(fetchAndUpdatePreview, 
debounceDelay);
-          });
-
-          voteDurationInput.addEventListener("change", () => {
-              clearTimeout(debounceTimeout);
-              debounceTimeout = setTimeout(fetchAndUpdatePreview, 
debounceDelay);
-          });
-
-          fetchAndUpdatePreview();
-      });
-  </script>
-{% endblock javascripts %}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to