feat(settings): public_base_url field in general settings UI
This commit is contained in:
@@ -90,6 +90,8 @@ async def save_general():
|
|||||||
form = await request.form
|
form = await request.form
|
||||||
async with current_app.db_sessionmaker() as db:
|
async with current_app.db_sessionmaker() as db:
|
||||||
async with db.begin():
|
async with db.begin():
|
||||||
|
await set_setting(db, "general.public_base_url",
|
||||||
|
(form.get("general.public_base_url", "") or "").strip())
|
||||||
await set_setting(db, "session.lifetime_hours",
|
await set_setting(db, "session.lifetime_hours",
|
||||||
int(form.get("session.lifetime_hours", 8)))
|
int(form.get("session.lifetime_hours", 8)))
|
||||||
await set_setting(db, "data.retention_days",
|
await set_setting(db, "data.retention_days",
|
||||||
|
|||||||
@@ -9,6 +9,18 @@
|
|||||||
<div class="card" style="max-width:640px;">
|
<div class="card" style="max-width:640px;">
|
||||||
<h2 class="section-title" style="margin-bottom:1.25rem;">General</h2>
|
<h2 class="section-title" style="margin-bottom:1.25rem;">General</h2>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Public base URL</label>
|
||||||
|
<input type="text" name="general.public_base_url"
|
||||||
|
value="{{ settings['general.public_base_url'] }}"
|
||||||
|
placeholder="https://monitor.example.com">
|
||||||
|
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">
|
||||||
|
External URL where this Roundtable instance is reachable from the outside.
|
||||||
|
Leave blank to use whatever hostname you're currently browsing via.
|
||||||
|
Used by install scripts, share links, and alert notifications.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Session lifetime <span style="color:var(--text-muted);font-size:0.8rem;">(hours)</span></label>
|
<label>Session lifetime <span style="color:var(--text-muted);font-size:0.8rem;">(hours)</span></label>
|
||||||
<input type="number" name="session.lifetime_hours" min="1" max="720"
|
<input type="number" name="session.lifetime_hours" min="1" max="720"
|
||||||
|
|||||||
Reference in New Issue
Block a user