@flightctl/ui-components 0.0.4 → 0.0.10
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/dist/__mocks__/fileMock.d.ts +3 -0
- package/dist/__mocks__/fileMock.d.ts.map +1 -0
- package/dist/__mocks__/styleMock.d.ts +2 -0
- package/dist/__mocks__/styleMock.d.ts.map +1 -0
- package/dist/jest.config.d.ts +12 -0
- package/dist/jest.config.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.d.ts +8 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts +18 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts +2 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts +17 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.d.ts +7 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +2 -3
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.d.ts +9 -0
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js +2 -1
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts +12 -0
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts.map +1 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts +6 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts +6 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +12 -3
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts +12 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +24 -22
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.d.ts +8 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js +3 -3
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceOs.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.js +24 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts +9 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts +17 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js +61 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts +14 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/DeviceTableRow.js +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts +21 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/DeviceTableToolbar.js +10 -11
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.css +16 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts +18 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +147 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +28 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +130 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts +6 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js +95 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts +11 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js +18 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/types.d.ts +18 -0
- package/dist/src/components/Device/DevicesPage/types.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/types.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts +14 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceBackendFilters.js +10 -3
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts +27 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js +82 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +87 -21
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.css +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js +61 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +88 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js +3 -3
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js +26 -31
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts +11 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +14 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +26 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +9 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +20 -0
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.d.ts +3 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +44 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.js +6 -4
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts +11 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts.map +1 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts +17 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts +5 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +2 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts +15 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +9 -13
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.css +10 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.d.ts +5 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.js +22 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.js.map +1 -0
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts +6 -0
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts +5 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts +7 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts +4 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +4 -5
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +10 -0
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts +7 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +11 -6
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +8 -0
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.d.ts +3 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.js +8 -3
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts +7 -0
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts +4 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts +7 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js +10 -20
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts +9 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js +23 -17
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts +7 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.d.ts +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js.map +1 -1
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts +7 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js +115 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -0
- package/dist/src/components/Fleet/FleetRow.d.ts +13 -0
- package/dist/src/components/Fleet/FleetRow.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetRow.js +5 -5
- package/dist/src/components/Fleet/FleetRow.js.map +1 -1
- package/dist/src/components/Fleet/FleetStatus.d.ts +7 -0
- package/dist/src/components/Fleet/FleetStatus.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetsPage.d.ts +4 -0
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -0
- package/dist/src/components/Fleet/{FleetList.js → FleetsPage.js} +31 -51
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts +5 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts +12 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.d.ts +8 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.d.ts +7 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.d.ts +6 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.d.ts.map +1 -0
- package/dist/src/components/Fleet/useFleets.d.ts +18 -0
- package/dist/src/components/Fleet/useFleets.d.ts.map +1 -0
- package/dist/src/components/Fleet/useFleets.js +61 -0
- package/dist/src/components/Fleet/useFleets.js.map +1 -0
- package/dist/src/components/ListPage/ListPage.d.ts +10 -0
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPage.js +2 -2
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/ListPage/ListPageActions.d.ts +17 -0
- package/dist/src/components/ListPage/ListPageActions.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPageActions.js +13 -2
- package/dist/src/components/ListPage/ListPageActions.js.map +1 -1
- package/dist/src/components/ListPage/ListPageBody.d.ts +9 -0
- package/dist/src/components/ListPage/ListPageBody.d.ts.map +1 -0
- package/dist/src/components/ListPage/types.d.ts +16 -0
- package/dist/src/components/ListPage/types.d.ts.map +1 -0
- package/dist/src/components/NavItem/NavItem.d.ts +8 -0
- package/dist/src/components/NavItem/NavItem.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js +5 -17
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js +7 -20
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +13 -11
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts +14 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js +22 -51
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js +5 -17
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/utils.d.ts +15 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.js +9 -26
- package/dist/src/components/OverviewPage/Cards/Status/utils.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js +5 -10
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Overview.d.ts +4 -0
- package/dist/src/components/OverviewPage/Overview.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Overview.js +1 -1
- package/dist/src/components/OverviewPage/Overview.js.map +1 -1
- package/dist/src/components/OverviewPage/OverviewPage.d.ts +4 -0
- package/dist/src/components/OverviewPage/OverviewPage.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts +4 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js +2 -2
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts +21 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +8 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts +9 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +18 -11
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/types.d.ts +42 -0
- package/dist/src/components/Repository/CreateRepository/types.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.d.ts +75 -0
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.js +40 -7
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts +9 -0
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts +4 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +3 -2
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.d.ts +7 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js +14 -13
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts +6 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.d.ts +22 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js +43 -11
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.d.ts +7 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js +30 -33
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts +5 -0
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryList.js +4 -4
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.css +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +73 -26
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/ResourceSync/ResourceSyncStatus.d.ts +9 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.d.ts.map +1 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js +9 -18
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js.map +1 -1
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.d.ts +4 -0
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationStatus.d.ts +13 -0
- package/dist/src/components/Status/ApplicationStatus.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.d.ts +13 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.js.map +1 -1
- package/dist/src/components/Status/DeviceResourceStatus.d.ts +9 -0
- package/dist/src/components/Status/DeviceResourceStatus.d.ts.map +1 -0
- package/dist/src/components/Status/DeviceStatus.d.ts +7 -0
- package/dist/src/components/Status/DeviceStatus.d.ts.map +1 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.d.ts +7 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.d.ts.map +1 -0
- package/dist/src/components/Status/IntegrityStatus.d.ts +7 -0
- package/dist/src/components/Status/IntegrityStatus.d.ts.map +1 -0
- package/dist/src/components/Status/RepositoryStatus.d.ts +10 -0
- package/dist/src/components/Status/RepositoryStatus.d.ts.map +1 -0
- package/dist/src/components/Status/StatusDisplay.css +3 -0
- package/dist/src/components/Status/StatusDisplay.d.ts +23 -0
- package/dist/src/components/Status/StatusDisplay.d.ts.map +1 -0
- package/dist/src/components/Status/SystemUpdateStatus.d.ts +7 -0
- package/dist/src/components/Status/SystemUpdateStatus.d.ts.map +1 -0
- package/dist/src/components/Status/SystemdStatus.d.ts +6 -0
- package/dist/src/components/Status/SystemdStatus.d.ts.map +1 -0
- package/dist/src/components/Status/utils.d.ts +5 -0
- package/dist/src/components/Status/utils.d.ts.map +1 -0
- package/dist/src/components/Table/Table.d.ts +35 -0
- package/dist/src/components/Table/Table.d.ts.map +1 -0
- package/dist/src/components/Table/Table.js +3 -3
- package/dist/src/components/Table/Table.js.map +1 -1
- package/dist/src/components/Table/TableActions.d.ts +7 -0
- package/dist/src/components/Table/TableActions.d.ts.map +1 -0
- package/dist/src/components/Table/TableActions.js +3 -3
- package/dist/src/components/Table/TableActions.js.map +1 -1
- package/dist/src/components/Table/TableTextSearch.d.ts +9 -0
- package/dist/src/components/Table/TableTextSearch.d.ts.map +1 -0
- package/dist/src/components/Table/TableTextSearch.js +2 -4
- package/dist/src/components/Table/TableTextSearch.js.map +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts +15 -0
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts +7 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts +11 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts.map +1 -0
- package/dist/src/components/charts/DonutChart.css +5 -0
- package/dist/src/components/charts/DonutChart.d.ts +17 -0
- package/dist/src/components/charts/DonutChart.d.ts.map +1 -0
- package/dist/src/components/charts/DonutChart.js +1 -1
- package/dist/src/components/charts/DonutChart.js.map +1 -1
- package/dist/src/components/charts/utils.d.ts +15 -0
- package/dist/src/components/charts/utils.d.ts.map +1 -0
- package/dist/src/components/charts/utils.js +30 -0
- package/dist/src/components/charts/utils.js.map +1 -0
- package/dist/src/components/common/CopyButton.d.ts +10 -0
- package/dist/src/components/common/CopyButton.d.ts.map +1 -0
- package/dist/src/components/common/CopyButton.js +3 -3
- package/dist/src/components/common/CopyButton.js.map +1 -1
- package/dist/src/components/common/EditableLabelControl.d.ts +10 -0
- package/dist/src/components/common/EditableLabelControl.d.ts.map +1 -0
- package/dist/src/components/common/ErrorBoundary.d.ts +9 -0
- package/dist/src/components/common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/common/FlightCtlDescriptionList.d.ts +5 -0
- package/dist/src/components/common/FlightCtlDescriptionList.d.ts.map +1 -0
- package/dist/src/components/common/FlightCtlDescriptionList.js +13 -0
- package/dist/src/components/common/FlightCtlDescriptionList.js.map +1 -0
- package/dist/src/components/common/HelperTextItems.d.ts +3 -0
- package/dist/src/components/common/HelperTextItems.d.ts.map +1 -0
- package/dist/src/components/common/HelperTextItems.js +1 -9
- package/dist/src/components/common/HelperTextItems.js.map +1 -1
- package/dist/src/components/common/LabelsView.d.ts +10 -0
- package/dist/src/components/common/LabelsView.d.ts.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.d.ts +4 -0
- package/dist/src/components/common/LeaveFormConfirmation.d.ts.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.js +4 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/ResourceLink.d.ts +13 -0
- package/dist/src/components/common/ResourceLink.d.ts.map +1 -0
- package/dist/src/components/common/ResourceListEmptyState.d.ts +8 -0
- package/dist/src/components/common/ResourceListEmptyState.d.ts.map +1 -0
- package/dist/src/components/common/WithHelperText.d.ts +11 -0
- package/dist/src/components/common/WithHelperText.d.ts.map +1 -0
- package/dist/src/components/common/WithTooltip.d.ts +10 -0
- package/dist/src/components/common/WithTooltip.d.ts.map +1 -0
- package/dist/src/components/form/CheckboxField.d.ts +10 -0
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -0
- package/dist/src/components/{Device/EditDeviceWizard/steps/ConfigTemplateForm.css → form/ExpandableFormSection.css} +2 -2
- package/dist/src/components/form/ExpandableFormSection.d.ts +11 -0
- package/dist/src/components/form/ExpandableFormSection.d.ts.map +1 -0
- package/dist/src/components/form/ExpandableFormSection.js +30 -0
- package/dist/src/components/form/ExpandableFormSection.js.map +1 -0
- package/dist/src/components/form/FieldHelperText.d.ts +14 -0
- package/dist/src/components/form/FieldHelperText.d.ts.map +1 -0
- package/dist/src/components/form/FilterSelect.css +11 -1
- package/dist/src/components/form/FilterSelect.d.ts +16 -0
- package/dist/src/components/form/FilterSelect.d.ts.map +1 -0
- package/dist/src/components/form/FilterSelect.js +14 -9
- package/dist/src/components/form/FilterSelect.js.map +1 -1
- package/dist/src/components/form/FlightCtlActionGroup.d.ts +5 -0
- package/dist/src/components/form/FlightCtlActionGroup.d.ts.map +1 -0
- package/dist/src/components/form/FlightCtlForm.d.ts +6 -0
- package/dist/src/components/form/FlightCtlForm.d.ts.map +1 -0
- package/dist/src/components/form/FormSelect.css +8 -0
- package/dist/src/components/form/FormSelect.d.ts +16 -0
- package/dist/src/components/form/FormSelect.d.ts.map +1 -0
- package/dist/src/components/form/FormSelectTypeahead.d.ts +19 -0
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -0
- package/dist/src/components/form/FormSelectTypeahead.js +116 -0
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -0
- package/dist/src/components/form/LabelsField.d.ts +12 -0
- package/dist/src/components/form/LabelsField.d.ts.map +1 -0
- package/dist/src/components/form/NameField.d.ts +10 -0
- package/dist/src/components/form/NameField.d.ts.map +1 -0
- package/dist/src/components/form/RadioField.d.ts +12 -0
- package/dist/src/components/form/RadioField.d.ts.map +1 -0
- package/dist/src/components/form/RichValidationTextField.d.ts +13 -0
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -0
- package/dist/src/components/form/SwitchField.d.ts +9 -0
- package/dist/src/components/form/SwitchField.d.ts.map +1 -0
- package/dist/src/components/form/SwitchField.js +24 -0
- package/dist/src/components/form/SwitchField.js.map +1 -0
- package/dist/src/components/form/TextAreaField.d.ts +11 -0
- package/dist/src/components/form/TextAreaField.d.ts.map +1 -0
- package/dist/src/components/form/TextField.d.ts +10 -0
- package/dist/src/components/form/TextField.d.ts.map +1 -0
- package/dist/src/components/form/UploadField.d.ts +13 -0
- package/dist/src/components/form/UploadField.d.ts.map +1 -0
- package/dist/src/components/form/UploadField.js +74 -0
- package/dist/src/components/form/UploadField.js.map +1 -0
- package/dist/src/components/form/validations.d.ts +82 -0
- package/dist/src/components/form/validations.d.ts.map +1 -0
- package/dist/src/components/form/validations.js +54 -19
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.d.ts +16 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.d.ts.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts +6 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.d.ts +8 -0
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.d.ts.map +1 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts +11 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts +10 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts +9 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +1 -2
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts +11 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js +3 -41
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +22 -21
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts.map +1 -0
- package/dist/src/constants.d.ts +4 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/hooks/useApiTableSort.d.ts +8 -0
- package/dist/src/hooks/useApiTableSort.d.ts.map +1 -0
- package/dist/src/hooks/useApiTableSort.js +44 -0
- package/dist/src/hooks/useApiTableSort.js.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +70 -0
- package/dist/src/hooks/useAppContext.d.ts.map +1 -0
- package/dist/src/hooks/useDeviceLabelMatch.d.ts +9 -0
- package/dist/src/hooks/useDeviceLabelMatch.d.ts.map +1 -0
- package/dist/src/hooks/useDocumentTitle.d.ts +2 -0
- package/dist/src/hooks/useDocumentTitle.d.ts.map +1 -0
- package/dist/src/hooks/useFetch.d.ts +12 -0
- package/dist/src/hooks/useFetch.d.ts.map +1 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts +3 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts.map +1 -0
- package/dist/src/hooks/useNavigate.d.ts +38 -0
- package/dist/src/hooks/useNavigate.d.ts.map +1 -0
- package/dist/src/hooks/useNavigate.js +3 -3
- package/dist/src/hooks/useNavigate.js.map +1 -1
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.d.ts +2 -0
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.d.ts.map +1 -0
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.js +13 -0
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.js.map +1 -0
- package/dist/src/hooks/useTableSelect.d.ts +13 -0
- package/dist/src/hooks/useTableSelect.d.ts.map +1 -0
- package/dist/src/hooks/useTableSort.d.ts +7 -0
- package/dist/src/hooks/useTableSort.d.ts.map +1 -0
- package/dist/src/hooks/useTableTextSearch.d.ts +6 -0
- package/dist/src/hooks/useTableTextSearch.d.ts.map +1 -0
- package/dist/src/hooks/useTemplateVersion.d.ts +3 -0
- package/dist/src/hooks/useTemplateVersion.d.ts.map +1 -0
- package/dist/src/hooks/useThemePreferences.d.ts +8 -0
- package/dist/src/hooks/useThemePreferences.d.ts.map +1 -0
- package/dist/src/hooks/useTranslation.d.ts +2 -0
- package/dist/src/hooks/useTranslation.d.ts.map +1 -0
- package/dist/src/hooks/useUserPreferences.d.ts +2 -0
- package/dist/src/hooks/useUserPreferences.d.ts.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +8 -0
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -0
- package/dist/src/setupTests.d.ts +2 -0
- package/dist/src/setupTests.d.ts.map +1 -0
- package/dist/src/tests/test-utils.d.ts +7 -0
- package/dist/src/tests/test-utils.d.ts.map +1 -0
- package/dist/src/types/deviceSpec.d.ts +57 -0
- package/dist/src/types/deviceSpec.d.ts.map +1 -0
- package/dist/src/types/deviceSpec.js +41 -9
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +36 -0
- package/dist/src/types/extraTypes.d.ts.map +1 -0
- package/dist/src/types/extraTypes.js +1 -3
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/types/typeUtils.d.ts +3 -0
- package/dist/src/types/typeUtils.d.ts.map +1 -0
- package/dist/src/utils/api.d.ts +24 -0
- package/dist/src/utils/api.d.ts.map +1 -0
- package/dist/src/utils/dates.d.ts +5 -0
- package/dist/src/utils/dates.d.ts.map +1 -0
- package/dist/src/utils/devices.d.ts +4 -0
- package/dist/src/utils/devices.d.ts.map +1 -0
- package/dist/src/utils/devices.js +1 -27
- package/dist/src/utils/devices.js.map +1 -1
- package/dist/src/utils/error.d.ts +4 -0
- package/dist/src/utils/error.d.ts.map +1 -0
- package/dist/src/utils/labels.d.ts +11 -0
- package/dist/src/utils/labels.d.ts.map +1 -0
- package/dist/src/utils/labels.js +4 -14
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/metrics.d.ts +9 -0
- package/dist/src/utils/metrics.d.ts.map +1 -0
- package/dist/src/utils/patch.d.ts +15 -0
- package/dist/src/utils/patch.d.ts.map +1 -0
- package/dist/src/utils/patch.js +71 -1
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/query.d.ts +6 -0
- package/dist/src/utils/query.d.ts.map +1 -0
- package/dist/src/utils/query.js +32 -0
- package/dist/src/utils/query.js.map +1 -0
- package/dist/src/utils/resource.d.ts +6 -0
- package/dist/src/utils/resource.d.ts.map +1 -0
- package/dist/src/utils/search.d.ts +3 -0
- package/dist/src/utils/search.d.ts.map +1 -0
- package/dist/src/utils/search.js +15 -1
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/sort/generic.d.ts +5 -0
- package/dist/src/utils/sort/generic.d.ts.map +1 -0
- package/dist/src/utils/sort/generic.js +1 -25
- package/dist/src/utils/sort/generic.js.map +1 -1
- package/dist/src/utils/sort/repository.d.ts +6 -0
- package/dist/src/utils/sort/repository.d.ts.map +1 -0
- package/dist/src/utils/sort/repository.js +2 -2
- package/dist/src/utils/sort/repository.js.map +1 -1
- package/dist/src/utils/sort/resourceSync.d.ts +6 -0
- package/dist/src/utils/sort/resourceSync.d.ts.map +1 -0
- package/dist/src/utils/status/applications.d.ts +7 -0
- package/dist/src/utils/status/applications.d.ts.map +1 -0
- package/dist/src/utils/status/applications.js +19 -21
- package/dist/src/utils/status/applications.js.map +1 -1
- package/dist/src/utils/status/common.d.ts +12 -0
- package/dist/src/utils/status/common.d.ts.map +1 -0
- package/dist/src/utils/status/devices.d.ts +18 -0
- package/dist/src/utils/status/devices.d.ts.map +1 -0
- package/dist/src/utils/status/devices.js +10 -19
- package/dist/src/utils/status/devices.js.map +1 -1
- package/dist/src/utils/status/enrollmentRequest.d.ts +12 -0
- package/dist/src/utils/status/enrollmentRequest.d.ts.map +1 -0
- package/dist/src/utils/status/fleet.d.ts +15 -0
- package/dist/src/utils/status/fleet.d.ts.map +1 -0
- package/dist/src/utils/status/integrity.d.ts +5 -0
- package/dist/src/utils/status/integrity.d.ts.map +1 -0
- package/dist/src/utils/status/repository.d.ts +24 -0
- package/dist/src/utils/status/repository.d.ts.map +1 -0
- package/dist/src/utils/status/repository.js +9 -5
- package/dist/src/utils/status/repository.js.map +1 -1
- package/dist/src/utils/status/system.d.ts +6 -0
- package/dist/src/utils/status/system.d.ts.map +1 -0
- package/dist/src/utils/status/system.js +5 -5
- package/dist/src/utils/status/system.js.map +1 -1
- package/package.json +14 -6
- package/src/components/DetailsPage/DetailsNotFound.tsx +114 -0
- package/src/components/DetailsPage/DetailsPage.css +3 -0
- package/src/components/DetailsPage/DetailsPage.spec.tsx +128 -0
- package/src/components/DetailsPage/DetailsPage.tsx +99 -0
- package/src/components/DetailsPage/DetailsPageActions.tsx +73 -0
- package/src/components/DetailsPage/DetailsPageCard.css +8 -0
- package/src/components/DetailsPage/DetailsPageCard.tsx +12 -0
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +44 -0
- package/src/components/DetailsPage/Tables/ConditionsTable.tsx +40 -0
- package/src/components/DetailsPage/Tables/IntegrityDetails.tsx +44 -0
- package/src/components/DetailsPage/Tables/SystemdDetailsTable.tsx +63 -0
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +146 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +117 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.css +4 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +216 -0
- package/src/components/Device/DeviceDetails/DeviceFleet.css +3 -0
- package/src/components/Device/DeviceDetails/DeviceFleet.tsx +76 -0
- package/src/components/Device/DeviceDetails/DeviceOs.tsx +43 -0
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.css +3 -0
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.tsx +60 -0
- package/src/components/Device/DeviceDetails/SystemdTable.tsx +65 -0
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +53 -0
- package/src/components/Device/DevicesPage/DeviceFilterSelect.tsx +111 -0
- package/src/components/Device/DevicesPage/DeviceTableRow.tsx +95 -0
- package/src/components/Device/DevicesPage/DeviceTableToolbar.tsx +195 -0
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.css +16 -0
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +332 -0
- package/src/components/Device/DevicesPage/DevicesPage.tsx +279 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestList.tsx +158 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.tsx +35 -0
- package/src/components/Device/DevicesPage/types.ts +22 -0
- package/src/components/Device/DevicesPage/useDeviceBackendFilters.ts +130 -0
- package/src/components/Device/DevicesPage/useDevices.ts +123 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.css +4 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +150 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.tsx +52 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +66 -0
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +278 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.css +4 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.tsx +140 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +161 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx +50 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.tsx +174 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +229 -0
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +75 -0
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +61 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +35 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +83 -0
- package/src/components/Device/EditDeviceWizard/types.ts +19 -0
- package/src/components/Device/EditDeviceWizard/useEditDevice.ts +36 -0
- package/src/components/Device/EditDeviceWizard/utils.ts +79 -0
- package/src/components/Device/MatchPatternsModal/MatchPatternsForm.tsx +92 -0
- package/src/components/Device/MatchPatternsModal/MatchPatternsModal.tsx +62 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.css +3 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +226 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +69 -0
- package/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.css +10 -0
- package/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.tsx +27 -0
- package/src/components/ErrorAlert/ErrorAlert.tsx +15 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.css +3 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +152 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +56 -0
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +114 -0
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +55 -0
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +83 -0
- package/src/components/Fleet/CreateFleet/types.ts +8 -0
- package/src/components/Fleet/CreateFleet/useEditFleet.ts +35 -0
- package/src/components/Fleet/CreateFleet/utils.ts +160 -0
- package/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx +89 -0
- package/src/components/Fleet/FleetDetails/FleetDetails.tsx +97 -0
- package/src/components/Fleet/FleetDetails/FleetDetailsContent.tsx +97 -0
- package/src/components/Fleet/FleetDetails/FleetDevices.tsx +109 -0
- package/src/components/Fleet/FleetDetails/FleetDevicesLink.tsx +16 -0
- package/src/components/Fleet/FleetDetails/FleetOwnerLink.tsx +51 -0
- package/src/components/Fleet/FleetResourceSyncs.tsx +161 -0
- package/src/components/Fleet/FleetRow.tsx +86 -0
- package/src/components/Fleet/FleetStatus.tsx +37 -0
- package/src/components/Fleet/FleetsPage.tsx +215 -0
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.css +3 -0
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.tsx +216 -0
- package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +115 -0
- package/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.tsx +42 -0
- package/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.tsx +70 -0
- package/src/components/Fleet/ImportFleetWizard/types.ts +6 -0
- package/src/components/Fleet/useFleets.ts +86 -0
- package/src/components/ListPage/ListPage.tsx +22 -0
- package/src/components/ListPage/ListPageActions.tsx +68 -0
- package/src/components/ListPage/ListPageBody.tsx +34 -0
- package/src/components/ListPage/types.ts +13 -0
- package/src/components/NavItem/NavItem.tsx +42 -0
- package/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.tsx +39 -0
- package/src/components/OverviewPage/Cards/Status/DeviceStatusChart.tsx +38 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +116 -0
- package/src/components/OverviewPage/Cards/Status/StatusCardFilters.tsx +111 -0
- package/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.tsx +39 -0
- package/src/components/OverviewPage/Cards/Status/utils.ts +19 -0
- package/src/components/OverviewPage/Cards/ToDo/ToDoCard.tsx +68 -0
- package/src/components/OverviewPage/Overview.tsx +19 -0
- package/src/components/OverviewPage/OverviewPage.tsx +22 -0
- package/src/components/Repository/CreateRepository/CreateRepository.tsx +144 -0
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.css +7 -0
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +440 -0
- package/src/components/Repository/CreateRepository/CreateResourceSyncsForm.tsx +98 -0
- package/src/components/Repository/CreateRepository/types.ts +43 -0
- package/src/components/Repository/CreateRepository/utils.ts +539 -0
- package/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.tsx +156 -0
- package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +78 -0
- package/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsx +102 -0
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +28 -0
- package/src/components/Repository/RepositoryDetails/RepositorySource.tsx +96 -0
- package/src/components/Repository/RepositoryDetails/RepositorySourceList.tsx +79 -0
- package/src/components/Repository/RepositoryList.tsx +217 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.css +14 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +323 -0
- package/src/components/ResourceSync/ResourceSyncStatus.tsx +77 -0
- package/src/components/ResourceSync/ResourceSyncToRepository.tsx +73 -0
- package/src/components/Status/ApplicationStatus.tsx +25 -0
- package/src/components/Status/ApplicationSummaryStatus.tsx +24 -0
- package/src/components/Status/DeviceResourceStatus.tsx +112 -0
- package/src/components/Status/DeviceStatus.tsx +20 -0
- package/src/components/Status/EnrollmentRequestStatus.tsx +24 -0
- package/src/components/Status/IntegrityStatus.tsx +19 -0
- package/src/components/Status/RepositoryStatus.tsx +50 -0
- package/src/components/Status/StatusDisplay.css +12 -0
- package/src/components/Status/StatusDisplay.tsx +83 -0
- package/src/components/Status/SystemUpdateStatus.tsx +34 -0
- package/src/components/Status/SystemdStatus.tsx +22 -0
- package/src/components/Status/utils.ts +8 -0
- package/src/components/Table/Table.tsx +92 -0
- package/src/components/Table/TableActions.tsx +33 -0
- package/src/components/Table/TableTextSearch.tsx +23 -0
- package/src/components/Terminal/Terminal.css +1 -0
- package/src/components/Terminal/Terminal.tsx +100 -0
- package/src/components/UserPreferences/UserPreferencesModal.tsx +85 -0
- package/src/components/UserPreferences/UserPreferencesProvider.tsx +29 -0
- package/src/components/charts/DonutChart.css +15 -0
- package/src/components/charts/DonutChart.tsx +115 -0
- package/src/components/charts/utils.ts +38 -0
- package/src/components/common/CopyButton.tsx +36 -0
- package/src/components/common/EditableLabelControl.tsx +69 -0
- package/src/components/common/ErrorBoundary.tsx +53 -0
- package/src/components/common/FlightCtlDescriptionList.tsx +13 -0
- package/src/components/common/HelperTextItems.tsx +25 -0
- package/src/components/common/LabelsView.css +9 -0
- package/src/components/common/LabelsView.tsx +38 -0
- package/src/components/common/LeaveFormConfirmation.tsx +96 -0
- package/src/components/common/ResourceLink.css +29 -0
- package/src/components/common/ResourceLink.tsx +42 -0
- package/src/components/common/ResourceListEmptyState.tsx +19 -0
- package/src/components/common/WithHelperText.css +3 -0
- package/src/components/common/WithHelperText.tsx +34 -0
- package/src/components/common/WithTooltip.tsx +14 -0
- package/src/components/form/CheckboxField.tsx +39 -0
- package/src/components/form/ExpandableFormSection.css +3 -0
- package/src/components/form/ExpandableFormSection.tsx +59 -0
- package/src/components/form/FieldHelperText.tsx +45 -0
- package/src/components/form/FilterSelect.css +18 -0
- package/src/components/form/FilterSelect.tsx +92 -0
- package/src/components/form/FlightCtlActionGroup.css +9 -0
- package/src/components/form/FlightCtlActionGroup.tsx +11 -0
- package/src/components/form/FlightCtlForm.tsx +18 -0
- package/src/components/form/FormSelect.css +16 -0
- package/src/components/form/FormSelect.tsx +96 -0
- package/src/components/form/FormSelectTypeahead.tsx +212 -0
- package/src/components/form/LabelsField.tsx +116 -0
- package/src/components/form/NameField.tsx +73 -0
- package/src/components/form/RadioField.tsx +57 -0
- package/src/components/form/RichValidationTextField.tsx +142 -0
- package/src/components/form/SwitchField.tsx +32 -0
- package/src/components/form/TextAreaField.tsx +46 -0
- package/src/components/form/TextField.tsx +49 -0
- package/src/components/form/UploadField.tsx +133 -0
- package/src/components/form/validations.ts +386 -0
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx +74 -0
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +65 -0
- package/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.css +24 -0
- package/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.tsx +101 -0
- package/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsx +25 -0
- package/src/components/modals/DeleteModal/DeleteModal.tsx +68 -0
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +101 -0
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.css +4 -0
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.tsx +192 -0
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +117 -0
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +193 -0
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +174 -0
- package/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.tsx +116 -0
- package/src/constants.ts +4 -0
- package/src/hooks/useApiTableSort.ts +49 -0
- package/src/hooks/useAppContext.tsx +108 -0
- package/src/hooks/useDeviceLabelMatch.ts +101 -0
- package/src/hooks/useDocumentTitle.ts +12 -0
- package/src/hooks/useFetch.ts +10 -0
- package/src/hooks/useFetchPeriodically.ts +82 -0
- package/src/hooks/useNavigate.tsx +92 -0
- package/src/hooks/usePendingEnrollmentRequestsCount.ts +12 -0
- package/src/hooks/useTableSelect.ts +48 -0
- package/src/hooks/useTableSort.ts +42 -0
- package/src/hooks/useTableTextSearch.ts +23 -0
- package/src/hooks/useTemplateVersion.ts +23 -0
- package/src/hooks/useThemePreferences.ts +64 -0
- package/src/hooks/useTranslation.ts +8 -0
- package/src/hooks/useUserPreferences.ts +16 -0
- package/src/hooks/useWebSocket.ts +74 -0
- package/src/setupTests.ts +21 -0
- package/src/tests/test-utils.tsx +21 -0
- package/src/types/deviceSpec.ts +110 -0
- package/src/types/extraTypes.ts +52 -0
- package/src/types/typeUtils.ts +7 -0
- package/src/typings.d.ts +12 -0
- package/src/utils/api.ts +87 -0
- package/src/utils/dates.ts +60 -0
- package/src/utils/devices.ts +10 -0
- package/src/utils/error.ts +24 -0
- package/src/utils/labels.ts +40 -0
- package/src/utils/metrics.ts +49 -0
- package/src/utils/patch.ts +202 -0
- package/src/utils/query.ts +29 -0
- package/src/utils/resource.ts +4 -0
- package/src/utils/search.ts +25 -0
- package/src/utils/sort/generic.ts +8 -0
- package/src/utils/sort/repository.ts +28 -0
- package/src/utils/sort/resourceSync.ts +30 -0
- package/src/utils/status/applications.ts +58 -0
- package/src/utils/status/common.ts +71 -0
- package/src/utils/status/devices.ts +75 -0
- package/src/utils/status/enrollmentRequest.ts +49 -0
- package/src/utils/status/fleet.ts +47 -0
- package/src/utils/status/integrity.ts +26 -0
- package/src/utils/status/repository.ts +117 -0
- package/src/utils/status/system.ts +28 -0
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js +0 -87
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceList.js +0 -157
- package/dist/src/components/Device/DeviceList/DeviceList.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceTableRow.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceTableToolbar.js.map +0 -1
- package/dist/src/components/Device/DeviceList/types.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceBackendFilters.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceFilters.js +0 -16
- package/dist/src/components/Device/DeviceList/useDeviceFilters.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js +0 -98
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js +0 -29
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js.map +0 -1
- package/dist/src/components/Fleet/FleetList.js.map +0 -1
- package/dist/src/components/Fleet/ResourceSyncRow.js +0 -36
- package/dist/src/components/Fleet/ResourceSyncRow.js.map +0 -1
- package/dist/src/utils/sort/device.js +0 -89
- package/dist/src/utils/sort/device.js.map +0 -1
- package/dist/src/utils/sort/fleet.js +0 -20
- package/dist/src/utils/sort/fleet.js.map +0 -1
- /package/dist/src/components/Device/{DeviceList → DevicesPage}/types.js +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Badge } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
5
|
+
import { usePendingEnrollmentRequestsCount } from '../../hooks/usePendingEnrollmentRequestsCount';
|
|
6
|
+
import WithTooltip from '../common/WithTooltip';
|
|
7
|
+
|
|
8
|
+
import './PendingEnrollmentRequestsBadge.css';
|
|
9
|
+
|
|
10
|
+
const PendingEnrollmentRequestsBadge = () => {
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
const [count] = usePendingEnrollmentRequestsCount();
|
|
13
|
+
if (count === 0) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const text = t('{{ count }} devices pending approval', { count });
|
|
18
|
+
return (
|
|
19
|
+
<Badge className="fctl-pending-ers-badge pf-v5-u-ml-lg" screenReaderText={text}>
|
|
20
|
+
<WithTooltip showTooltip content={text}>
|
|
21
|
+
<span>{count}</span>
|
|
22
|
+
</WithTooltip>
|
|
23
|
+
</Badge>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default PendingEnrollmentRequestsBadge;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert } from '@patternfly/react-core';
|
|
3
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
4
|
+
import { getErrorMessage } from '../../utils/error';
|
|
5
|
+
|
|
6
|
+
const ErrorAlert = ({ error }: { error: unknown }) => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
return (
|
|
9
|
+
<Alert isInline variant="danger" title={t('Unexpected error occurred')}>
|
|
10
|
+
{getErrorMessage(error)}
|
|
11
|
+
</Alert>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default ErrorAlert;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
Breadcrumb,
|
|
4
|
+
BreadcrumbItem,
|
|
5
|
+
Bullseye,
|
|
6
|
+
PageSection,
|
|
7
|
+
PageSectionVariants,
|
|
8
|
+
Spinner,
|
|
9
|
+
Title,
|
|
10
|
+
Wizard,
|
|
11
|
+
WizardStep,
|
|
12
|
+
WizardStepType,
|
|
13
|
+
} from '@patternfly/react-core';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { Fleet } from '@flightctl/types';
|
|
16
|
+
import { Formik } from 'formik';
|
|
17
|
+
import { FleetFormValues } from './types';
|
|
18
|
+
import { useFetch } from '../../../hooks/useFetch';
|
|
19
|
+
import { getErrorMessage } from '../../../utils/error';
|
|
20
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
21
|
+
import { Link, ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
22
|
+
import GeneralInfoStep, { generalInfoStepId, isGeneralInfoStepValid } from './steps/GeneralInfoStep';
|
|
23
|
+
import DeviceTemplateStep, {
|
|
24
|
+
deviceTemplateStepId,
|
|
25
|
+
isDeviceTemplateStepValid,
|
|
26
|
+
} from '../../Device/EditDeviceWizard/steps/DeviceTemplateStep';
|
|
27
|
+
import ReviewStep, { reviewStepId } from './steps/ReviewStep';
|
|
28
|
+
import { getFleetPatches, getFleetResource, getInitialValues, getValidationSchema } from './utils';
|
|
29
|
+
import CreateFleetWizardFooter from './CreateFleetWizardFooter';
|
|
30
|
+
import { useEditFleet } from './useEditFleet';
|
|
31
|
+
import LeaveFormConfirmation from '../../common/LeaveFormConfirmation';
|
|
32
|
+
import ErrorBoundary from '../../common/ErrorBoundary';
|
|
33
|
+
|
|
34
|
+
import './CreateFleetWizard.css';
|
|
35
|
+
|
|
36
|
+
const CreateFleetWizard = () => {
|
|
37
|
+
const { t } = useTranslation();
|
|
38
|
+
const { post, patch } = useFetch();
|
|
39
|
+
const [error, setError] = React.useState<unknown>();
|
|
40
|
+
const navigate = useNavigate();
|
|
41
|
+
const [currentStep, setCurrentStep] = React.useState<WizardStepType>();
|
|
42
|
+
const [fleetId, fleet, loading, editError] = useEditFleet();
|
|
43
|
+
const isEdit = !!fleetId;
|
|
44
|
+
let body;
|
|
45
|
+
|
|
46
|
+
if (loading) {
|
|
47
|
+
body = (
|
|
48
|
+
<Bullseye>
|
|
49
|
+
<Spinner />
|
|
50
|
+
</Bullseye>
|
|
51
|
+
);
|
|
52
|
+
} else if (editError) {
|
|
53
|
+
body = (
|
|
54
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
55
|
+
{getErrorMessage(editError)}
|
|
56
|
+
</Alert>
|
|
57
|
+
);
|
|
58
|
+
} else if (!!fleet?.metadata.owner) {
|
|
59
|
+
body = (
|
|
60
|
+
<Alert isInline variant="info" title={t('Fleet is non-editable')}>
|
|
61
|
+
{t('This fleet is managed by a resource sync and it cannot be edited directly.')}
|
|
62
|
+
</Alert>
|
|
63
|
+
);
|
|
64
|
+
} else {
|
|
65
|
+
body = (
|
|
66
|
+
<Formik<FleetFormValues>
|
|
67
|
+
initialValues={getInitialValues(fleet)}
|
|
68
|
+
validationSchema={getValidationSchema(t)}
|
|
69
|
+
validateOnMount
|
|
70
|
+
onSubmit={async (values) => {
|
|
71
|
+
setError(undefined);
|
|
72
|
+
try {
|
|
73
|
+
if (isEdit) {
|
|
74
|
+
const fleetPatches = getFleetPatches(fleet as Fleet, values);
|
|
75
|
+
if (fleetPatches.length > 0) {
|
|
76
|
+
await patch<Fleet>(`fleets/${fleetId}`, fleetPatches);
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
await post<Fleet>('fleets', getFleetResource(values));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
navigate({ route: ROUTE.FLEET_DETAILS, postfix: values.name });
|
|
83
|
+
} catch (e) {
|
|
84
|
+
setError(e);
|
|
85
|
+
}
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
{({ errors: formikErrors }) => {
|
|
89
|
+
const generalStepValid = isGeneralInfoStepValid(formikErrors);
|
|
90
|
+
return (
|
|
91
|
+
<>
|
|
92
|
+
<LeaveFormConfirmation />
|
|
93
|
+
<Wizard
|
|
94
|
+
footer={<CreateFleetWizardFooter isEdit={isEdit} />}
|
|
95
|
+
onStepChange={(_, step) => setCurrentStep(step)}
|
|
96
|
+
className="fctl-create-fleet"
|
|
97
|
+
>
|
|
98
|
+
<WizardStep name={t('General info')} id={generalInfoStepId}>
|
|
99
|
+
{(!currentStep || currentStep?.id === generalInfoStepId) && <GeneralInfoStep isEdit={isEdit} />}
|
|
100
|
+
</WizardStep>
|
|
101
|
+
<WizardStep
|
|
102
|
+
name={t('Device template')}
|
|
103
|
+
id={deviceTemplateStepId}
|
|
104
|
+
isDisabled={(!currentStep || currentStep?.id === generalInfoStepId) && !generalStepValid}
|
|
105
|
+
>
|
|
106
|
+
{currentStep?.id === deviceTemplateStepId && <DeviceTemplateStep isFleet />}
|
|
107
|
+
</WizardStep>
|
|
108
|
+
<WizardStep
|
|
109
|
+
name={isEdit ? t('Review and update') : t('Review and create')}
|
|
110
|
+
id={reviewStepId}
|
|
111
|
+
isDisabled={!generalStepValid || !isDeviceTemplateStepValid(formikErrors)}
|
|
112
|
+
>
|
|
113
|
+
{currentStep?.id === reviewStepId && <ReviewStep error={error} />}
|
|
114
|
+
</WizardStep>
|
|
115
|
+
</Wizard>
|
|
116
|
+
</>
|
|
117
|
+
);
|
|
118
|
+
}}
|
|
119
|
+
</Formik>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const title = isEdit ? t('Edit fleet') : t('Create fleet');
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<>
|
|
127
|
+
<PageSection variant="light" type="breadcrumb">
|
|
128
|
+
<Breadcrumb>
|
|
129
|
+
<BreadcrumbItem>
|
|
130
|
+
<Link to={ROUTE.FLEETS}>{t('Fleets')}</Link>
|
|
131
|
+
</BreadcrumbItem>
|
|
132
|
+
{fleetId && (
|
|
133
|
+
<BreadcrumbItem>
|
|
134
|
+
<Link to={{ route: ROUTE.FLEET_DETAILS, postfix: fleetId }}>{fleetId}</Link>
|
|
135
|
+
</BreadcrumbItem>
|
|
136
|
+
)}
|
|
137
|
+
<BreadcrumbItem isActive>{title}</BreadcrumbItem>
|
|
138
|
+
</Breadcrumb>
|
|
139
|
+
</PageSection>
|
|
140
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
141
|
+
<Title headingLevel="h1" size="3xl">
|
|
142
|
+
{title}
|
|
143
|
+
</Title>
|
|
144
|
+
</PageSection>
|
|
145
|
+
<PageSection variant={PageSectionVariants.light} type="wizard">
|
|
146
|
+
<ErrorBoundary>{body}</ErrorBoundary>
|
|
147
|
+
</PageSection>
|
|
148
|
+
</>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export default CreateFleetWizard;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
3
|
+
import { Button, WizardFooterWrapper, useWizardContext } from '@patternfly/react-core';
|
|
4
|
+
import { useFormikContext } from 'formik';
|
|
5
|
+
import { FleetFormValues } from './types';
|
|
6
|
+
import { useNavigate } from '../../../hooks/useNavigate';
|
|
7
|
+
import { reviewStepId } from './steps/ReviewStep';
|
|
8
|
+
import { generalInfoStepId, isGeneralInfoStepValid } from './steps/GeneralInfoStep';
|
|
9
|
+
import {
|
|
10
|
+
deviceTemplateStepId,
|
|
11
|
+
isDeviceTemplateStepValid,
|
|
12
|
+
} from '../../Device/EditDeviceWizard/steps/DeviceTemplateStep';
|
|
13
|
+
|
|
14
|
+
type CreateFleetWizardFooterProps = {
|
|
15
|
+
isEdit: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const CreateFleetWizardFooter = ({ isEdit }: CreateFleetWizardFooterProps) => {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
const { goToNextStep, goToPrevStep, activeStep } = useWizardContext();
|
|
21
|
+
const { submitForm, isSubmitting, errors } = useFormikContext<FleetFormValues>();
|
|
22
|
+
const navigate = useNavigate();
|
|
23
|
+
|
|
24
|
+
const isReviewStep = activeStep.id === reviewStepId;
|
|
25
|
+
let isStepValid = true;
|
|
26
|
+
if (activeStep.id === generalInfoStepId) {
|
|
27
|
+
isStepValid = isGeneralInfoStepValid(errors);
|
|
28
|
+
} else if (activeStep.id === deviceTemplateStepId) {
|
|
29
|
+
isStepValid = isDeviceTemplateStepValid(errors);
|
|
30
|
+
}
|
|
31
|
+
const primaryBtn = isReviewStep ? (
|
|
32
|
+
<Button variant="primary" onClick={submitForm} isDisabled={isSubmitting} isLoading={isSubmitting}>
|
|
33
|
+
{isEdit ? t('Save') : t('Create fleet')}
|
|
34
|
+
</Button>
|
|
35
|
+
) : (
|
|
36
|
+
<Button variant="primary" onClick={goToNextStep} isDisabled={!isStepValid}>
|
|
37
|
+
{t('Next')}
|
|
38
|
+
</Button>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<WizardFooterWrapper>
|
|
43
|
+
{primaryBtn}
|
|
44
|
+
{activeStep.id !== generalInfoStepId && (
|
|
45
|
+
<Button variant="secondary" onClick={goToPrevStep} isDisabled={isSubmitting}>
|
|
46
|
+
{t('Back')}
|
|
47
|
+
</Button>
|
|
48
|
+
)}
|
|
49
|
+
<Button variant="link" onClick={() => navigate(-1)} isDisabled={isSubmitting}>
|
|
50
|
+
{t('Cancel')}
|
|
51
|
+
</Button>
|
|
52
|
+
</WizardFooterWrapper>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default CreateFleetWizardFooter;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useField } from 'formik';
|
|
3
|
+
import { Alert, Button, Spinner, Stack, StackItem } from '@patternfly/react-core';
|
|
4
|
+
import { RedoIcon } from '@patternfly/react-icons/dist/js/icons/redo-icon';
|
|
5
|
+
import debounce from 'lodash/debounce';
|
|
6
|
+
|
|
7
|
+
import { DeviceList } from '@flightctl/types';
|
|
8
|
+
import LabelsField from '../../../form/LabelsField';
|
|
9
|
+
import { getInvalidKubernetesLabels, hasUniqueLabelKeys } from '../../../form/validations';
|
|
10
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
11
|
+
import { useFetch } from '../../../../hooks/useFetch';
|
|
12
|
+
import { FlightCtlLabel } from '../../../../types/extraTypes';
|
|
13
|
+
import { getApiListCount } from '../../../../utils/api';
|
|
14
|
+
import { getErrorMessage } from '../../../../utils/error';
|
|
15
|
+
import { labelToString } from '../../../../utils/labels';
|
|
16
|
+
|
|
17
|
+
const validateLabels = (labels: FlightCtlLabel[]) =>
|
|
18
|
+
hasUniqueLabelKeys(labels) && getInvalidKubernetesLabels(labels).length === 0;
|
|
19
|
+
|
|
20
|
+
const DeviceLabelSelector = () => {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const { get } = useFetch();
|
|
23
|
+
const [{ value: labels }] = useField<FlightCtlLabel[]>('labels');
|
|
24
|
+
|
|
25
|
+
const [isLoading, setIsLoading] = React.useState<boolean>(false);
|
|
26
|
+
const [deviceCountError, setDeviceCountError] = React.useState<string>();
|
|
27
|
+
const [deviceCount, setDeviceCount] = React.useState<number>(0);
|
|
28
|
+
|
|
29
|
+
const updateDeviceCount = async (matchLabels: FlightCtlLabel[]) => {
|
|
30
|
+
const labelSelector = matchLabels.map(labelToString);
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
// TODO remove sortBy when https://issues.redhat.com/browse/EDM-624 is fixed. Otherwise the device count can be wrong.
|
|
34
|
+
const deviceListResp = await get<DeviceList>(
|
|
35
|
+
`devices?labelSelector=${labelSelector.join(',')}&limit=1&sortBy=metadata.name`,
|
|
36
|
+
);
|
|
37
|
+
const num = getApiListCount(deviceListResp);
|
|
38
|
+
setDeviceCount(num || 0);
|
|
39
|
+
} catch (e) {
|
|
40
|
+
setDeviceCountError(getErrorMessage(e));
|
|
41
|
+
} finally {
|
|
42
|
+
setIsLoading(false);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
+
const debouncedUpdateCount = React.useCallback(debounce(updateDeviceCount, 800), []);
|
|
48
|
+
|
|
49
|
+
const reloadDeviceSelection = React.useCallback(
|
|
50
|
+
(labels: FlightCtlLabel[]) => {
|
|
51
|
+
const hasLabels = labels.length > 0;
|
|
52
|
+
|
|
53
|
+
// The error field is not set on time, we manually validate the labels
|
|
54
|
+
// to make sure we only trigger requests when labels are valid
|
|
55
|
+
const validLabels = validateLabels(labels);
|
|
56
|
+
if (validLabels && hasLabels) {
|
|
57
|
+
setIsLoading(true);
|
|
58
|
+
setDeviceCountError(undefined);
|
|
59
|
+
void debouncedUpdateCount(labels);
|
|
60
|
+
} else if (!hasLabels) {
|
|
61
|
+
setDeviceCount(0);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
[debouncedUpdateCount],
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
React.useEffect(() => {
|
|
68
|
+
reloadDeviceSelection(labels);
|
|
69
|
+
}, [labels, reloadDeviceSelection]);
|
|
70
|
+
|
|
71
|
+
let message: React.ReactNode;
|
|
72
|
+
let showHelperText = true;
|
|
73
|
+
if (isLoading) {
|
|
74
|
+
message = <Spinner size="sm" />;
|
|
75
|
+
} else if (deviceCountError) {
|
|
76
|
+
showHelperText = false;
|
|
77
|
+
message = (
|
|
78
|
+
<Alert isInline variant="danger" title={t('Failed to determine the number of selected devices')}>
|
|
79
|
+
{deviceCountError}
|
|
80
|
+
<Button
|
|
81
|
+
variant="link"
|
|
82
|
+
icon={<RedoIcon />}
|
|
83
|
+
onClick={() => {
|
|
84
|
+
reloadDeviceSelection(labels);
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
{t('Try again')}
|
|
88
|
+
</Button>
|
|
89
|
+
</Alert>
|
|
90
|
+
);
|
|
91
|
+
} else if (labels.length > 0) {
|
|
92
|
+
showHelperText = false;
|
|
93
|
+
message = (
|
|
94
|
+
<Alert
|
|
95
|
+
isInline
|
|
96
|
+
variant={deviceCount === 0 ? 'warning' : 'info'}
|
|
97
|
+
title={t('{{ count }} devices matching the labels were selected.', { count: deviceCount })}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
} else {
|
|
101
|
+
message = t('Add labels to select devices to be included in this fleet.');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<Stack hasGutter>
|
|
106
|
+
<StackItem>
|
|
107
|
+
<LabelsField name="labels" helperText={showHelperText ? message : undefined} />
|
|
108
|
+
</StackItem>
|
|
109
|
+
{!showHelperText && message && <StackItem>{message}</StackItem>}
|
|
110
|
+
</Stack>
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default DeviceLabelSelector;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FormGroup, Grid } from '@patternfly/react-core';
|
|
3
|
+
import { FormikErrors } from 'formik';
|
|
4
|
+
|
|
5
|
+
import { FleetFormValues } from '../types';
|
|
6
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
7
|
+
import NameField from '../../../form/NameField';
|
|
8
|
+
import LabelsField from '../../../form/LabelsField';
|
|
9
|
+
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
10
|
+
import { getDnsSubdomainValidations } from '../../../form/validations';
|
|
11
|
+
import WithHelperText from '../../../common/WithHelperText';
|
|
12
|
+
import DeviceLabelSelector from './DeviceLabelSelector';
|
|
13
|
+
|
|
14
|
+
export const generalInfoStepId = 'general-info';
|
|
15
|
+
|
|
16
|
+
export const isGeneralInfoStepValid = (errors: FormikErrors<FleetFormValues>) => {
|
|
17
|
+
return !errors.name && !errors.labels && !errors.fleetLabels;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const GeneralInfoStep = ({ isEdit }: { isEdit: boolean }) => {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Grid lg={5} span={8}>
|
|
25
|
+
<FlightCtlForm>
|
|
26
|
+
<NameField
|
|
27
|
+
name="name"
|
|
28
|
+
aria-label={t('Name')}
|
|
29
|
+
isRequired
|
|
30
|
+
isDisabled={isEdit}
|
|
31
|
+
resourceType="fleets"
|
|
32
|
+
validations={getDnsSubdomainValidations(t)}
|
|
33
|
+
/>
|
|
34
|
+
<FormGroup label={t('Fleet labels')}>
|
|
35
|
+
<LabelsField name="fleetLabels" />
|
|
36
|
+
</FormGroup>
|
|
37
|
+
<FormGroup
|
|
38
|
+
label={
|
|
39
|
+
<WithHelperText
|
|
40
|
+
content={t(
|
|
41
|
+
'Devices matching these labels will be selected by the fleet. If left empty, no devices will be selected.',
|
|
42
|
+
)}
|
|
43
|
+
ariaLabel={t('Device selector')}
|
|
44
|
+
showLabel
|
|
45
|
+
/>
|
|
46
|
+
}
|
|
47
|
+
>
|
|
48
|
+
<DeviceLabelSelector />
|
|
49
|
+
</FormGroup>
|
|
50
|
+
</FlightCtlForm>
|
|
51
|
+
</Grid>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default GeneralInfoStep;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Alert,
|
|
4
|
+
DescriptionListDescription,
|
|
5
|
+
DescriptionListGroup,
|
|
6
|
+
DescriptionListTerm,
|
|
7
|
+
Stack,
|
|
8
|
+
StackItem,
|
|
9
|
+
} from '@patternfly/react-core';
|
|
10
|
+
import { useFormikContext } from 'formik';
|
|
11
|
+
|
|
12
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
13
|
+
import { FleetFormValues } from '../types';
|
|
14
|
+
import LabelsView from '../../../common/LabelsView';
|
|
15
|
+
import FlightControlDescriptionList from '../../../common/FlightCtlDescriptionList';
|
|
16
|
+
import { toAPILabel } from '../../../../utils/labels';
|
|
17
|
+
import RepositorySourceList from '../../../Repository/RepositoryDetails/RepositorySourceList';
|
|
18
|
+
import { getErrorMessage } from '../../../../utils/error';
|
|
19
|
+
import { getAPIConfig } from '../../../Device/EditDeviceWizard/deviceSpecUtils';
|
|
20
|
+
import ReviewApplications from '../../../Device/EditDeviceWizard/steps/ReviewApplications';
|
|
21
|
+
|
|
22
|
+
export const reviewStepId = 'review';
|
|
23
|
+
|
|
24
|
+
const ReviewStep = ({ error }: { error?: unknown }) => {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
const { values } = useFormikContext<FleetFormValues>();
|
|
27
|
+
return (
|
|
28
|
+
<Stack hasGutter>
|
|
29
|
+
<StackItem isFilled>
|
|
30
|
+
<FlightControlDescriptionList
|
|
31
|
+
isHorizontal
|
|
32
|
+
horizontalTermWidthModifier={{
|
|
33
|
+
default: '25ch',
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<DescriptionListGroup>
|
|
37
|
+
<DescriptionListTerm>{t('Name')}</DescriptionListTerm>
|
|
38
|
+
<DescriptionListDescription>{values.name}</DescriptionListDescription>
|
|
39
|
+
</DescriptionListGroup>
|
|
40
|
+
<DescriptionListGroup>
|
|
41
|
+
<DescriptionListTerm>{t('Fleet labels')}</DescriptionListTerm>
|
|
42
|
+
<DescriptionListDescription>
|
|
43
|
+
<LabelsView prefix="fleet" labels={toAPILabel(values.fleetLabels)} />
|
|
44
|
+
</DescriptionListDescription>
|
|
45
|
+
</DescriptionListGroup>
|
|
46
|
+
<DescriptionListGroup>
|
|
47
|
+
<DescriptionListTerm>{t('Device selector')}</DescriptionListTerm>
|
|
48
|
+
<DescriptionListDescription>
|
|
49
|
+
<LabelsView prefix="device" labels={toAPILabel(values.labels)} />
|
|
50
|
+
</DescriptionListDescription>
|
|
51
|
+
</DescriptionListGroup>
|
|
52
|
+
<DescriptionListGroup>
|
|
53
|
+
<DescriptionListTerm>{t('System image')}</DescriptionListTerm>
|
|
54
|
+
<DescriptionListDescription>
|
|
55
|
+
{values.osImage || t(`The fleet will not manage system image`)}
|
|
56
|
+
</DescriptionListDescription>
|
|
57
|
+
</DescriptionListGroup>
|
|
58
|
+
<DescriptionListGroup>
|
|
59
|
+
<DescriptionListTerm>{t('Configurations')}</DescriptionListTerm>
|
|
60
|
+
<DescriptionListDescription>
|
|
61
|
+
<RepositorySourceList configs={values.configTemplates.map(getAPIConfig)} />
|
|
62
|
+
</DescriptionListDescription>
|
|
63
|
+
</DescriptionListGroup>
|
|
64
|
+
<DescriptionListGroup>
|
|
65
|
+
<DescriptionListTerm>{t('Applications')}</DescriptionListTerm>
|
|
66
|
+
<DescriptionListDescription>
|
|
67
|
+
<ReviewApplications apps={values.applications} />
|
|
68
|
+
</DescriptionListDescription>
|
|
69
|
+
</DescriptionListGroup>
|
|
70
|
+
</FlightControlDescriptionList>
|
|
71
|
+
</StackItem>
|
|
72
|
+
{!!error && (
|
|
73
|
+
<StackItem>
|
|
74
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
75
|
+
{getErrorMessage(error)}
|
|
76
|
+
</Alert>
|
|
77
|
+
</StackItem>
|
|
78
|
+
)}
|
|
79
|
+
</Stack>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export default ReviewStep;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlightCtlLabel } from '../../../types/extraTypes';
|
|
2
|
+
import { DeviceSpecConfigFormValues } from '../../Device/EditDeviceWizard/types';
|
|
3
|
+
|
|
4
|
+
export type FleetFormValues = DeviceSpecConfigFormValues & {
|
|
5
|
+
name: string;
|
|
6
|
+
fleetLabels: FlightCtlLabel[];
|
|
7
|
+
labels: FlightCtlLabel[];
|
|
8
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useAppContext } from '../../../hooks/useAppContext';
|
|
3
|
+
import { useFetch } from '../../../hooks/useFetch';
|
|
4
|
+
import { Fleet } from '@flightctl/types';
|
|
5
|
+
|
|
6
|
+
export const useEditFleet = (): [string | undefined, Fleet | undefined, boolean, unknown] => {
|
|
7
|
+
const {
|
|
8
|
+
router: { useParams },
|
|
9
|
+
} = useAppContext();
|
|
10
|
+
const { fleetId } = useParams<{ fleetId: string }>();
|
|
11
|
+
|
|
12
|
+
const { get } = useFetch();
|
|
13
|
+
const [fleet, setFleet] = React.useState<Fleet>();
|
|
14
|
+
const [isLoading, setIsLoading] = React.useState<boolean>(!!fleetId);
|
|
15
|
+
const [error, setError] = React.useState<unknown>();
|
|
16
|
+
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
const fetch = async () => {
|
|
19
|
+
try {
|
|
20
|
+
const result = await get<Fleet>(`fleets/${fleetId}`);
|
|
21
|
+
setFleet(result);
|
|
22
|
+
} catch (err) {
|
|
23
|
+
setError(err);
|
|
24
|
+
} finally {
|
|
25
|
+
setIsLoading(false);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
if (fleetId && !fleet) {
|
|
30
|
+
fetch();
|
|
31
|
+
}
|
|
32
|
+
}, [fleetId, get, fleet]);
|
|
33
|
+
|
|
34
|
+
return [fleetId, fleet, isLoading, error];
|
|
35
|
+
};
|