185 files
This commit is contained in:
@@ -50,6 +50,12 @@ export function renderTriggerProgress(row: TaskRow | MaintenanceTask) {
|
||||
const range = high - below || 1;
|
||||
pct = Math.min(100, Math.max(0, ((high - val) / range) * 100));
|
||||
label = `${val.toFixed(1)} / ${below} ${unit}`;
|
||||
} else if (tc.trigger_equals != null || tc.trigger_not_equals != null) {
|
||||
// Discrete = / ≠ levels have no meaningful gradient — binary bar,
|
||||
// same treatment as compound.
|
||||
const target = tc.trigger_equals != null ? `= ${tc.trigger_equals}` : `≠ ${tc.trigger_not_equals}`;
|
||||
label = `${val.toFixed(1)} (${target}${unit ? ` ${unit}` : ""})`;
|
||||
pct = row.trigger_active ? 100 : 0;
|
||||
} else {
|
||||
return nothing;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ export function renderTriggerSection(task: MaintenanceTask, ctx: SparklineContex
|
||||
${triggerType === "threshold" ? html`
|
||||
${tc.trigger_above != null ? html`<span class="trigger-limit-item"><span class="dot warn" aria-hidden="true"></span> ${t("threshold_above", L)}: ${tc.trigger_above} ${unit}</span>` : nothing}
|
||||
${tc.trigger_below != null ? html`<span class="trigger-limit-item"><span class="dot warn" aria-hidden="true"></span> ${t("threshold_below", L)}: ${tc.trigger_below} ${unit}</span>` : nothing}
|
||||
${tc.trigger_equals != null ? html`<span class="trigger-limit-item"><span class="dot warn" aria-hidden="true"></span> = ${tc.trigger_equals} ${unit}</span>` : nothing}
|
||||
${tc.trigger_not_equals != null ? html`<span class="trigger-limit-item"><span class="dot warn" aria-hidden="true"></span> ≠ ${tc.trigger_not_equals} ${unit}</span>` : nothing}
|
||||
${tc.trigger_for_minutes ? html`<span class="trigger-limit-item"><span class="dot range" aria-hidden="true"></span> ${t("for_minutes", L)}: ${tc.trigger_for_minutes}</span>` : nothing}
|
||||
` : nothing}
|
||||
${triggerType === "state_change" ? html`
|
||||
|
||||
Reference in New Issue
Block a user