@attraccess/plugin-wago 0.1.0-nightly.1002.1 → 0.1.0-nightly.1004.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/frontend/{__federation_expose_Plugin-B8WKMfaS.js → __federation_expose_Plugin-Cx-twRMN.js}
RENAMED
|
@@ -64,6 +64,43 @@ function createPluginApiClient(basePath = "") {
|
|
|
64
64
|
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.slots.ts
|
|
65
65
|
var RESOURCE_OVERVIEW_SLOT = "resource.overview";
|
|
66
66
|
//#endregion
|
|
67
|
+
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.standard-drawer.tsx
|
|
68
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
69
|
+
var { DrawerBackdrop: DrawerBackdrop$1, DrawerContent: DrawerContent$1, DrawerDialog: DrawerDialog$1 } = await importShared("@heroui/react");
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region ../../../libs/plugins-frontend-sdk/src/lib/frontend.standard-modal.tsx
|
|
72
|
+
var { Modal: Modal$3, ModalBackdrop: ModalBackdrop$2, ModalContainer: ModalContainer$2, ModalDialog: ModalDialog$2 } = await importShared("@heroui/react");
|
|
73
|
+
var DEFAULT_DIALOG_STYLE = { backgroundColor: "var(--overlay)" };
|
|
74
|
+
/**
|
|
75
|
+
* Single source of truth for modal chrome, shared by the host app and
|
|
76
|
+
* plugins (module federation shares `@heroui/react` primitives, not host
|
|
77
|
+
* components — see apps/frontend/src/components/standardModal.tsx for the
|
|
78
|
+
* host's own copy). Wraps HeroUI's Modal primitives with the shared overlay
|
|
79
|
+
* token for contrast, like StandardDrawer.
|
|
80
|
+
*/
|
|
81
|
+
function StandardModal(props) {
|
|
82
|
+
const { children, size, backdropProps, containerProps, dialogProps, ...modalProps } = props;
|
|
83
|
+
const mergedDialogStyle = {
|
|
84
|
+
...DEFAULT_DIALOG_STYLE,
|
|
85
|
+
...dialogProps?.style
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modal$3, {
|
|
88
|
+
...modalProps,
|
|
89
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalBackdrop$2, {
|
|
90
|
+
...backdropProps,
|
|
91
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalContainer$2, {
|
|
92
|
+
size,
|
|
93
|
+
...containerProps,
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalDialog$2, {
|
|
95
|
+
...dialogProps,
|
|
96
|
+
style: mergedDialogStyle,
|
|
97
|
+
children
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
67
104
|
//#region frontend/src/api.ts
|
|
68
105
|
var api$5 = createPluginApiClient("/api/wago");
|
|
69
106
|
var hostApi = createPluginApiClient("/api");
|
|
@@ -368,13 +405,12 @@ function useConfigurationActions(controllerId) {
|
|
|
368
405
|
}
|
|
369
406
|
//#endregion
|
|
370
407
|
//#region frontend/src/ClaimControllerModal.tsx
|
|
371
|
-
var
|
|
372
|
-
var {
|
|
373
|
-
var { useEffectEvent, useState: useState$15 } = await importShared("react");
|
|
408
|
+
var { Alert: Alert$9, Button: Button$17, Form: Form$3, Input: Input$6, Label: Label$9, Modal: Modal$2, ModalBackdrop: ModalBackdrop$1, ModalBody: ModalBody$2, ModalContainer: ModalContainer$1, ModalDialog: ModalDialog$1, ModalFooter: ModalFooter$2, ModalHeader: ModalHeader$2, ModalHeading: ModalHeading$2, TextField: TextField$6 } = await importShared("@heroui/react");
|
|
409
|
+
var { useEffectEvent, useState: useState$16 } = await importShared("react");
|
|
374
410
|
function ClaimControllerModal({ controllerId, onOpenChange }) {
|
|
375
411
|
const claimMutation = useClaimControllerMutation();
|
|
376
|
-
const [name, setName] = useState$
|
|
377
|
-
const [verifier, setVerifier] = useState$
|
|
412
|
+
const [name, setName] = useState$16("");
|
|
413
|
+
const [verifier, setVerifier] = useState$16("");
|
|
378
414
|
function close() {
|
|
379
415
|
setName("");
|
|
380
416
|
setVerifier("");
|
|
@@ -402,12 +438,12 @@ function ClaimControllerModal({ controllerId, onOpenChange }) {
|
|
|
402
438
|
},
|
|
403
439
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalBackdrop$1, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalContainer$1, {
|
|
404
440
|
size: "sm",
|
|
405
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalDialog$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHeader$
|
|
441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalDialog$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHeader$2, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHeading$2, { children: "Claim controller" }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Form$3, {
|
|
406
442
|
onSubmit: (event) => {
|
|
407
443
|
event.preventDefault();
|
|
408
444
|
submitClaim();
|
|
409
445
|
},
|
|
410
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalBody$
|
|
446
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalBody$2, { children: [
|
|
411
447
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
412
448
|
className: "wg:text-sm wg:text-muted",
|
|
413
449
|
children: "Verify physical access to this controller before it can receive commands."
|
|
@@ -428,11 +464,11 @@ function ClaimControllerModal({ controllerId, onOpenChange }) {
|
|
|
428
464
|
onChange: (event) => setVerifier(event.target.value)
|
|
429
465
|
})]
|
|
430
466
|
}),
|
|
431
|
-
claimMutation.isError && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$
|
|
467
|
+
claimMutation.isError && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$9, {
|
|
432
468
|
status: "danger",
|
|
433
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$
|
|
469
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$9.Indicator, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$9.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$9.Description, { children: getErrorMessage$1(claimMutation.error) }) })]
|
|
434
470
|
})
|
|
435
|
-
] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalFooter$
|
|
471
|
+
] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalFooter$2, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$17, {
|
|
436
472
|
variant: "secondary",
|
|
437
473
|
onPress: close,
|
|
438
474
|
children: "Cancel"
|
|
@@ -451,7 +487,7 @@ function getErrorMessage$1(error) {
|
|
|
451
487
|
//#endregion
|
|
452
488
|
//#region frontend/src/useCommissioningVerification.ts
|
|
453
489
|
var { useQuery: useQuery$3 } = await importShared("@tanstack/react-query");
|
|
454
|
-
var { useEffect: useEffect$12, useState: useState$
|
|
490
|
+
var { useEffect: useEffect$12, useState: useState$15 } = await importShared("react");
|
|
455
491
|
/** Enrollment evidence is independent of configuration and physical qualification. */
|
|
456
492
|
function useCommissioningVerification(session) {
|
|
457
493
|
const enabled = ["awaiting_verification", "completed"].includes(session.state);
|
|
@@ -465,7 +501,7 @@ function useCommissioningVerification(session) {
|
|
|
465
501
|
enabled,
|
|
466
502
|
refetchInterval: 5e3
|
|
467
503
|
});
|
|
468
|
-
const [now, setNow] = useState$
|
|
504
|
+
const [now, setNow] = useState$15(Date.now);
|
|
469
505
|
useEffect$12(() => {
|
|
470
506
|
if (!enabled) return;
|
|
471
507
|
const timer = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -484,8 +520,10 @@ function useCommissioningVerification(session) {
|
|
|
484
520
|
}
|
|
485
521
|
//#endregion
|
|
486
522
|
//#region frontend/src/ControllersTable.tsx
|
|
487
|
-
var { Button: Button$16, Chip: Chip$2, Table, TableBody, TableCell, TableColumn, TableContent, TableHeader, TableRow, TableScrollContainer } = await importShared("@heroui/react");
|
|
523
|
+
var { Alert: Alert$8, Button: Button$16, Chip: Chip$2, ModalBody: ModalBody$1, ModalFooter: ModalFooter$1, ModalHeader: ModalHeader$1, ModalHeading: ModalHeading$1, Table, TableBody, TableCell, TableColumn, TableContent, TableHeader, TableRow, TableScrollContainer } = await importShared("@heroui/react");
|
|
524
|
+
var { useState: useState$14 } = await importShared("react");
|
|
488
525
|
function ControllersTable({ controllers, sessions, onClaim, onConfigure, onRemove, onResume }) {
|
|
526
|
+
const [runtimeUpdateController, setRuntimeUpdateController] = useState$14(null);
|
|
489
527
|
const activeSessions = sessions.filter((session) => session.state !== "completed" && (session.state !== "revoked" || !!session.runtimeRecoveryAvailable || !!session.dockerProvisionState || !!session.managementControllerId));
|
|
490
528
|
const rows = [...controllers.map((controller) => ({
|
|
491
529
|
key: `controller-${controller.id}`,
|
|
@@ -497,7 +535,7 @@ function ControllersTable({ controllers, sessions, onClaim, onConfigure, onRemov
|
|
|
497
535
|
kind: "session",
|
|
498
536
|
session
|
|
499
537
|
}))];
|
|
500
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableScrollContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableContent, {
|
|
538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableScrollContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableContent, {
|
|
501
539
|
"aria-label": "WAGO controllers and commissioning sessions",
|
|
502
540
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableHeader, { children: [
|
|
503
541
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableColumn, {
|
|
@@ -529,12 +567,16 @@ function ControllersTable({ controllers, sessions, onClaim, onConfigure, onRemov
|
|
|
529
567
|
onClaim,
|
|
530
568
|
onConfigure,
|
|
531
569
|
onRemove,
|
|
532
|
-
onResume
|
|
570
|
+
onResume,
|
|
571
|
+
onShowRuntimeUpdate: setRuntimeUpdateController
|
|
533
572
|
})
|
|
534
573
|
})]
|
|
535
|
-
}) }) })
|
|
574
|
+
}) }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RuntimeUpdateModal, {
|
|
575
|
+
controller: runtimeUpdateController,
|
|
576
|
+
onOpenChange: (open) => !open && setRuntimeUpdateController(null)
|
|
577
|
+
})] });
|
|
536
578
|
}
|
|
537
|
-
function ControllerRow({ row, onClaim, onConfigure, onRemove, onResume }) {
|
|
579
|
+
function ControllerRow({ row, onClaim, onConfigure, onRemove, onResume, onShowRuntimeUpdate }) {
|
|
538
580
|
const { controller, session } = row;
|
|
539
581
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, {
|
|
540
582
|
id: row.key,
|
|
@@ -574,22 +616,25 @@ function ControllerRow({ row, onClaim, onConfigure, onRemove, onResume }) {
|
|
|
574
616
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
575
617
|
className: "wg:flex wg:justify-end wg:gap-2",
|
|
576
618
|
children: [
|
|
577
|
-
session && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
onPress: () => onResume(session),
|
|
581
|
-
children: "View progress"
|
|
619
|
+
session && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionProgressAction, {
|
|
620
|
+
session,
|
|
621
|
+
onResume
|
|
582
622
|
}),
|
|
583
623
|
controller.trustState === "untrusted" ? !session && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
584
624
|
size: "sm",
|
|
585
625
|
onPress: () => onClaim(controller.id),
|
|
586
626
|
children: "Claim"
|
|
587
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
627
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
588
628
|
size: "sm",
|
|
589
629
|
variant: "secondary",
|
|
590
630
|
onPress: () => onConfigure(controller.id),
|
|
591
631
|
children: "Configure"
|
|
592
|
-
}),
|
|
632
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
633
|
+
size: "sm",
|
|
634
|
+
variant: "ghost",
|
|
635
|
+
onPress: () => onShowRuntimeUpdate(controller),
|
|
636
|
+
children: "Update runtime"
|
|
637
|
+
})] }),
|
|
593
638
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
594
639
|
size: "sm",
|
|
595
640
|
variant: "danger",
|
|
@@ -601,6 +646,43 @@ function ControllerRow({ row, onClaim, onConfigure, onRemove, onResume }) {
|
|
|
601
646
|
]
|
|
602
647
|
}, row.key);
|
|
603
648
|
}
|
|
649
|
+
/** Hides "View progress" once commissioning evidence is verified; a stuck backend state should not read as still in progress. */
|
|
650
|
+
function SessionProgressAction({ session, onResume }) {
|
|
651
|
+
if (useCommissioningVerification(session).enrollmentComplete) return null;
|
|
652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
653
|
+
size: "sm",
|
|
654
|
+
variant: "secondary",
|
|
655
|
+
onPress: () => onResume(session),
|
|
656
|
+
children: "View progress"
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
function RuntimeUpdateModal({ controller, onOpenChange }) {
|
|
660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StandardModal, {
|
|
661
|
+
isOpen: controller !== null,
|
|
662
|
+
onOpenChange,
|
|
663
|
+
size: "sm",
|
|
664
|
+
dialogProps: { "aria-label": "Runtime update" },
|
|
665
|
+
children: [
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHeader$1, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHeading$1, { children: "Runtime update" }) }),
|
|
667
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ModalBody$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
668
|
+
className: "wg:text-sm",
|
|
669
|
+
children: [
|
|
670
|
+
"Running runtime: ",
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: controller?.runtimeVersion }),
|
|
672
|
+
" · protocol ",
|
|
673
|
+
controller?.protocolVersion
|
|
674
|
+
]
|
|
675
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$8, {
|
|
676
|
+
status: "warning",
|
|
677
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$8.Indicator, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$8.Content, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$8.Title, { children: "No in-place update yet" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$8.Description, { children: "Attraccess cannot update this controller's runtime without a full reinstall. The only current path is re-running commissioning, which wipes applications, data and configuration on the CC100 and reinstalls from scratch. That is why it is not offered here as a one-click action. Automatic, non-destructive runtime updates are tracked in ATT-1099." })] })]
|
|
678
|
+
})] }),
|
|
679
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalFooter$1, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$16, {
|
|
680
|
+
onPress: () => onOpenChange(false),
|
|
681
|
+
children: "Understood"
|
|
682
|
+
}) })
|
|
683
|
+
]
|
|
684
|
+
});
|
|
685
|
+
}
|
|
604
686
|
function CommissioningRow({ row, onResume }) {
|
|
605
687
|
const { session } = row;
|
|
606
688
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, {
|
|
@@ -1646,15 +1728,24 @@ function CommissioningModal(props) {
|
|
|
1646
1728
|
}
|
|
1647
1729
|
function CommissioningContent({ model }) {
|
|
1648
1730
|
const { onConfigure, session, activeStep, title, loadingStatus, hostKeyFingerprint, setHostKeyFingerprint, isolatedIdentity, setIsolatedIdentity, deliverSessionMutation, sshUsername, sshPassword, setSshUsername, setSshPassword, customSsh, setCustomSsh, confirmInstall, setConfirmInstall, isCancelConfirmationOpen, configureController } = model;
|
|
1731
|
+
const verification = useCommissioningVerification(session ?? {
|
|
1732
|
+
id: -1,
|
|
1733
|
+
state: "revoked"
|
|
1734
|
+
});
|
|
1735
|
+
const isFullyDone = !!session && verification.runtimeVerified === true;
|
|
1649
1736
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerBody$1, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1650
|
-
className:
|
|
1651
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DevicePassport, {
|
|
1737
|
+
className: `wg:grid wg:min-w-0 wg:gap-5 ${isFullyDone ? "" : "wg:md:grid-cols-[13rem_minmax(0,1fr)]"}`,
|
|
1738
|
+
children: [!isFullyDone && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DevicePassport, {
|
|
1652
1739
|
className: "wg:hidden wg:md:block",
|
|
1653
1740
|
name: title,
|
|
1654
1741
|
step: activeStep
|
|
1655
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.
|
|
1742
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1656
1743
|
className: "wg:min-w-0 wg:space-y-5",
|
|
1657
|
-
children:
|
|
1744
|
+
children: session && isFullyDone ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompletedSessionSummary, {
|
|
1745
|
+
session,
|
|
1746
|
+
verification,
|
|
1747
|
+
onConfigure: onConfigure ? configureController : void 0
|
|
1748
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1658
1749
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StepHeading, { step: activeStep }),
|
|
1659
1750
|
loadingStatus && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OperationStatus, {
|
|
1660
1751
|
title: loadingStatus[0],
|
|
@@ -1706,12 +1797,68 @@ function CommissioningContent({ model }) {
|
|
|
1706
1797
|
status: "warning",
|
|
1707
1798
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$5.Indicator, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$5.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$5.Description, { children: "Canceling revokes the enrollment credential and deletes this commissioning session." }) })]
|
|
1708
1799
|
})
|
|
1709
|
-
]
|
|
1800
|
+
] })
|
|
1710
1801
|
})]
|
|
1711
1802
|
}) });
|
|
1712
1803
|
}
|
|
1804
|
+
/** Read-only recap once commissioning evidence and runtime setup are both verified; nothing here still needs action. */
|
|
1805
|
+
function CompletedSessionSummary({ session, verification, onConfigure }) {
|
|
1806
|
+
const controllerId = verification.data?.controllerId ?? session.managementControllerId ?? null;
|
|
1807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1808
|
+
className: "wg:space-y-4",
|
|
1809
|
+
children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$5, {
|
|
1811
|
+
status: "success",
|
|
1812
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$5.Indicator, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$5.Content, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert$5.Title, { children: "Commissioning complete" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert$5.Description, { children: [session.controllerName ?? session.hardwareId, " is enrolled on permanent credentials, connected, and its configuration is applied."] })] })]
|
|
1813
|
+
}),
|
|
1814
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
1815
|
+
className: "wg:grid wg:gap-3 wg:text-sm wg:sm:grid-cols-2",
|
|
1816
|
+
children: [
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SummaryField, {
|
|
1818
|
+
label: "Hardware ID",
|
|
1819
|
+
value: session.hardwareId
|
|
1820
|
+
}),
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SummaryField, {
|
|
1822
|
+
label: "Firmware baseline",
|
|
1823
|
+
value: session.firmwareBaseline
|
|
1824
|
+
}),
|
|
1825
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SummaryField, {
|
|
1826
|
+
label: "Claimed",
|
|
1827
|
+
value: new Date(session.updatedAt).toLocaleString()
|
|
1828
|
+
}),
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SummaryField, {
|
|
1830
|
+
label: "Management hardening",
|
|
1831
|
+
value: verification.data?.managementHardening ?? "unverified"
|
|
1832
|
+
})
|
|
1833
|
+
]
|
|
1834
|
+
}),
|
|
1835
|
+
onConfigure && controllerId && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$12, {
|
|
1836
|
+
onPress: () => onConfigure(controllerId),
|
|
1837
|
+
children: "Configure inputs and outputs"
|
|
1838
|
+
})
|
|
1839
|
+
]
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
function SummaryField({ label, value }) {
|
|
1843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
1844
|
+
className: "wg:text-xs wg:text-muted",
|
|
1845
|
+
children: label
|
|
1846
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
1847
|
+
className: "wg:font-medium",
|
|
1848
|
+
children: value
|
|
1849
|
+
})] });
|
|
1850
|
+
}
|
|
1713
1851
|
function CommissioningActions({ model }) {
|
|
1714
1852
|
const { session, isLoading, hostKeyFingerprint, isolatedIdentity, sshUsername, sshPassword, confirmInstall, recoveryUsername, recoveryPassword, confirmRecovery, recoverSessionMutation, isCancelConfirmationOpen, setCancelConfirmationOpen, close, deliverSession, recoverSession, confirmHostKey } = model;
|
|
1853
|
+
const verification = useCommissioningVerification(session ?? {
|
|
1854
|
+
id: -1,
|
|
1855
|
+
state: "revoked"
|
|
1856
|
+
});
|
|
1857
|
+
if (session && verification.runtimeVerified === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerFooter$1, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$12, {
|
|
1858
|
+
variant: "secondary",
|
|
1859
|
+
onPress: close,
|
|
1860
|
+
children: "Close"
|
|
1861
|
+
}) });
|
|
1715
1862
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerFooter$1, {
|
|
1716
1863
|
className: "wg:flex-wrap",
|
|
1717
1864
|
children: [
|
package/frontend/remoteEntry.js
CHANGED
|
@@ -9,7 +9,7 @@ var exportSet = /* @__PURE__ */ new Set([
|
|
|
9
9
|
]);
|
|
10
10
|
var moduleMap = { "./plugin": () => {
|
|
11
11
|
dynamicLoadingCss(["style.css"], false, "./plugin");
|
|
12
|
-
return __federation_import("./__federation_expose_Plugin-
|
|
12
|
+
return __federation_import("./__federation_expose_Plugin-Cx-twRMN.js").then((module) => Object.keys(module).every((item) => exportSet.has(item)) ? () => module.default : () => module);
|
|
13
13
|
} };
|
|
14
14
|
var seen = {};
|
|
15
15
|
var dynamicLoadingCss = (cssFilePaths, dontAppendStylesToHead, exposeItemName) => {
|