332d14e37d
- daemon: send full snapshot on connect; versions/tick now carry the full state of one subsystem (subsystem + data); no legacy updated/subsystems payloads; refresh_state and POST /status/refresh broadcast per-subsystem versions with data - client: modelSet() patches models in place; onMessage/topic refresh retired; 3s initial-load fallback via new POST /api/status/refresh - schema: lib/schema.py TypedDicts + hoover/schema.js defaults + docs/state-model.md as single source of truth for state shapes - system: poll at 1s, volatile metrics registered, dashboard uses a dedicated system model (status model removed) - firewall: refuse to strip both https and ssh from the default zone (409, force override via UI confirm); set_zone_services persists services to the declarative config; collector exposes default_zone - UI: pages migrate to flat state shapes; post-mutation modelFetch refreshes removed (WS delta covers it) - tests: ws snapshot/delta/broadcast, refresh-state, schema types, model-set/js ws handler and reconnect fallback
63 lines
4.5 KiB
JavaScript
63 lines
4.5 KiB
JavaScript
/**
|
|
* Hoover — index.js
|
|
*
|
|
* Barrel export of all public Hoover APIs.
|
|
*/
|
|
|
|
/* ── Reactivity ──────────────────────────────────────────────── */
|
|
export { reactive, requestUpdate } from './reactivity.js';
|
|
|
|
/* ── VDOM ────────────────────────────────────────────────────── */
|
|
export { h } from './vdom.js';
|
|
|
|
/* ── HTM ──────────────────────────────────────────────────────── */
|
|
export { html } from './html.js';
|
|
|
|
/* ── Render ──────────────────────────────────────────────────── */
|
|
export { render } from './render.js';
|
|
|
|
/* ── Component ───────────────────────────────────────────────── */
|
|
export { definePage, hComp } from './component.js';
|
|
|
|
/* ── Router ──────────────────────────────────────────────────── */
|
|
export { createRouter, Link } from './router.js';
|
|
|
|
/* ── WebSocket ───────────────────────────────────────────────── */
|
|
export { connect, disconnect } from './websocket.js';
|
|
|
|
/* ── API & Toast ─────────────────────────────────────────────── */
|
|
export { apiFetch, toast, dismissToast, apiSubmit, checkAbort, poll, refactorLoad, formAction }
|
|
from './api.js';
|
|
|
|
/* ── UI Components: Auth ──────────────────────────────────────── */
|
|
export { logout, doLogin, webauthnSupported,
|
|
startRegistration, startAuthentication } from './components/auth.js';
|
|
|
|
/* ── Auth model ───────────────────────────────────────────────── */
|
|
export { createAuthModel, getAuthToken, isAuthenticated, refreshAuth, getAuthData }
|
|
from './auth_model.js';
|
|
|
|
/* ── Model ───────────────────────────────────────────────────── */
|
|
export { modelRegister, getModel, modelFetch, modelSet, collectLoadingModels } from './model.js';
|
|
|
|
/* ── Helpers ─────────────────────────────────────────────────── */
|
|
export { esc, att_esc, enc, $val, parseZones, fmtBytes, csvToArr, downloadBlob } from './helpers.js';
|
|
|
|
/* ── UI Components: Layout ───────────────────────────────────── */
|
|
export { PageHeader, renderGuard, renderGuardMulti, Tabs, SectionTitle, ActionGroup, DataTableSection } from './components/layout.js';
|
|
|
|
/* ── UI Components: Data ─────────────────────────────────────── */
|
|
export { Badge, StatusDot, Empty, Card, ConfirmDelete, Table, ActionButton, certStatusBadge, serviceStatusBadge, StatCard, StatusText, ServiceStatus, ActionCell, MonoText, ZoneSelect } from './components/data.js';
|
|
|
|
/* ── UI Components: Modal ────────────────────────────────────── */
|
|
export { openModal, closeModal, closeAllModals, modalVNodes, refreshModals, formModal, MultiSelectModal, QuickModal, isModalProcessing, setModalProcessing } from './components/modal.js';
|
|
|
|
/* ── UI Components: Apply ────────────────────────────────────── */
|
|
export { ApplyConfirm } from './components/applyconfirm.js';
|
|
|
|
/* ── UI Components: Toast ────────────────────────────────────── */
|
|
export { ToastContainer } from './components/toast.js';
|
|
|
|
/* ── UI Components: QR Code ──────────────────────────────────── */
|
|
export { qrSVG, QRCodeVNode, LogoUpload } from './components/qr.js';
|