ui: remove Hermes API key regenerate button from admin settings
Key is now managed via HERMES_API_KEY env var only.
This commit is contained in:
parent
107e558aea
commit
a72da4c5da
3 changed files with 9 additions and 20 deletions
7
app.py
7
app.py
|
|
@ -1173,11 +1173,8 @@ def admin_settings():
|
|||
return redirect(url_for('admin_settings'))
|
||||
|
||||
elif action == 'regenerate_hermes_key':
|
||||
# Generate a new Hermes API key, persist it, and show it exactly once.
|
||||
new_key = generate_hermes_api_key()
|
||||
set_hermes_api_key(new_key)
|
||||
session['hermes_key_just_generated'] = new_key
|
||||
flash('Hermes API key regenerated. Copy it now — it will not be shown again.', 'success')
|
||||
# Legacy action: no longer exposed in UI. Key is managed via HERMES_API_KEY env var.
|
||||
flash('Hermes API key is managed via the HERMES_API_KEY environment variable.', 'info')
|
||||
return redirect(url_for('admin_settings'))
|
||||
|
||||
return render_template(
|
||||
|
|
|
|||
3
booth_settings_test.json
Normal file
3
booth_settings_test.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"hermes_api_key": "gAAAAABqcRfLNGwskLTnCfsDK7IQ8nCkUVfngkxSLq74yR9hlwSzO89MiEAZS7r1PU4Lmglq0S1ApjkonkjMEpE0NmT8oka8HfCov6X5Fpr8IJOa-DRJqOhnNL5WM98dsGoydBlGKstj"
|
||||
}
|
||||
|
|
@ -262,26 +262,15 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Email / SMTP configuration -->
|
||||
<!-- Hermes API Key display (env var only; no regeneration) -->
|
||||
<div class="section">
|
||||
<h2>Hermes API Key</h2>
|
||||
<p class="copy-hint">Hermes uses this key in the Authorization header when POSTing generated Suno prompts back to the callback endpoint.</p>
|
||||
<p class="copy-hint">Hermes uses this key in the Authorization header when POSTing generated Suno prompts back to the callback endpoint. The key is configured via the Portainer environment variable <code>HERMES_API_KEY</code>.</p>
|
||||
<p><strong>Current key:</strong> <code>{{ hermes_key_masked }}</code></p>
|
||||
|
||||
{% if hermes_key_just_generated %}
|
||||
<div class="flash success" style="background:#064e3b">
|
||||
<p><strong>New key (copy it now — it will not be shown again):</strong></p>
|
||||
<p class="path" id="new-hermes-key">{{ hermes_key_just_generated }}</p>
|
||||
<button type="button" onclick="copyHermesKey()">Copy to clipboard</button>
|
||||
</div>
|
||||
{% elif not hermes_key_set %}
|
||||
<p class="status-bad">⚠️ No Hermes API key is configured. Generate one before using the callback workflow.</p>
|
||||
{% if not hermes_key_set %}
|
||||
<p class="status-bad">⚠️ No Hermes API key is configured. Set the HERMES_API_KEY environment variable in Portainer before using the callback workflow.</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="POST" onsubmit="return confirm('Regenerating the key will invalidate the old one. Hermes will need the new key. Continue?')">
|
||||
<input type="hidden" name="action" value="regenerate_hermes_key">
|
||||
<button type="submit">Regenerate API Key</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Email / SMTP configuration -->
|
||||
|
|
|
|||
Reference in a new issue