mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-08-31 08:57:14 +02:00
cc-lib's resamplers cannot smooth: validateFrequency bails out when the new frequency is not coarser than the old one, and every algorithm produces an output strictly shorter than its input. They consolidate for transport, which is a separate job from filtering for display, and they only act at all once a series exceeds the target point count - shorter jobs arrive raw. Add a centered, NaN-aware moving average in the plot layer, applied after whatever downsampling the backend performed. It preserves length and index alignment, so the X array, the visible point count and the zoom-resampling hook are unaffected. NaN and null samples are skipped, an all-NaN window stays NaN so gaps keep rendering, and the window shrinks at the series edges rather than introducing new gaps there. The window is a user setting in data points, defaulting to 3, and is orthogonal to the resample algorithm - it stacks on top of average consolidation rather than replacing it. All series of a stats plot are smoothed together, since smoothing only some would break the min <= mid <= max invariant the plot bands rely on. Smoothing is display only: reported statistics and job footprints come from JobMetric.Statistics and are untouched. The uPlot cursor readout does show the smoothed value. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cc-frontend
A frontend for ClusterCockpit and cc-backend. Backend specific configuration can be done using the constants defined in the intro section in ./rollup.config.mjs.
Builds on:
Get started
Install the dependencies...
npm install
...then build using Rollup:
npm run build