atr/templates/draft-tools.html (51 lines of code) (raw):

{% extends "layouts/base.html" %} {% block title %} File tools ~ ATR {% endblock title %} {% block description %} Manage a file in the candidate draft using tools. {% endblock description %} {% block content %} <a href="{{ as_url(routes.compose.selected, project_name=project_name, version_name=version_name) }}" class="atr-back-link">← Back to Compose release</a> <div class="p-3 mb-4 bg-light border rounded"> <h2 class="mt-0">File details</h2> <p> <strong>Filename:</strong> {{ file_data.filename }} </p> <p> <strong>Size:</strong> {{ format_file_size(file_data.bytes_size) }} </p> <p class="mb-0"> <strong>Uploaded:</strong> {{ file_data.uploaded.strftime("%Y-%m-%d %H:%M:%S UTC") }} </p> </div> <h2>Tools</h2> <h3>Generate hash files</h3> <p>Generate an SHA256 or SHA512 hash file for this file.</p> <div class="alert alert-warning"> <i class="bi bi-exclamation-triangle me-2"></i> IMPORTANT: The ASF security team <a href="https://infra.apache.org/release-signing.html#sha-checksum" class="alert-link">recommends using SHA512</a> as the hash algorithm. Please select SHA512 unless you have a specific reason to use SHA256. </div> <div class="d-flex gap-2 mb-4"> <form method="post" action="{{ as_url(routes.draft.hashgen, project_name=project_name, version_name=version_name, file_path=file_path) }}"> <input type="hidden" name="hash_type" value="sha256" /> <button type="submit" class="btn btn-outline-secondary">Generate SHA256</button> </form> <form method="post" action="{{ as_url(routes.draft.hashgen, project_name=project_name, version_name=version_name, file_path=file_path) }}"> <input type="hidden" name="hash_type" value="sha512" /> <button type="submit" class="btn btn-outline-secondary">Generate SHA512</button> </form> </div> {% if file_path.endswith(".tar.gz") and is_viewing_as_admin_fn(current_user.uid) %} <h3>Generate SBOM</h3> <p>Generate a CycloneDX Software Bill of Materials (SBOM) file for this artifact.</p> <form method="post" action="{{ as_url(routes.draft.sbomgen, project_name=project_name, version_name=version_name, file_path=file_path) }}"> <button type="submit" class="btn btn-outline-secondary">Generate CycloneDX SBOM (.cdx.json)</button> </form> {% endif %} {% endblock content %}