feat(haproxy,metablogizer,streamlit): Add GK2 Hub landing page regeneration hooks
Add hooks to auto-regenerate the GK2 Hub landing page when services change: - haproxyctl: vhost add/remove, reload - metablogizerctl: publish, delete, emancipate - streamlitctl: instance add/remove, app delete, emancipate The gk2hub-generate script dynamically builds the landing page from HAProxy vhosts, Streamlit instances, and MetaBlogizer sites. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9048f6b53b
commit
9ad45d6b1d
@ -1,6 +1,6 @@
|
||||
# Work In Progress (Claude)
|
||||
|
||||
_Last updated: 2026-02-11_
|
||||
_Last updated: 2026-02-12_
|
||||
|
||||
> **Architecture Reference**: SecuBox Fanzine v3 — Les 4 Couches
|
||||
|
||||
@ -335,6 +335,29 @@ _Last updated: 2026-02-11_
|
||||
- Blockchain: `peer_approved` blocks recorded correctly
|
||||
- Threat Intel: 288 local IOCs, 67 threat_ioc blocks in chain
|
||||
|
||||
### Just Completed (2026-02-12)
|
||||
|
||||
- **HAProxy stats.js KISS Migration** — DONE (2026-02-12)
|
||||
- Rewrote Statistics dashboard to use KissTheme
|
||||
- Stats iframe, logs viewer with refresh
|
||||
- Removed CSS import via style element
|
||||
|
||||
- **HAProxy backends.js KISS Migration** — DONE (2026-02-12)
|
||||
- Rewrote Backends dashboard to use KissTheme
|
||||
- Backend cards with server lists, health check info
|
||||
- Add/edit server modals with quick service selector
|
||||
- Removed external dashboard.css dependency
|
||||
|
||||
- **HAProxy vhosts.js KISS Migration** — DONE (2026-02-12)
|
||||
- Rewrote Virtual Hosts dashboard to use KissTheme
|
||||
- Self-contained inline CSS, removed external dashboard.css
|
||||
- Add vhost form, vhosts table, edit modal, delete confirmation
|
||||
|
||||
- **InterceptoR LXC Detection Fix** — DONE (2026-02-12)
|
||||
- Changed from `lxc-ls --running` to `lxc-info -n mitmproxy -s`
|
||||
- More reliable container state detection
|
||||
- Fixed container name from `secbx-mitmproxy` to `mitmproxy`
|
||||
|
||||
### Just Completed (2026-02-11)
|
||||
|
||||
- **InterceptoR Services Dashboard** — DONE (2026-02-11)
|
||||
|
||||
@ -330,7 +330,12 @@
|
||||
"Bash(git describe:*)",
|
||||
"Bash(SSH_AUTH_SOCK=\"$SSH_AUTH_SOCK\" ssh:*)",
|
||||
"Bash(node --check:*)",
|
||||
"Bash(do ssh root@192.168.255.1 'ubus call luci.cloner build_progress \"\"{}\"\"')"
|
||||
"Bash(do ssh root@192.168.255.1 'ubus call luci.cloner build_progress \"\"{}\"\"')",
|
||||
"Bash(while read file)",
|
||||
"Bash(if ! grep -q \"kiss-theme\" \"$file\")",
|
||||
"Bash(pip3 show:*)",
|
||||
"Bash(playwright install:*)",
|
||||
"Bash(timeout 8 streamlit run:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -1653,6 +1653,9 @@ cmd_vhost_add() {
|
||||
uci commit haproxy
|
||||
|
||||
log_info "Virtual host added: $domain -> $backend"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_vhost_remove() {
|
||||
@ -1666,6 +1669,9 @@ cmd_vhost_remove() {
|
||||
uci commit haproxy
|
||||
|
||||
log_info "Virtual host removed: $domain"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
# ===========================================
|
||||
@ -1813,6 +1819,9 @@ cmd_reload() {
|
||||
log_error "Could not signal HAProxy for reload"
|
||||
|
||||
log_info "Reload complete"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_validate() {
|
||||
|
||||
@ -376,6 +376,9 @@ cmd_publish() {
|
||||
/usr/sbin/secubox-content-pkg site "$name" "$domain" 2>/dev/null && \
|
||||
log_info "Site packaged for mesh distribution"
|
||||
fi
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_delete() {
|
||||
@ -412,6 +415,9 @@ cmd_delete() {
|
||||
fi
|
||||
|
||||
log_info "Site deleted"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_sync() {
|
||||
@ -870,6 +876,9 @@ _emancipate_reload() {
|
||||
else
|
||||
log_warn "[RELOAD] HAProxy may not have started properly"
|
||||
fi
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_emancipate() {
|
||||
|
||||
@ -671,6 +671,9 @@ cmd_app_delete() {
|
||||
uci commit "$CONFIG"
|
||||
|
||||
log_info "App '$name' deleted"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_app_deploy() {
|
||||
@ -811,6 +814,9 @@ cmd_instance_add() {
|
||||
|
||||
log_info "Instance added: $app on port $port"
|
||||
log_info "Restart service to apply: /etc/init.d/streamlit restart"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_instance_remove() {
|
||||
@ -832,6 +838,9 @@ cmd_instance_remove() {
|
||||
generate_instances_conf
|
||||
|
||||
log_info "Instance '$name' removed"
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_instance_start() {
|
||||
@ -1348,6 +1357,9 @@ _emancipate_reload() {
|
||||
else
|
||||
log_warn "[RELOAD] HAProxy may not have started properly"
|
||||
fi
|
||||
|
||||
# Regenerate GK2 Hub landing page if generator exists
|
||||
[ -x /usr/bin/gk2hub-generate ] && /usr/bin/gk2hub-generate >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
cmd_emancipate() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user