mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-30 00:19:30 +00:00
* feat(remote-ui/common): scaffold shared-core directory (ref #127) * feat(remote-ui/common): extract palette.css from round/ (ref #127) * fix(remote-ui/common): trim palette.css to spec (6 module + 8 C3BOX tokens) (ref #127) * feat(remote-ui/common): extract base.css verbatim from round/ (ref #127) * feat(remote-ui/common): extract ICONS to icons.js (ref #127) * docs(remote-ui/common): correct icons.js header comment — sizes are {22,48,96} not 128 (ref #127) * feat(remote-ui/common): extract RINGS + CX/CY/SA to modules-table.js (ref #127) * feat(remote-ui/common): extract CFG to config.js (replaces jwt-helper.js per #127 plan revision) * feat(remote-ui/common): extract TransportManager with onModuleTap/onTransportChange hooks (ref #127) * feat(remote-ui/common): extract SIM + simStep to sim.js (ref #127) * feat(remote-ui/common): move 24 SecuBox module PNG icons to common/assets/icons/ (ref #127) * feat(remote-ui/common): move secubox-otg-gadget.sh, add GADGET_NAME env override + arm64 serial fallback (ref #127) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(remote-ui/common): trim whitespace from device-tree serial-number read (ref #127) * feat(remote-ui/common): move secubox-otg-host-up.sh + variant-aware comment (ref #127) * refactor(remote-ui/round): consume common/ via <link>/<script> tags (ref #127) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(secubox-system): add form_factor to RemoteUIConnectedRequest with TDD (ref #127) * feat(remote-ui/round): deploy.sh bundles common/ alongside round/ (ref #127) * fix(remote-ui/round): deploy.sh COMMON_SRC path resolution + rsync --delete (ref #127) * feat(remote-ui/round): build-eye-remote-image.sh embeds common/ + nginx /common/ alias (ref #127) * docs(remote-ui): document common/ dependency in round/ docs (ref #127) * docs(remote-ui/round): clarify palette.css is forward-looking (ref #127) * docs(remote-ui): Task 18 regression-gate report — structural verification (ref #127) Full diffoscope gate blocked by missing hyperpixel2r.dtbo prerequisite. Structural equivalence verified instead: Phase 1 changes are purely additive (common/ embed + nginx /common/ alias + extracted JS/CSS/icons), no behavioural change to round/'s existing logic. User must run the full image diffoscope manually after sourcing the hyperpixel2r.dtbo blob, before final merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci(eye-remote): bump workflow VERSION env 2.2.0 → 2.2.1 (ref #127) Pre-existing drift: build-eye-remote-image.sh writes secubox-eye-remote-2.2.1.img but the workflow's Compress/Checksum/ Upload steps reference ${{ env.VERSION }} = 2.2.0, so the compress step fails with "No such file or directory" after a successful build. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: CyberMind-FR <gandalf@Gk2.net> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
988 B
JavaScript
25 lines
988 B
JavaScript
// SPDX-License-Identifier: LicenseRef-CMSD-1.0
|
|
// Copyright (c) 2026 CyberMind — Gérald Kerma <devel@cybermind.fr>
|
|
// SecuBox-Deb :: remote-ui/common/js/sim.js
|
|
//
|
|
// Simulation drift generator — produces plausible /api/v1/system/metrics
|
|
// shaped output via bounded random walk when no SecuBox host responds.
|
|
// Activated by CFG.SIMULATE=true or when TransportManager probe falls back to 'SIM'.
|
|
//
|
|
// Depends on CFG.REFRESH_INTERVAL (load config.js BEFORE this file).
|
|
|
|
const SIM={cpu:14,mem:42,disk:28,net:-63,load:.18,temp:44,uptime:0,hostname:'secubox-zero'};
|
|
function simStep(){
|
|
const r=(v,d,mn,mx)=>Math.min(mx,Math.max(mn,v+(Math.random()-.5)*d));
|
|
SIM.cpu=r(SIM.cpu,12,0,100);SIM.mem=r(SIM.mem,3,20,95);
|
|
SIM.disk=r(SIM.disk,.7,5,95);SIM.net=r(SIM.net,5,-90,-20);
|
|
SIM.load=r(SIM.load,.12,0,4);SIM.temp=r(SIM.temp,1.5,35,82);
|
|
SIM.uptime+=CFG.REFRESH_INTERVAL/1000;
|
|
return SIM;
|
|
}
|
|
|
|
if (typeof window !== 'undefined') {
|
|
window.SIM = SIM;
|
|
window.simStep = simStep;
|
|
}
|