feat: add modal dialog, paged results, scan status, and trend value table components

- Introduced ModalDialog component for displaying modal dialogs with accessibility features.
- Added PagedResults component to handle pagination of items with customizable rendering.
- Created ScanStatus component to display the status of a scan with elapsed time.
- Implemented TrendValueTable component for displaying trend data in a paginated table format.
- Added measurement utility functions for formatting and validating measurement values.
- Included tests for measurement functions and trend series fetching logic to ensure correctness.
This commit is contained in:
jhartworks committed 2026-11-25 15:45:49 +01:00
1 parent c19c77334f
commit a8b6cd4061
23 files changed
+1479 -2157

No files matched your search

+1
View File
@@ -146,6 +146,7 @@ async function readValue(source, datapoint) {
}
const response = await requestApi(source, { function: "getvalue", id: variableId });
const raw = response.value ?? response.variable?.value;
if (raw == null || (typeof raw === "string" && !raw.trim())) return null;
if (typeof raw === "boolean") return raw ? 1 : 0;
const numeric = Number(raw);
return Number.isFinite(numeric) ? numeric * (Number(datapoint.scale || 1) || 1) : raw === null || raw === undefined ? null : String(raw);