fix: show OUTLINE_TOKEN in full, drop TS_AUTHKEY from UI config panel
All checks were successful
Deploy / deploy (push) Successful in 11s
All checks were successful
Deploy / deploy (push) Successful in 11s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
13
webui.py
13
webui.py
@@ -495,16 +495,8 @@ async def dashboard():
|
|||||||
pull_html = _sync_entry_html(s["last_pull"])
|
pull_html = _sync_entry_html(s["last_pull"])
|
||||||
push_html = _sync_entry_html(s["last_push"])
|
push_html = _sync_entry_html(s["last_push"])
|
||||||
|
|
||||||
def _mask(val: str) -> str:
|
|
||||||
if not val:
|
|
||||||
return '<span style="color:#dc3545">NOT SET</span>'
|
|
||||||
if len(val) <= 10:
|
|
||||||
return "***"
|
|
||||||
return f'<code>{val[:6]}***{val[-4:]}</code>'
|
|
||||||
|
|
||||||
outline_url = os.environ.get("OUTLINE_URL", "")
|
outline_url = os.environ.get("OUTLINE_URL", "")
|
||||||
outline_tok = _mask(os.environ.get("OUTLINE_TOKEN", ""))
|
outline_tok = os.environ.get("OUTLINE_TOKEN", "") or '<span style="color:#dc3545">NOT SET</span>'
|
||||||
ts_authkey = _mask(os.environ.get("TS_AUTHKEY", ""))
|
|
||||||
|
|
||||||
body = f"""
|
body = f"""
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -528,8 +520,7 @@ async def dashboard():
|
|||||||
<table>
|
<table>
|
||||||
<tr><th>Key</th><th>Value</th></tr>
|
<tr><th>Key</th><th>Value</th></tr>
|
||||||
<tr><td>OUTLINE_URL</td><td><code>{outline_url or '<span style="color:#dc3545">NOT SET</span>'}</code></td></tr>
|
<tr><td>OUTLINE_URL</td><td><code>{outline_url or '<span style="color:#dc3545">NOT SET</span>'}</code></td></tr>
|
||||||
<tr><td>OUTLINE_TOKEN</td><td>{outline_tok}</td></tr>
|
<tr><td>OUTLINE_TOKEN</td><td><code>{outline_tok}</code></td></tr>
|
||||||
<tr><td>TS_AUTHKEY</td><td>{ts_authkey}</td></tr>
|
|
||||||
<tr><td>APP_VERSION</td><td><code>{APP_VERSION}</code></td></tr>
|
<tr><td>APP_VERSION</td><td><code>{APP_VERSION}</code></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>"""
|
</div>"""
|
||||||
|
|||||||
Reference in New Issue
Block a user