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

+6 -2
View File
@@ -472,7 +472,7 @@ async function scanObjects(client, device, portNumber) {
});
}
return points;
return { points, pointLimitReached: values.length > pointLimit };
}
function encodeBacnetContextUnsigned(tagNumber, value) {
@@ -764,7 +764,9 @@ async function scanNetwork(body) {
if (resolvedName) {
device.name = resolvedName;
}
device.points = await scanObjects(client, device, routing.port);
const scan = await scanObjects(client, device, routing.port);
device.points = scan.points;
device.pointLimitReached = scan.pointLimitReached;
device.pointCount = device.points.length;
}
}
@@ -778,6 +780,7 @@ async function scanNetwork(body) {
rawTrace: body.debug === true ? rawTrace : undefined,
rawDebug: body.debug === true ? rawDebug : undefined,
points: visibleDevices.flatMap((device) => device.points || []),
pointLimitReached: visibleDevices.some((device) => device.pointLimitReached),
scannedAt: new Date().toISOString(),
};
} finally {
@@ -831,6 +834,7 @@ async function readCurrentValue(source, datapoint) {
});
});
const raw = extractValue(propertyValue);
if (raw == null || (typeof raw === "string" && !raw.trim())) return null;
if (typeof raw === "boolean") {
return raw ? 1 : 0;
}