Macrostop and timeline segmentation

This commit is contained in:
mdares
2026-01-09 00:01:04 +00:00
parent 7790361a0a
commit d0ab254dd7
33 changed files with 1865 additions and 179 deletions

View File

@@ -54,6 +54,7 @@ export function buildSettingsPayload(settings: any, shifts: any[]) {
},
thresholds: {
stoppageMultiplier: settings.stoppageMultiplier,
macroStoppageMultiplier: settings.macroStoppageMultiplier,
oeeAlertThresholdPct: settings.oeeAlertThresholdPct,
performanceThresholdPct: settings.performanceThresholdPct,
qualitySpikeDeltaPct: settings.qualitySpikeDeltaPct,
@@ -159,6 +160,14 @@ export function validateThresholds(thresholds: any) {
}
}
const macroStoppage = thresholds.macroStoppageMultiplier;
if (macroStoppage != null) {
const v = Number(macroStoppage);
if (!Number.isFinite(v) || v < 1.1 || v > 20.0) {
return { ok: false, error: "macroStoppageMultiplier must be 1.1-20.0" };
}
}
const oee = thresholds.oeeAlertThresholdPct;
if (oee != null) {
const v = Number(oee);