@flightctl/ui-components 0.0.4 → 0.0.5
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 +4 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +10 -1
- 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 +5 -6
- 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 +127 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +22 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList/DeviceList.js → DevicesPage/DevicesPage.js} +20 -47
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts +13 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js +104 -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 +12 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceBackendFilters.js +1 -1
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts +8 -0
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceFilters.js +3 -3
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts +21 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js +83 -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/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 +18 -12
- 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} +28 -42
- 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/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 +11 -10
- 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 +2 -3
- 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/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/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/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 +3 -3
- 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 +72 -25
- 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 +25 -0
- package/dist/src/components/Table/Table.d.ts.map +1 -0
- 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.d.ts +17 -0
- package/dist/src/components/charts/DonutChart.d.ts.map +1 -0
- 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/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/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/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/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/device.d.ts +4 -0
- package/dist/src/utils/sort/device.d.ts.map +1 -0
- package/dist/src/utils/sort/device.js +3 -43
- package/dist/src/utils/sort/device.js.map +1 -1
- package/dist/src/utils/sort/fleet.d.ts +4 -0
- package/dist/src/utils/sort/fleet.d.ts.map +1 -0
- package/dist/src/utils/sort/fleet.js +6 -8
- package/dist/src/utils/sort/fleet.js.map +1 -1
- package/dist/src/utils/sort/generic.d.ts +8 -0
- package/dist/src/utils/sort/generic.d.ts.map +1 -0
- package/dist/src/utils/sort/generic.js +14 -11
- 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 +17 -0
- package/dist/src/utils/status/devices.d.ts.map +1 -0
- package/dist/src/utils/status/devices.js +9 -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 +10 -2
- 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 +305 -0
- package/src/components/Device/DevicesPage/DevicesPage.tsx +265 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestList.tsx +183 -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 +119 -0
- package/src/components/Device/DevicesPage/useDeviceFilters.ts +15 -0
- package/src/components/Device/DevicesPage/useDevices.ts +112 -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/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 +115 -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 +204 -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/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 +115 -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 +72 -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 +216 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.css +14 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +322 -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 +78 -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 +10 -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 +172 -0
- package/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.tsx +116 -0
- package/src/constants.ts +4 -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/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/resource.ts +4 -0
- package/src/utils/search.ts +25 -0
- package/src/utils/sort/device.ts +60 -0
- package/src/utils/sort/fleet.ts +16 -0
- package/src/utils/sort/generic.ts +37 -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 +74 -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.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.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/components/Device/{DeviceList → DevicesPage}/types.js +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
Breadcrumb,
|
|
4
|
+
BreadcrumbItem,
|
|
5
|
+
Bullseye,
|
|
6
|
+
Button,
|
|
7
|
+
PageSection,
|
|
8
|
+
PageSectionVariants,
|
|
9
|
+
Spinner,
|
|
10
|
+
Title,
|
|
11
|
+
Wizard,
|
|
12
|
+
WizardFooterWrapper,
|
|
13
|
+
WizardStep,
|
|
14
|
+
WizardStepType,
|
|
15
|
+
useWizardContext,
|
|
16
|
+
} from '@patternfly/react-core';
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
import * as Yup from 'yup';
|
|
19
|
+
import { TFunction } from 'i18next';
|
|
20
|
+
import { Formik, useFormikContext } from 'formik';
|
|
21
|
+
|
|
22
|
+
import RepositoryStep, { isRepoStepValid, repositoryStepId } from './steps/RepositoryStep';
|
|
23
|
+
import ReviewStep, { reviewStepId } from './steps/ReviewStep';
|
|
24
|
+
import ResourceSyncStep, { isResourceSyncStepValid, resourceSyncStepId } from './steps/ResourceSyncStep';
|
|
25
|
+
import { ImportFleetFormValues } from './types';
|
|
26
|
+
import { useFetch } from '../../../hooks/useFetch';
|
|
27
|
+
import { RepoSpecType, Repository, RepositoryList, ResourceSync } from '@flightctl/types';
|
|
28
|
+
import {
|
|
29
|
+
getInitValues,
|
|
30
|
+
getRepository,
|
|
31
|
+
getResourceSync,
|
|
32
|
+
handlePromises,
|
|
33
|
+
repoSyncSchema,
|
|
34
|
+
repositorySchema,
|
|
35
|
+
} from '../../Repository/CreateRepository/utils';
|
|
36
|
+
import { getErrorMessage } from '../../../utils/error';
|
|
37
|
+
|
|
38
|
+
import { useFetchPeriodically } from '../../../hooks/useFetchPeriodically';
|
|
39
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
40
|
+
import { Link, ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
41
|
+
import LeaveFormConfirmation from '../../common/LeaveFormConfirmation';
|
|
42
|
+
import ErrorBoundary from '../../common/ErrorBoundary';
|
|
43
|
+
|
|
44
|
+
import './ImportFleetWizard.css';
|
|
45
|
+
|
|
46
|
+
const validationSchema = (t: TFunction) =>
|
|
47
|
+
Yup.lazy((values: ImportFleetFormValues) =>
|
|
48
|
+
values.useExistingRepo
|
|
49
|
+
? Yup.object({
|
|
50
|
+
existingRepo: Yup.string().required(t('Repository is required')),
|
|
51
|
+
resourceSyncs: repoSyncSchema(t, values.resourceSyncs),
|
|
52
|
+
})
|
|
53
|
+
: repositorySchema(t, undefined)({ ...values, useResourceSyncs: true, exists: false }),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const ImportFleetWizardFooter = () => {
|
|
57
|
+
const { t } = useTranslation();
|
|
58
|
+
const { goToNextStep, goToPrevStep, activeStep } = useWizardContext();
|
|
59
|
+
const { submitForm, isSubmitting, errors, values } = useFormikContext<ImportFleetFormValues>();
|
|
60
|
+
const navigate = useNavigate();
|
|
61
|
+
|
|
62
|
+
const isReviewStep = activeStep.id === reviewStepId;
|
|
63
|
+
let isStepValid = true;
|
|
64
|
+
if (activeStep.id === repositoryStepId) {
|
|
65
|
+
isStepValid = isRepoStepValid(values, errors);
|
|
66
|
+
} else if (activeStep.id === resourceSyncStepId) {
|
|
67
|
+
isStepValid = isResourceSyncStepValid(errors);
|
|
68
|
+
}
|
|
69
|
+
const primaryBtn = isReviewStep ? (
|
|
70
|
+
<Button variant="primary" onClick={submitForm} isDisabled={isSubmitting} isLoading={isSubmitting}>
|
|
71
|
+
{t('Import')}
|
|
72
|
+
</Button>
|
|
73
|
+
) : (
|
|
74
|
+
<Button variant="primary" onClick={goToNextStep} isDisabled={!isStepValid}>
|
|
75
|
+
{t('Next')}
|
|
76
|
+
</Button>
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<WizardFooterWrapper>
|
|
81
|
+
{primaryBtn}
|
|
82
|
+
{activeStep.id !== repositoryStepId && (
|
|
83
|
+
<Button variant="secondary" onClick={goToPrevStep} isDisabled={isSubmitting}>
|
|
84
|
+
{t('Back')}
|
|
85
|
+
</Button>
|
|
86
|
+
)}
|
|
87
|
+
<Button variant="link" onClick={() => navigate(-1)} isDisabled={isSubmitting}>
|
|
88
|
+
{t('Cancel')}
|
|
89
|
+
</Button>
|
|
90
|
+
</WizardFooterWrapper>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const ImportFleetWizard = () => {
|
|
95
|
+
const { t } = useTranslation();
|
|
96
|
+
const { post } = useFetch();
|
|
97
|
+
const [errors, setErrors] = React.useState<string[]>();
|
|
98
|
+
const navigate = useNavigate();
|
|
99
|
+
const [currentStep, setCurrentStep] = React.useState<WizardStepType>();
|
|
100
|
+
const [repoList, isLoading, error] = useFetchPeriodically<RepositoryList>({ endpoint: 'repositories' });
|
|
101
|
+
|
|
102
|
+
const gitRepositories = (repoList?.items || []).filter((repo) => repo.spec.type === RepoSpecType.GIT);
|
|
103
|
+
|
|
104
|
+
let body;
|
|
105
|
+
|
|
106
|
+
if (isLoading) {
|
|
107
|
+
body = (
|
|
108
|
+
<Bullseye>
|
|
109
|
+
<Spinner />
|
|
110
|
+
</Bullseye>
|
|
111
|
+
);
|
|
112
|
+
} else if (error) {
|
|
113
|
+
body = (
|
|
114
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
115
|
+
{getErrorMessage(error)}
|
|
116
|
+
</Alert>
|
|
117
|
+
);
|
|
118
|
+
} else {
|
|
119
|
+
const repoInitValues = getInitValues({
|
|
120
|
+
options: {
|
|
121
|
+
allowedRepoTypes: [RepoSpecType.GIT],
|
|
122
|
+
showRepoTypes: false,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
body = (
|
|
126
|
+
<Formik<ImportFleetFormValues>
|
|
127
|
+
initialValues={{
|
|
128
|
+
useExistingRepo: true,
|
|
129
|
+
existingRepo: '',
|
|
130
|
+
...repoInitValues,
|
|
131
|
+
}}
|
|
132
|
+
validationSchema={validationSchema(t)}
|
|
133
|
+
validateOnMount
|
|
134
|
+
onSubmit={async (values) => {
|
|
135
|
+
setErrors(undefined);
|
|
136
|
+
if (!values.useExistingRepo) {
|
|
137
|
+
try {
|
|
138
|
+
await post<Repository>('repositories', getRepository(values));
|
|
139
|
+
} catch (e) {
|
|
140
|
+
setErrors([getErrorMessage(e)]);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const resourceSyncPromises = values.resourceSyncs.map((rs) =>
|
|
145
|
+
post<ResourceSync>(
|
|
146
|
+
'resourcesyncs',
|
|
147
|
+
getResourceSync(values.useExistingRepo ? values.existingRepo : values.name, rs),
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
const errors = await handlePromises(resourceSyncPromises);
|
|
151
|
+
if (errors.length) {
|
|
152
|
+
setErrors(errors);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
navigate(ROUTE.FLEETS);
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
{({ values, errors: formikErrors }) => (
|
|
159
|
+
<>
|
|
160
|
+
<LeaveFormConfirmation />
|
|
161
|
+
<Wizard
|
|
162
|
+
footer={<ImportFleetWizardFooter />}
|
|
163
|
+
onStepChange={(_, step) => setCurrentStep(step)}
|
|
164
|
+
className="fctl-import-fleet"
|
|
165
|
+
>
|
|
166
|
+
<WizardStep name={t('Select or create repository')} id={repositoryStepId}>
|
|
167
|
+
{(!currentStep || currentStep?.id === repositoryStepId) && (
|
|
168
|
+
<RepositoryStep repositories={gitRepositories} hasLoaded={!!repoList} />
|
|
169
|
+
)}
|
|
170
|
+
</WizardStep>
|
|
171
|
+
<WizardStep
|
|
172
|
+
name={t('Add resource sync')}
|
|
173
|
+
id={resourceSyncStepId}
|
|
174
|
+
isDisabled={
|
|
175
|
+
(!currentStep || currentStep?.id === repositoryStepId) && !isRepoStepValid(values, formikErrors)
|
|
176
|
+
}
|
|
177
|
+
>
|
|
178
|
+
{currentStep?.id === resourceSyncStepId && <ResourceSyncStep />}
|
|
179
|
+
</WizardStep>
|
|
180
|
+
<WizardStep
|
|
181
|
+
name={t('Review')}
|
|
182
|
+
id={reviewStepId}
|
|
183
|
+
isDisabled={!isRepoStepValid(values, formikErrors) || !isResourceSyncStepValid(formikErrors)}
|
|
184
|
+
>
|
|
185
|
+
{currentStep?.id === reviewStepId && <ReviewStep errors={errors} />}
|
|
186
|
+
</WizardStep>
|
|
187
|
+
</Wizard>
|
|
188
|
+
</>
|
|
189
|
+
)}
|
|
190
|
+
</Formik>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<>
|
|
196
|
+
<PageSection variant="light" type="breadcrumb">
|
|
197
|
+
<Breadcrumb>
|
|
198
|
+
<BreadcrumbItem>
|
|
199
|
+
<Link to={ROUTE.FLEETS}>{t('Fleets')}</Link>
|
|
200
|
+
</BreadcrumbItem>
|
|
201
|
+
<BreadcrumbItem isActive>{t('Import fleets')}</BreadcrumbItem>
|
|
202
|
+
</Breadcrumb>
|
|
203
|
+
</PageSection>
|
|
204
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
205
|
+
<Title headingLevel="h1" size="3xl">
|
|
206
|
+
{t('Import fleets')}
|
|
207
|
+
</Title>
|
|
208
|
+
</PageSection>
|
|
209
|
+
<PageSection variant={PageSectionVariants.light} type="wizard">
|
|
210
|
+
<ErrorBoundary>{body}</ErrorBoundary>
|
|
211
|
+
</PageSection>
|
|
212
|
+
</>
|
|
213
|
+
);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export default ImportFleetWizard;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FormGroup, FormSection, Grid, Radio } from '@patternfly/react-core';
|
|
3
|
+
import { FormikErrors, useFormikContext } from 'formik';
|
|
4
|
+
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
5
|
+
|
|
6
|
+
import { Repository } from '@flightctl/types';
|
|
7
|
+
import { ImportFleetFormValues } from '../types';
|
|
8
|
+
|
|
9
|
+
import { RepositoryForm } from '../../../Repository/CreateRepository/CreateRepositoryForm';
|
|
10
|
+
import RepositoryStatus from '../../../Status/RepositoryStatus';
|
|
11
|
+
import { getLastTransitionTimeText, getRepositorySyncStatus } from '../../../../utils/status/repository';
|
|
12
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
13
|
+
import FormSelect from '../../../form/FormSelect';
|
|
14
|
+
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
15
|
+
|
|
16
|
+
export const repositoryStepId = 'repository';
|
|
17
|
+
|
|
18
|
+
export const isRepoStepValid = (values: ImportFleetFormValues, errors: FormikErrors<ImportFleetFormValues>) => {
|
|
19
|
+
if (values.useExistingRepo) {
|
|
20
|
+
return !errors.existingRepo;
|
|
21
|
+
}
|
|
22
|
+
return (
|
|
23
|
+
!errors.name &&
|
|
24
|
+
!errors.url &&
|
|
25
|
+
!errors.configType &&
|
|
26
|
+
!errors.httpConfig &&
|
|
27
|
+
!errors.sshConfig &&
|
|
28
|
+
!errors.useAdvancedConfig
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const ExistingRepoForm = ({ repositories }: { repositories: Repository[] }) => {
|
|
33
|
+
const { t } = useTranslation();
|
|
34
|
+
const { values } = useFormikContext<ImportFleetFormValues>();
|
|
35
|
+
|
|
36
|
+
const currentRepo = repositories.find((r) => r.metadata.name === values.existingRepo);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<>
|
|
40
|
+
<FormGroup label={t('Repository')} fieldId="repository">
|
|
41
|
+
<FormSelect
|
|
42
|
+
name="existingRepo"
|
|
43
|
+
items={repositories.reduce((acc, curr) => {
|
|
44
|
+
acc[curr.metadata.name || ''] = curr.metadata.name || '';
|
|
45
|
+
return acc;
|
|
46
|
+
}, {})}
|
|
47
|
+
placeholderText={t('Select a repository')}
|
|
48
|
+
/>
|
|
49
|
+
</FormGroup>
|
|
50
|
+
{currentRepo && (
|
|
51
|
+
<Table>
|
|
52
|
+
<Thead>
|
|
53
|
+
<Tr>
|
|
54
|
+
<Th>{t('URL')}</Th>
|
|
55
|
+
<Th>{t('Sync status')}</Th>
|
|
56
|
+
<Th>{t('Last transition')}</Th>
|
|
57
|
+
</Tr>
|
|
58
|
+
</Thead>
|
|
59
|
+
<Tbody>
|
|
60
|
+
<Tr>
|
|
61
|
+
<Td dataLabel={t('URL')}>{currentRepo.spec.url}</Td>
|
|
62
|
+
<Td dataLabel={t('Sync status')}>
|
|
63
|
+
<RepositoryStatus statusInfo={getRepositorySyncStatus(currentRepo)} />
|
|
64
|
+
</Td>
|
|
65
|
+
<Td dataLabel={t('Last transition')}>{getLastTransitionTimeText(currentRepo, t).text}</Td>
|
|
66
|
+
</Tr>
|
|
67
|
+
</Tbody>
|
|
68
|
+
</Table>
|
|
69
|
+
)}
|
|
70
|
+
</>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const RepositoryStep = ({ repositories, hasLoaded }: { repositories: Repository[]; hasLoaded: boolean }) => {
|
|
75
|
+
const { t } = useTranslation();
|
|
76
|
+
const { values, setFieldValue } = useFormikContext<ImportFleetFormValues>();
|
|
77
|
+
|
|
78
|
+
const noRepositoriesExist = hasLoaded && repositories.length === 0;
|
|
79
|
+
React.useEffect(() => {
|
|
80
|
+
if (values.useExistingRepo && noRepositoriesExist) {
|
|
81
|
+
void setFieldValue('useExistingRepo', false);
|
|
82
|
+
}
|
|
83
|
+
}, [setFieldValue, values.useExistingRepo, noRepositoriesExist]);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<FlightCtlForm>
|
|
87
|
+
<Grid span={8}>
|
|
88
|
+
<FormSection>
|
|
89
|
+
<FormGroup isInline>
|
|
90
|
+
<Radio
|
|
91
|
+
isChecked={values.useExistingRepo}
|
|
92
|
+
onChange={() => setFieldValue('useExistingRepo', true, true)}
|
|
93
|
+
id="existing-repo"
|
|
94
|
+
name="repo"
|
|
95
|
+
label={t('Use an existing Git repository')}
|
|
96
|
+
isDisabled={noRepositoriesExist}
|
|
97
|
+
/>
|
|
98
|
+
<Radio
|
|
99
|
+
isChecked={!values.useExistingRepo}
|
|
100
|
+
onChange={() => setFieldValue('useExistingRepo', false, true)}
|
|
101
|
+
id="new-repo"
|
|
102
|
+
name="repo"
|
|
103
|
+
label={t('Use a new Git repository')}
|
|
104
|
+
/>
|
|
105
|
+
</FormGroup>
|
|
106
|
+
</FormSection>
|
|
107
|
+
<FormSection>
|
|
108
|
+
{values.useExistingRepo ? <ExistingRepoForm repositories={repositories} /> : <RepositoryForm />}
|
|
109
|
+
</FormSection>
|
|
110
|
+
</Grid>
|
|
111
|
+
</FlightCtlForm>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export default RepositoryStep;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Grid, Stack, StackItem, Text, TextContent } from '@patternfly/react-core';
|
|
3
|
+
import { FormikErrors } from 'formik';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
6
|
+
import FlightControlForm from '../../../form/FlightCtlForm';
|
|
7
|
+
import CreateResourceSyncsForm from '../../../Repository/CreateRepository/CreateResourceSyncsForm';
|
|
8
|
+
import { ImportFleetFormValues } from '../types';
|
|
9
|
+
|
|
10
|
+
export const resourceSyncStepId = 'resource-sync';
|
|
11
|
+
export const isResourceSyncStepValid = (errors: FormikErrors<ImportFleetFormValues>) => {
|
|
12
|
+
if (Array.isArray(errors.resourceSyncs)) {
|
|
13
|
+
return !errors.resourceSyncs?.some((e) => !!e);
|
|
14
|
+
}
|
|
15
|
+
return !errors.resourceSyncs;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const ResourceSyncStep = () => {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
return (
|
|
21
|
+
<Stack hasGutter>
|
|
22
|
+
<StackItem>
|
|
23
|
+
<TextContent>
|
|
24
|
+
<Text>
|
|
25
|
+
{t(
|
|
26
|
+
"A resource sync is an automated Gitops way to manage imported fleets. The resource sync monitors changes made to the source repository and update the fleet's configurations accordingly.",
|
|
27
|
+
)}
|
|
28
|
+
</Text>
|
|
29
|
+
</TextContent>
|
|
30
|
+
</StackItem>
|
|
31
|
+
<StackItem>
|
|
32
|
+
<FlightControlForm>
|
|
33
|
+
<Grid span={8}>
|
|
34
|
+
<CreateResourceSyncsForm />
|
|
35
|
+
</Grid>
|
|
36
|
+
</FlightControlForm>
|
|
37
|
+
</StackItem>
|
|
38
|
+
</Stack>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default ResourceSyncStep;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert, FormGroup, Stack, StackItem, TextInput } from '@patternfly/react-core';
|
|
3
|
+
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
4
|
+
import { useFormikContext } from 'formik';
|
|
5
|
+
|
|
6
|
+
import { ImportFleetFormValues } from '../types';
|
|
7
|
+
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
8
|
+
|
|
9
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
10
|
+
|
|
11
|
+
export const reviewStepId = 'review';
|
|
12
|
+
|
|
13
|
+
const ReviewStep = ({ errors }: { errors?: string[] }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const { values } = useFormikContext<ImportFleetFormValues>();
|
|
16
|
+
return (
|
|
17
|
+
<Stack hasGutter>
|
|
18
|
+
<StackItem isFilled>
|
|
19
|
+
<FlightCtlForm>
|
|
20
|
+
<FormGroup label={t('Repository')}>
|
|
21
|
+
<TextInput
|
|
22
|
+
value={values.useExistingRepo ? values.existingRepo : values.name}
|
|
23
|
+
type="text"
|
|
24
|
+
aria-label={t('disabled repository input')}
|
|
25
|
+
isDisabled
|
|
26
|
+
/>
|
|
27
|
+
</FormGroup>
|
|
28
|
+
<FormGroup label={t('Resource syncs')}>
|
|
29
|
+
<Table>
|
|
30
|
+
<Thead>
|
|
31
|
+
<Tr>
|
|
32
|
+
<Th>{t('Name')}</Th>
|
|
33
|
+
<Th>{t('Path')}</Th>
|
|
34
|
+
<Th>{t('Target revision')}</Th>
|
|
35
|
+
</Tr>
|
|
36
|
+
</Thead>
|
|
37
|
+
<Tbody>
|
|
38
|
+
{values.resourceSyncs.map((rs) => (
|
|
39
|
+
<Tr key={rs.name}>
|
|
40
|
+
<Td>{rs.name}</Td>
|
|
41
|
+
<Td>{rs.path}</Td>
|
|
42
|
+
<Td>{rs.targetRevision}</Td>
|
|
43
|
+
</Tr>
|
|
44
|
+
))}
|
|
45
|
+
</Tbody>
|
|
46
|
+
</Table>
|
|
47
|
+
</FormGroup>
|
|
48
|
+
</FlightCtlForm>
|
|
49
|
+
</StackItem>
|
|
50
|
+
<StackItem>
|
|
51
|
+
<Alert
|
|
52
|
+
isInline
|
|
53
|
+
variant="info"
|
|
54
|
+
title={t(
|
|
55
|
+
'Fleets will appear in the fleets table list and their status will be reflecting the resource sync process status. After a few minutes, they should be synced and enabled.',
|
|
56
|
+
)}
|
|
57
|
+
/>
|
|
58
|
+
</StackItem>
|
|
59
|
+
{errors?.length && (
|
|
60
|
+
<StackItem>
|
|
61
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
62
|
+
{errors?.map((e, index) => <div key={index}>{e}</div>)}
|
|
63
|
+
</Alert>
|
|
64
|
+
</StackItem>
|
|
65
|
+
)}
|
|
66
|
+
</Stack>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default ReviewStep;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { PageSection, PageSectionVariants, Title, TitleProps } from '@patternfly/react-core';
|
|
4
|
+
|
|
5
|
+
type ListPageProps = {
|
|
6
|
+
title: string;
|
|
7
|
+
headingLevel?: TitleProps['headingLevel'];
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const ListPage: React.FC<ListPageProps> = ({ title, headingLevel = 'h1', children }) => {
|
|
12
|
+
return (
|
|
13
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
14
|
+
<Title headingLevel={headingLevel} size="3xl">
|
|
15
|
+
{title}
|
|
16
|
+
</Title>
|
|
17
|
+
{children}
|
|
18
|
+
</PageSection>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default ListPage;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import DeleteModal from '../modals/DeleteModal/DeleteModal';
|
|
3
|
+
import { IAction } from '@patternfly/react-table';
|
|
4
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
5
|
+
import { TFunction } from 'react-i18next';
|
|
6
|
+
|
|
7
|
+
export type DeleteListActionResult = {
|
|
8
|
+
deleteAction: (params: { resourceId: string; resourceName?: string; disabledReason?: string | boolean }) => IAction;
|
|
9
|
+
deleteModal: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type ResourceType = 'Device' | 'EnrollmentRequest' | 'ResourceSync';
|
|
13
|
+
|
|
14
|
+
type DeleteListActionProps = {
|
|
15
|
+
onDelete: (resourceId: string) => Promise<unknown>;
|
|
16
|
+
resourceType: 'Device' | 'EnrollmentRequest' | 'ResourceSync';
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const getResourceTypeLabel = (t: TFunction, resourceType: ResourceType) => {
|
|
20
|
+
switch (resourceType) {
|
|
21
|
+
case 'Device':
|
|
22
|
+
return t('device');
|
|
23
|
+
case 'EnrollmentRequest':
|
|
24
|
+
return t('pending device');
|
|
25
|
+
case 'ResourceSync':
|
|
26
|
+
return t('resource sync');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const useDeleteListAction = ({ resourceType, onDelete }: DeleteListActionProps): DeleteListActionResult => {
|
|
31
|
+
const { t } = useTranslation();
|
|
32
|
+
const [deleteResourceId, setDeleteResourceId] = React.useState<string>();
|
|
33
|
+
const [name, setName] = React.useState<string>();
|
|
34
|
+
|
|
35
|
+
const resourceTypeLabel = getResourceTypeLabel(t, resourceType);
|
|
36
|
+
|
|
37
|
+
const deleteAction: DeleteListActionResult['deleteAction'] = ({ resourceId, resourceName, disabledReason }) => {
|
|
38
|
+
const popperProps = disabledReason ? { tooltipProps: { content: disabledReason } } : undefined;
|
|
39
|
+
return {
|
|
40
|
+
title: t('Delete {{ resourceType }}', { resourceType: resourceTypeLabel }),
|
|
41
|
+
isAriaDisabled: !!disabledReason,
|
|
42
|
+
...popperProps,
|
|
43
|
+
onClick: () => {
|
|
44
|
+
setDeleteResourceId(resourceId);
|
|
45
|
+
setName(resourceName);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const onClose = () => {
|
|
51
|
+
setDeleteResourceId(undefined);
|
|
52
|
+
setName(undefined);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const deleteModal = deleteResourceId && (
|
|
56
|
+
<DeleteModal
|
|
57
|
+
resourceType={resourceTypeLabel}
|
|
58
|
+
resourceName={name || deleteResourceId}
|
|
59
|
+
onClose={onClose}
|
|
60
|
+
onDelete={async () => {
|
|
61
|
+
await onDelete(deleteResourceId);
|
|
62
|
+
onClose();
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return { deleteAction, deleteModal };
|
|
68
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert, Bullseye, Spinner } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
import { getErrorMessage } from '../../utils/error';
|
|
5
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
6
|
+
import ErrorBoundary from '../common/ErrorBoundary';
|
|
7
|
+
|
|
8
|
+
type ListPageBodyProps = {
|
|
9
|
+
error: unknown;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const ListPageBody: React.FC<ListPageBodyProps> = ({ error, loading, children }) => {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
if (error) {
|
|
17
|
+
return (
|
|
18
|
+
<Alert variant="danger" title={t('An error occurred')} isInline>
|
|
19
|
+
{getErrorMessage(error)}
|
|
20
|
+
</Alert>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (loading) {
|
|
25
|
+
return (
|
|
26
|
+
<Bullseye>
|
|
27
|
+
<Spinner />
|
|
28
|
+
</Bullseye>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return <ErrorBoundary>{children}</ErrorBoundary>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default ListPageBody;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAction } from '@patternfly/react-table';
|
|
2
|
+
|
|
3
|
+
export type DeleteListActionResult = {
|
|
4
|
+
deleteAction: (params: { resourceId: string; resourceName?: string; disabledReason?: string }) => IAction;
|
|
5
|
+
deleteModal: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type DeleteListActionProps = {
|
|
9
|
+
onDelete: (resourceId: string) => Promise<unknown>;
|
|
10
|
+
resourceType: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type DeleteListActionHook = (args: DeleteListActionProps) => DeleteListActionResult;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { NavItem as PFNavItem } from '@patternfly/react-core';
|
|
4
|
+
import { useAppContext } from '../../hooks/useAppContext';
|
|
5
|
+
|
|
6
|
+
type ActiveChildrenProps = {
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
setIsActive: (isActive: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const ActiveChildren: React.FC<ActiveChildrenProps> = ({ isActive, children, setIsActive }) => {
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
setIsActive(isActive);
|
|
15
|
+
}, [isActive, setIsActive]);
|
|
16
|
+
return children;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type NavItemProps = {
|
|
20
|
+
to: string;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const NavItem: React.FC<NavItemProps> = ({ to, children }) => {
|
|
25
|
+
const {
|
|
26
|
+
router: { NavLink },
|
|
27
|
+
} = useAppContext();
|
|
28
|
+
const [isActive, setIsActive] = React.useState(false);
|
|
29
|
+
return (
|
|
30
|
+
<PFNavItem id={to} isActive={isActive}>
|
|
31
|
+
<NavLink to={to}>
|
|
32
|
+
{({ isActive }) => (
|
|
33
|
+
<ActiveChildren setIsActive={setIsActive} isActive={isActive}>
|
|
34
|
+
{children}
|
|
35
|
+
</ActiveChildren>
|
|
36
|
+
)}
|
|
37
|
+
</NavLink>
|
|
38
|
+
</PFNavItem>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default NavItem;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { ApplicationsSummaryStatusType } from '@flightctl/types';
|
|
4
|
+
import { FlightCtlLabel } from '../../../../types/extraTypes';
|
|
5
|
+
|
|
6
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
7
|
+
import { getApplicationStatusHelperText } from '../../../Status/utils';
|
|
8
|
+
import { getApplicationSummaryStatusItems } from '../../../../utils/status/applications';
|
|
9
|
+
import { FilterSearchParams } from '../../../../utils/status/devices';
|
|
10
|
+
import { toOverviewChartData } from './utils';
|
|
11
|
+
import DonutChart from '../../../charts/DonutChart';
|
|
12
|
+
|
|
13
|
+
const ApplicationStatusChart = ({
|
|
14
|
+
applicationStatus,
|
|
15
|
+
labels,
|
|
16
|
+
fleets,
|
|
17
|
+
}: {
|
|
18
|
+
applicationStatus: Record<string, number>;
|
|
19
|
+
labels: FlightCtlLabel[];
|
|
20
|
+
fleets: string[];
|
|
21
|
+
}) => {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
|
|
24
|
+
const statusItems = getApplicationSummaryStatusItems(t);
|
|
25
|
+
|
|
26
|
+
const appStatusData = toOverviewChartData<ApplicationsSummaryStatusType>(
|
|
27
|
+
applicationStatus,
|
|
28
|
+
statusItems,
|
|
29
|
+
labels,
|
|
30
|
+
fleets,
|
|
31
|
+
FilterSearchParams.AppStatus,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<DonutChart title={t('Application status')} data={appStatusData} helperText={getApplicationStatusHelperText(t)} />
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default ApplicationStatusChart;
|