@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,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
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Fleet, PatchRequest } from '@flightctl/types';
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
|
+
import * as Yup from 'yup';
|
|
4
|
+
import { FleetFormValues } from './types';
|
|
5
|
+
import { API_VERSION } from '../../../constants';
|
|
6
|
+
import { toAPILabel } from '../../../utils/labels';
|
|
7
|
+
import {
|
|
8
|
+
maxLengthString,
|
|
9
|
+
validApplicationsSchema,
|
|
10
|
+
validConfigTemplatesSchema,
|
|
11
|
+
validKubernetesDnsSubdomain,
|
|
12
|
+
validLabelsSchema,
|
|
13
|
+
} from '../../form/validations';
|
|
14
|
+
import { appendJSONPatch, getApplicationPatches, getLabelPatches, toAPIApplication } from '../../../utils/patch';
|
|
15
|
+
import {
|
|
16
|
+
getAPIConfig,
|
|
17
|
+
getApplicationValues,
|
|
18
|
+
getConfigTemplatesValues,
|
|
19
|
+
getDeviceSpecConfigPatches,
|
|
20
|
+
} from '../../Device/EditDeviceWizard/deviceSpecUtils';
|
|
21
|
+
|
|
22
|
+
export const getValidationSchema = (t: TFunction) => {
|
|
23
|
+
return Yup.object<FleetFormValues>({
|
|
24
|
+
name: validKubernetesDnsSubdomain(t, { isRequired: true }),
|
|
25
|
+
osImage: maxLengthString(t, { fieldName: t('System image'), maxLength: 2048 }),
|
|
26
|
+
fleetLabels: validLabelsSchema(t),
|
|
27
|
+
labels: validLabelsSchema(t),
|
|
28
|
+
configTemplates: validConfigTemplatesSchema(t),
|
|
29
|
+
applications: validApplicationsSchema(t),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const getFleetPatches = (currentFleet: Fleet, updatedFleet: FleetFormValues) => {
|
|
34
|
+
let allPatches: PatchRequest = [];
|
|
35
|
+
|
|
36
|
+
// Fleet labels
|
|
37
|
+
const currentLabels = currentFleet.metadata.labels || {};
|
|
38
|
+
const updatedLabels = updatedFleet.fleetLabels || {};
|
|
39
|
+
|
|
40
|
+
const fleetLabelPatches = getLabelPatches('/metadata/labels', currentLabels, updatedLabels);
|
|
41
|
+
allPatches = allPatches.concat(fleetLabelPatches);
|
|
42
|
+
|
|
43
|
+
// Device label selector
|
|
44
|
+
const currentDeviceSelectLabels = currentFleet.spec.selector?.matchLabels || {};
|
|
45
|
+
const updatedDeviceSelectLabels = updatedFleet.labels || {};
|
|
46
|
+
const updatedDeviceSelectLabelCount = Object.keys(updatedDeviceSelectLabels).length;
|
|
47
|
+
|
|
48
|
+
if (updatedDeviceSelectLabelCount > 0) {
|
|
49
|
+
if (currentFleet.spec.selector) {
|
|
50
|
+
const deviceSelectLabelPatches = getLabelPatches(
|
|
51
|
+
'/spec/selector/matchLabels',
|
|
52
|
+
currentDeviceSelectLabels,
|
|
53
|
+
updatedDeviceSelectLabels,
|
|
54
|
+
);
|
|
55
|
+
allPatches = allPatches.concat(deviceSelectLabelPatches);
|
|
56
|
+
} else {
|
|
57
|
+
const newLabelMap = toAPILabel(updatedDeviceSelectLabels);
|
|
58
|
+
allPatches.push({
|
|
59
|
+
path: '/spec/selector',
|
|
60
|
+
op: 'add',
|
|
61
|
+
value: { matchLabels: newLabelMap },
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
} else if (currentFleet.spec.selector) {
|
|
65
|
+
allPatches.push({
|
|
66
|
+
path: '/spec/selector',
|
|
67
|
+
op: 'remove',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// OS image
|
|
72
|
+
const currentOsImage = currentFleet.spec.template.spec.os?.image;
|
|
73
|
+
const newOsImage = updatedFleet.osImage;
|
|
74
|
+
if (!currentOsImage && newOsImage) {
|
|
75
|
+
allPatches.push({
|
|
76
|
+
path: '/spec/template/spec/os',
|
|
77
|
+
op: 'add',
|
|
78
|
+
value: { image: newOsImage },
|
|
79
|
+
});
|
|
80
|
+
} else if (!newOsImage && currentOsImage) {
|
|
81
|
+
allPatches.push({
|
|
82
|
+
path: '/spec/template/spec/os',
|
|
83
|
+
op: 'remove',
|
|
84
|
+
});
|
|
85
|
+
} else if (newOsImage && currentOsImage !== newOsImage) {
|
|
86
|
+
appendJSONPatch({
|
|
87
|
+
path: '/spec/template/spec/os/image',
|
|
88
|
+
patches: allPatches,
|
|
89
|
+
newValue: newOsImage,
|
|
90
|
+
originalValue: currentOsImage,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Configurations
|
|
95
|
+
const currentConfigs = currentFleet.spec.template.spec.config || [];
|
|
96
|
+
const newConfigs = updatedFleet.configTemplates.map(getAPIConfig);
|
|
97
|
+
const configPatches = getDeviceSpecConfigPatches(currentConfigs, newConfigs, '/spec/template/spec/config');
|
|
98
|
+
allPatches = allPatches.concat(configPatches);
|
|
99
|
+
|
|
100
|
+
// Applications
|
|
101
|
+
const appPatches = getApplicationPatches(
|
|
102
|
+
'/spec/template/spec',
|
|
103
|
+
currentFleet.spec.template.spec.applications || [],
|
|
104
|
+
updatedFleet.applications,
|
|
105
|
+
);
|
|
106
|
+
allPatches = allPatches.concat(appPatches);
|
|
107
|
+
|
|
108
|
+
return allPatches;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const getFleetResource = (values: FleetFormValues): Fleet => ({
|
|
112
|
+
apiVersion: API_VERSION,
|
|
113
|
+
kind: 'Fleet',
|
|
114
|
+
metadata: {
|
|
115
|
+
name: values.name,
|
|
116
|
+
labels: toAPILabel(values.fleetLabels),
|
|
117
|
+
},
|
|
118
|
+
spec: {
|
|
119
|
+
selector: {
|
|
120
|
+
matchLabels: toAPILabel(values.labels),
|
|
121
|
+
},
|
|
122
|
+
template: {
|
|
123
|
+
metadata: {
|
|
124
|
+
labels: {
|
|
125
|
+
fleet: values.name,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
spec: {
|
|
129
|
+
os: values.osImage ? { image: values.osImage || '' } : undefined,
|
|
130
|
+
config: values.configTemplates.map(getAPIConfig),
|
|
131
|
+
applications: values.applications.map(toAPIApplication),
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export const getInitialValues = (fleet?: Fleet): FleetFormValues =>
|
|
138
|
+
fleet
|
|
139
|
+
? {
|
|
140
|
+
name: fleet.metadata.name || '',
|
|
141
|
+
labels: Object.keys(fleet.spec.selector?.matchLabels || {}).map((key) => ({
|
|
142
|
+
key,
|
|
143
|
+
value: fleet.spec.selector?.matchLabels?.[key],
|
|
144
|
+
})),
|
|
145
|
+
fleetLabels: Object.keys(fleet.metadata.labels || {}).map((key) => ({
|
|
146
|
+
key,
|
|
147
|
+
value: fleet.metadata.labels?.[key],
|
|
148
|
+
})),
|
|
149
|
+
osImage: fleet.spec.template.spec.os?.image || '',
|
|
150
|
+
configTemplates: getConfigTemplatesValues(fleet.spec.template.spec),
|
|
151
|
+
applications: getApplicationValues(fleet.spec.template.spec),
|
|
152
|
+
}
|
|
153
|
+
: {
|
|
154
|
+
name: '',
|
|
155
|
+
labels: [],
|
|
156
|
+
fleetLabels: [],
|
|
157
|
+
osImage: '',
|
|
158
|
+
configTemplates: [],
|
|
159
|
+
applications: [],
|
|
160
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert, Button, Modal, Stack, StackItem } from '@patternfly/react-core';
|
|
3
|
+
import { Trans } from 'react-i18next';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
6
|
+
import { useFetch } from '../../../hooks/useFetch';
|
|
7
|
+
import { getErrorMessage } from '../../../utils/error';
|
|
8
|
+
|
|
9
|
+
const DeleteFleetModal = ({ fleetId, onClose }: { fleetId: string; onClose: (hasDeleted?: boolean) => void }) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const { remove } = useFetch();
|
|
12
|
+
|
|
13
|
+
const [error, setError] = React.useState<{ text: string; details?: string }>();
|
|
14
|
+
const [isDeleting, setIsDeleting] = React.useState<boolean>();
|
|
15
|
+
|
|
16
|
+
const onDelete = async () => {
|
|
17
|
+
try {
|
|
18
|
+
await remove(`fleets/${fleetId}`);
|
|
19
|
+
} catch (fleetErr) {
|
|
20
|
+
setError({ text: t('Deletion of fleet {{fleetId}} failed.'), details: getErrorMessage(fleetErr) });
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Modal
|
|
26
|
+
title={t('Delete fleet ?')}
|
|
27
|
+
isOpen
|
|
28
|
+
onClose={() => {
|
|
29
|
+
onClose();
|
|
30
|
+
}}
|
|
31
|
+
variant="small"
|
|
32
|
+
titleIconVariant="warning"
|
|
33
|
+
actions={[
|
|
34
|
+
<Button
|
|
35
|
+
key="confirm"
|
|
36
|
+
variant="danger"
|
|
37
|
+
isDisabled={isDeleting || !!error}
|
|
38
|
+
isLoading={isDeleting}
|
|
39
|
+
onClick={async () => {
|
|
40
|
+
setError(undefined);
|
|
41
|
+
try {
|
|
42
|
+
setIsDeleting(true);
|
|
43
|
+
await onDelete();
|
|
44
|
+
setIsDeleting(false);
|
|
45
|
+
onClose(true);
|
|
46
|
+
} catch {
|
|
47
|
+
setIsDeleting(false);
|
|
48
|
+
}
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
{t('Delete fleet')}
|
|
52
|
+
</Button>,
|
|
53
|
+
<Button
|
|
54
|
+
key="cancel"
|
|
55
|
+
variant="link"
|
|
56
|
+
onClick={() => {
|
|
57
|
+
onClose();
|
|
58
|
+
}}
|
|
59
|
+
isDisabled={isDeleting}
|
|
60
|
+
>
|
|
61
|
+
{t('Cancel')}
|
|
62
|
+
</Button>,
|
|
63
|
+
]}
|
|
64
|
+
>
|
|
65
|
+
<Stack hasGutter>
|
|
66
|
+
<StackItem>
|
|
67
|
+
<Trans t={t}>
|
|
68
|
+
Are you sure you want to delete fleet <strong>{fleetId}</strong>?
|
|
69
|
+
</Trans>
|
|
70
|
+
</StackItem>
|
|
71
|
+
<StackItem>
|
|
72
|
+
{t(
|
|
73
|
+
'Devices bound to this fleet may join another fleet matching their labels, otherwise they will remain unlinked from any fleet.',
|
|
74
|
+
)}
|
|
75
|
+
</StackItem>
|
|
76
|
+
{error && (
|
|
77
|
+
<StackItem>
|
|
78
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
79
|
+
<div>{error.text}</div>
|
|
80
|
+
{error.details && <div>{t('Details: {{errorDetails}}', { errorDetails: error.details })}</div>}
|
|
81
|
+
</Alert>
|
|
82
|
+
</StackItem>
|
|
83
|
+
)}
|
|
84
|
+
</Stack>
|
|
85
|
+
</Modal>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default DeleteFleetModal;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownItem, DropdownList } from '@patternfly/react-core';
|
|
3
|
+
import { Fleet } from '@flightctl/types';
|
|
4
|
+
|
|
5
|
+
import { useFetchPeriodically } from '../../../hooks/useFetchPeriodically';
|
|
6
|
+
import DetailsPage from '../../DetailsPage/DetailsPage';
|
|
7
|
+
import DetailsPageActions from '../../DetailsPage/DetailsPageActions';
|
|
8
|
+
import FleetDetailsContent from './FleetDetailsContent';
|
|
9
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
10
|
+
import { ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
11
|
+
import { useAppContext } from '../../../hooks/useAppContext';
|
|
12
|
+
import DeleteFleetModal from '../DeleteFleetModal/DeleteFleetModal';
|
|
13
|
+
|
|
14
|
+
const FleetDetails = () => {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
router: { useParams },
|
|
19
|
+
} = useAppContext();
|
|
20
|
+
const { fleetId } = useParams() as { fleetId: string };
|
|
21
|
+
const [fleet, isLoading, error, refetch] = useFetchPeriodically<Required<Fleet>>({
|
|
22
|
+
endpoint: `fleets/${fleetId}?addDevicesSummary=true`,
|
|
23
|
+
});
|
|
24
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState<boolean>();
|
|
25
|
+
|
|
26
|
+
const navigate = useNavigate();
|
|
27
|
+
|
|
28
|
+
const isManaged = !!fleet?.metadata?.owner;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<DetailsPage
|
|
32
|
+
loading={isLoading}
|
|
33
|
+
error={error}
|
|
34
|
+
id={fleetId}
|
|
35
|
+
resourceLink={ROUTE.FLEETS}
|
|
36
|
+
resourceType="Fleets"
|
|
37
|
+
resourceTypeLabel={t('Fleets')}
|
|
38
|
+
actions={
|
|
39
|
+
<DetailsPageActions>
|
|
40
|
+
<DropdownList>
|
|
41
|
+
<DropdownItem
|
|
42
|
+
isAriaDisabled={isManaged}
|
|
43
|
+
tooltipProps={
|
|
44
|
+
isManaged
|
|
45
|
+
? {
|
|
46
|
+
content: t('Fleets managed by a resource sync cannot be edited'),
|
|
47
|
+
}
|
|
48
|
+
: undefined
|
|
49
|
+
}
|
|
50
|
+
onClick={() => navigate({ route: ROUTE.FLEET_EDIT, postfix: fleetId })}
|
|
51
|
+
>
|
|
52
|
+
{t('Edit fleet')}
|
|
53
|
+
</DropdownItem>
|
|
54
|
+
<DropdownItem
|
|
55
|
+
title={t('Delete fleet')}
|
|
56
|
+
onClick={() => {
|
|
57
|
+
setIsDeleteModalOpen(true);
|
|
58
|
+
}}
|
|
59
|
+
isAriaDisabled={isManaged}
|
|
60
|
+
tooltipProps={
|
|
61
|
+
isManaged
|
|
62
|
+
? {
|
|
63
|
+
content: t(
|
|
64
|
+
"This fleet is managed by a resource sync and cannot be directly deleted. Either remove this fleet's definition from the resource sync configuration, or delete the resource sync first.",
|
|
65
|
+
),
|
|
66
|
+
}
|
|
67
|
+
: undefined
|
|
68
|
+
}
|
|
69
|
+
>
|
|
70
|
+
{t('Delete fleet')}
|
|
71
|
+
</DropdownItem>
|
|
72
|
+
</DropdownList>
|
|
73
|
+
</DetailsPageActions>
|
|
74
|
+
}
|
|
75
|
+
>
|
|
76
|
+
{fleet && (
|
|
77
|
+
<>
|
|
78
|
+
<FleetDetailsContent fleet={fleet} />
|
|
79
|
+
{isDeleteModalOpen && (
|
|
80
|
+
<DeleteFleetModal
|
|
81
|
+
fleetId={fleetId}
|
|
82
|
+
onClose={(hasDeleted?: boolean) => {
|
|
83
|
+
if (hasDeleted) {
|
|
84
|
+
refetch();
|
|
85
|
+
navigate(ROUTE.FLEETS);
|
|
86
|
+
}
|
|
87
|
+
setIsDeleteModalOpen(false);
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
)}
|
|
91
|
+
</>
|
|
92
|
+
)}
|
|
93
|
+
</DetailsPage>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default FleetDetails;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardBody,
|
|
6
|
+
CardTitle,
|
|
7
|
+
DescriptionListDescription,
|
|
8
|
+
DescriptionListGroup,
|
|
9
|
+
DescriptionListTerm,
|
|
10
|
+
Grid,
|
|
11
|
+
GridItem,
|
|
12
|
+
} from '@patternfly/react-core';
|
|
13
|
+
|
|
14
|
+
import { Fleet } from '@flightctl/types';
|
|
15
|
+
import FleetOwnerLink from './FleetOwnerLink';
|
|
16
|
+
import FleetDevices from './FleetDevices';
|
|
17
|
+
import FleetStatus from '../FleetStatus';
|
|
18
|
+
import FleetDevicesLink from './FleetDevicesLink';
|
|
19
|
+
import FlightControlDescriptionList from '../../common/FlightCtlDescriptionList';
|
|
20
|
+
import LabelsView from '../../common/LabelsView';
|
|
21
|
+
import { getDateDisplay } from '../../../utils/dates';
|
|
22
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
23
|
+
import RepositorySourceList from '../../Repository/RepositoryDetails/RepositorySourceList';
|
|
24
|
+
|
|
25
|
+
const FleetDetailsContent = ({ fleet }: { fleet: Fleet }) => {
|
|
26
|
+
const { t } = useTranslation();
|
|
27
|
+
const fleetId = fleet.metadata.name as string;
|
|
28
|
+
const devicesSummary = fleet.status?.devicesSummary;
|
|
29
|
+
return (
|
|
30
|
+
<Grid hasGutter>
|
|
31
|
+
<GridItem md={12}>
|
|
32
|
+
<Card>
|
|
33
|
+
<CardTitle>{t('Details')}</CardTitle>
|
|
34
|
+
<CardBody>
|
|
35
|
+
<FlightControlDescriptionList columnModifier={{ lg: '3Col' }}>
|
|
36
|
+
<DescriptionListGroup>
|
|
37
|
+
<DescriptionListTerm>{t('Created')}</DescriptionListTerm>
|
|
38
|
+
<DescriptionListDescription>
|
|
39
|
+
{getDateDisplay(fleet.metadata.creationTimestamp || '')}
|
|
40
|
+
</DescriptionListDescription>
|
|
41
|
+
</DescriptionListGroup>
|
|
42
|
+
<DescriptionListGroup>
|
|
43
|
+
<DescriptionListTerm>{t('Status')}</DescriptionListTerm>
|
|
44
|
+
<DescriptionListDescription>
|
|
45
|
+
<FleetStatus fleet={fleet} />
|
|
46
|
+
</DescriptionListDescription>
|
|
47
|
+
</DescriptionListGroup>
|
|
48
|
+
<DescriptionListGroup>
|
|
49
|
+
<DescriptionListTerm>{t('System image')}</DescriptionListTerm>
|
|
50
|
+
<DescriptionListDescription>{fleet.spec.template.spec.os?.image || '-'}</DescriptionListDescription>
|
|
51
|
+
</DescriptionListGroup>
|
|
52
|
+
<DescriptionListGroup>
|
|
53
|
+
<DescriptionListTerm>{t('Device selector')}</DescriptionListTerm>
|
|
54
|
+
<DescriptionListDescription>
|
|
55
|
+
<LabelsView prefix="device" labels={fleet.spec.selector?.matchLabels} />
|
|
56
|
+
</DescriptionListDescription>
|
|
57
|
+
</DescriptionListGroup>
|
|
58
|
+
<DescriptionListGroup>
|
|
59
|
+
<DescriptionListTerm>{t('Associated devices')}</DescriptionListTerm>
|
|
60
|
+
<DescriptionListDescription>
|
|
61
|
+
<FleetDevicesLink fleetId={fleetId} count={devicesSummary?.total} />
|
|
62
|
+
</DescriptionListDescription>
|
|
63
|
+
</DescriptionListGroup>
|
|
64
|
+
<DescriptionListGroup>
|
|
65
|
+
<DescriptionListTerm>{t('Managed by')}</DescriptionListTerm>
|
|
66
|
+
<DescriptionListDescription>
|
|
67
|
+
<FleetOwnerLink owner={fleet.metadata.owner} />
|
|
68
|
+
</DescriptionListDescription>
|
|
69
|
+
</DescriptionListGroup>
|
|
70
|
+
<DescriptionListGroup>
|
|
71
|
+
<DescriptionListTerm>
|
|
72
|
+
{t('Sources ({{size}})', { size: fleet.spec.template.spec.config?.length || 0 })}
|
|
73
|
+
</DescriptionListTerm>
|
|
74
|
+
<DescriptionListDescription>
|
|
75
|
+
<RepositorySourceList configs={fleet.spec.template.spec.config || []} />
|
|
76
|
+
</DescriptionListDescription>
|
|
77
|
+
</DescriptionListGroup>
|
|
78
|
+
</FlightControlDescriptionList>
|
|
79
|
+
</CardBody>
|
|
80
|
+
</Card>
|
|
81
|
+
</GridItem>
|
|
82
|
+
{devicesSummary && (
|
|
83
|
+
<GridItem md={12}>
|
|
84
|
+
<Card>
|
|
85
|
+
<CardTitle>{t('Fleet devices')}</CardTitle>
|
|
86
|
+
|
|
87
|
+
<CardBody>
|
|
88
|
+
<FleetDevices fleetId={fleetId} devicesSummary={devicesSummary} />
|
|
89
|
+
</CardBody>
|
|
90
|
+
</Card>
|
|
91
|
+
</GridItem>
|
|
92
|
+
)}
|
|
93
|
+
</Grid>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default FleetDetailsContent;
|