@flightctl/ui-components 0.4.0 → 0.5.0-rc2
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/src/components/DetailsPage/DetailsPageActions.d.ts +11 -4
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.js +15 -4
- package/dist/src/components/DetailsPage/DetailsPageActions.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +2 -2
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +22 -15
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +42 -39
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js +41 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.js +30 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDeviceTableRow.d.ts +16 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDeviceTableRow.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDeviceTableRow.js +57 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDeviceTableRow.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts +16 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +73 -0
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceNameOnlyToolbarFilter.d.ts +10 -0
- package/dist/src/components/Device/DevicesPage/DeviceNameOnlyToolbarFilter.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceNameOnlyToolbarFilter.js +19 -0
- package/dist/src/components/Device/DevicesPage/DeviceNameOnlyToolbarFilter.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.d.ts +8 -0
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.js +34 -0
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +0 -22
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +9 -92
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDeviceTableRow.d.ts +16 -0
- package/dist/src/components/Device/DevicesPage/EnrolledDeviceTableRow.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/{DeviceTableRow.js → EnrolledDeviceTableRow.js} +9 -13
- package/dist/src/components/Device/DevicesPage/EnrolledDeviceTableRow.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts +23 -0
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +99 -0
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts +2 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/useDevices.js +16 -1
- package/dist/src/components/Device/DevicesPage/useDevices.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +5 -3
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +7 -7
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts +9 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js +37 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.js +6 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +4 -13
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +2 -2
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts +2 -2
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts +2 -2
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +32 -3
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js +4 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts +26 -0
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js +63 -0
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +19 -10
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js +52 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts +8 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js +95 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.d.ts +4 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js +31 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.d.ts +4 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js +78 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +21 -0
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/types.js +6 -0
- package/dist/src/components/Fleet/CreateFleet/types.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js +15 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js +9 -7
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCharts.d.ts +9 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCharts.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/{FleetDevices.js → FleetDevicesCharts.js} +4 -4
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCharts.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCount.d.ts +10 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCount.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCount.js +30 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesCount.js.map +1 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js +2 -2
- package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -1
- package/dist/src/components/Fleet/FleetRow.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetRow.js +7 -5
- package/dist/src/components/Fleet/FleetRow.js.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.js +2 -2
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
- package/dist/src/components/Fleet/useFleets.d.ts +3 -3
- package/dist/src/components/Fleet/useFleets.d.ts.map +1 -1
- package/dist/src/components/Fleet/useFleets.js +3 -3
- package/dist/src/components/Fleet/useFleets.js.map +1 -1
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -1
- package/dist/src/components/ListPage/ListPage.js +6 -1
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/ListPage/ListPageActions.d.ts +8 -15
- package/dist/src/components/ListPage/ListPageActions.d.ts.map +1 -1
- package/dist/src/components/ListPage/ListPageActions.js +25 -5
- package/dist/src/components/ListPage/ListPageActions.js.map +1 -1
- package/dist/src/components/ListPage/types.d.ts +11 -11
- package/dist/src/components/ListPage/types.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js +0 -1
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/OverviewPage.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/OverviewPage.js +6 -1
- package/dist/src/components/OverviewPage/OverviewPage.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js.map +1 -1
- package/dist/src/components/Repository/useRepositories.d.ts +2 -2
- package/dist/src/components/Repository/useRepositories.d.ts.map +1 -1
- package/dist/src/components/Repository/useRepositories.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +2 -2
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/Status/DeviceLifecycleStatus.d.ts +7 -0
- package/dist/src/components/Status/DeviceLifecycleStatus.d.ts.map +1 -0
- package/dist/src/components/Status/DeviceLifecycleStatus.js +25 -0
- package/dist/src/components/Status/DeviceLifecycleStatus.js.map +1 -0
- package/dist/src/components/Status/StatusDisplay.d.ts +1 -1
- package/dist/src/components/Status/StatusDisplay.d.ts.map +1 -1
- package/dist/src/components/Status/StatusDisplay.js +3 -3
- package/dist/src/components/Status/StatusDisplay.js.map +1 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/Table.js +2 -2
- package/dist/src/components/Table/Table.js.map +1 -1
- package/dist/src/components/Table/TablePagination.d.ts +4 -3
- package/dist/src/components/Table/TablePagination.d.ts.map +1 -1
- package/dist/src/components/Table/TablePagination.js +6 -5
- package/dist/src/components/Table/TablePagination.js.map +1 -1
- package/dist/src/components/common/EditableLabelControl.d.ts.map +1 -1
- package/dist/src/components/common/EditableLabelControl.js +5 -7
- package/dist/src/components/common/EditableLabelControl.js.map +1 -1
- package/dist/src/components/common/TechPreviewBadge.d.ts +4 -0
- package/dist/src/components/common/TechPreviewBadge.d.ts.map +1 -0
- package/dist/src/components/common/TechPreviewBadge.js +23 -0
- package/dist/src/components/common/TechPreviewBadge.js.map +1 -0
- package/dist/src/components/form/LabelsField.d.ts.map +1 -1
- package/dist/src/components/form/LabelsField.js +4 -1
- package/dist/src/components/form/LabelsField.js.map +1 -1
- package/dist/src/components/form/NumberField.d.ts +10 -0
- package/dist/src/components/form/NumberField.d.ts.map +1 -0
- package/dist/src/components/form/NumberField.js +51 -0
- package/dist/src/components/form/NumberField.js.map +1 -0
- package/dist/src/components/form/TextListField.d.ts +12 -0
- package/dist/src/components/form/TextListField.d.ts.map +1 -0
- package/dist/src/components/form/TextListField.js +46 -0
- package/dist/src/components/form/TextListField.js.map +1 -0
- package/dist/src/components/form/validations.d.ts +34 -6
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +78 -4
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.d.ts +9 -0
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.d.ts.map +1 -0
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.js +51 -0
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.js.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts +4 -2
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +11 -4
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js +67 -0
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js.map +1 -0
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/constants.js.map +1 -1
- package/dist/src/hooks/useAppContext.d.ts +1 -1
- package/dist/src/hooks/useAppContext.d.ts.map +1 -1
- package/dist/src/hooks/useFetch.d.ts +1 -1
- package/dist/src/hooks/useFetchPeriodically.js +10 -10
- package/dist/src/hooks/useFetchPeriodically.js.map +1 -1
- package/dist/src/hooks/useTablePagination.d.ts +5 -3
- package/dist/src/hooks/useTablePagination.d.ts.map +1 -1
- package/dist/src/hooks/useTablePagination.js +9 -5
- package/dist/src/hooks/useTablePagination.js.map +1 -1
- package/dist/src/hooks/useWebSocket.d.ts +1 -1
- package/dist/src/hooks/useWebSocket.js +4 -4
- package/dist/src/hooks/useWebSocket.js.map +1 -1
- package/dist/src/links.d.ts +1 -0
- package/dist/src/links.d.ts.map +1 -1
- package/dist/src/links.js +2 -1
- package/dist/src/links.js.map +1 -1
- package/dist/src/types/rbac.d.ts +3 -1
- package/dist/src/types/rbac.d.ts.map +1 -1
- package/dist/src/types/rbac.js +2 -0
- package/dist/src/types/rbac.js.map +1 -1
- package/dist/src/utils/api.d.ts +3 -6
- package/dist/src/utils/api.d.ts.map +1 -1
- package/dist/src/utils/api.js.map +1 -1
- package/dist/src/utils/apiCalls.d.ts +2 -0
- package/dist/src/utils/apiCalls.d.ts.map +1 -0
- package/dist/src/utils/apiCalls.js +23 -0
- package/dist/src/utils/apiCalls.js.map +1 -0
- package/dist/src/utils/devices.d.ts +6 -3
- package/dist/src/utils/devices.d.ts.map +1 -1
- package/dist/src/utils/devices.js +20 -1
- package/dist/src/utils/devices.js.map +1 -1
- package/dist/src/utils/patch.d.ts +4 -1
- package/dist/src/utils/patch.d.ts.map +1 -1
- package/dist/src/utils/patch.js +166 -9
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/status/common.js +13 -12
- package/dist/src/utils/status/common.js.map +1 -1
- package/dist/src/utils/status/devices.d.ts +3 -3
- package/dist/src/utils/status/devices.d.ts.map +1 -1
- package/dist/src/utils/status/devices.js +40 -5
- package/dist/src/utils/status/devices.js.map +1 -1
- package/dist/src/utils/status/fleet.d.ts +4 -4
- package/dist/src/utils/status/fleet.d.ts.map +1 -1
- package/dist/src/utils/status/fleet.js +15 -2
- package/dist/src/utils/status/fleet.js.map +1 -1
- package/dist/src/utils/tooltip.d.ts +7 -0
- package/dist/src/utils/tooltip.d.ts.map +1 -0
- package/dist/src/utils/tooltip.js +6 -0
- package/dist/src/utils/tooltip.js.map +1 -0
- package/package.json +1 -1
- package/src/components/DetailsPage/DetailsPageActions.tsx +34 -6
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +1 -1
- package/src/components/Device/DeviceDetails/DeviceApplications.tsx +3 -3
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +53 -34
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +71 -54
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsx +75 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsx +47 -0
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +1 -4
- package/src/components/Device/DevicesPage/DecommissionedDeviceTableRow.tsx +89 -0
- package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +156 -0
- package/src/components/Device/DevicesPage/DeviceNameOnlyToolbarFilter.tsx +30 -0
- package/src/components/Device/DevicesPage/DevicesEmptyStates.tsx +46 -0
- package/src/components/Device/DevicesPage/DevicesPage.tsx +45 -215
- package/src/components/Device/DevicesPage/{DeviceTableRow.tsx → EnrolledDeviceTableRow.tsx} +16 -20
- package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +208 -0
- package/src/components/Device/DevicesPage/useDevices.ts +21 -1
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +6 -3
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +2 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +1 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +1 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +27 -19
- package/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.tsx +55 -0
- package/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +9 -7
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +10 -36
- package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +2 -2
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +2 -2
- package/src/components/EnrollmentRequest/useEnrollmentRequests.ts +3 -2
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +46 -5
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +4 -0
- package/src/components/Fleet/CreateFleet/fleetSpecUtils.ts +62 -0
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +65 -30
- package/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.tsx +87 -0
- package/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.tsx +155 -0
- package/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx +87 -0
- package/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx +190 -0
- package/src/components/Fleet/CreateFleet/types.ts +25 -0
- package/src/components/Fleet/CreateFleet/utils.ts +20 -1
- package/src/components/Fleet/FleetDetails/FleetDetailsContent.tsx +10 -7
- package/src/components/Fleet/FleetDetails/{FleetDevices.tsx → FleetDevicesCharts.tsx} +4 -4
- package/src/components/Fleet/FleetDetails/FleetDevicesCount.tsx +53 -0
- package/src/components/Fleet/FleetResourceSyncs.tsx +2 -2
- package/src/components/Fleet/FleetRow.tsx +12 -4
- package/src/components/Fleet/FleetsPage.tsx +2 -2
- package/src/components/Fleet/useFleets.ts +7 -7
- package/src/components/ListPage/ListPage.tsx +12 -4
- package/src/components/ListPage/ListPageActions.tsx +50 -16
- package/src/components/ListPage/types.ts +8 -8
- package/src/components/OverviewPage/Cards/Status/DeviceStatusChart.tsx +0 -1
- package/src/components/OverviewPage/OverviewPage.tsx +12 -4
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +1 -1
- package/src/components/Repository/useRepositories.ts +2 -2
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +2 -2
- package/src/components/Status/DeviceLifecycleStatus.tsx +33 -0
- package/src/components/Status/StatusDisplay.tsx +4 -4
- package/src/components/Table/Table.tsx +2 -1
- package/src/components/Table/TablePagination.tsx +9 -7
- package/src/components/common/EditableLabelControl.tsx +7 -6
- package/src/components/common/TechPreviewBadge.tsx +43 -0
- package/src/components/form/LabelsField.tsx +4 -1
- package/src/components/form/NumberField.tsx +78 -0
- package/src/components/form/TextListField.tsx +82 -0
- package/src/components/form/validations.ts +103 -10
- package/src/components/modals/DecommissionModal/DecommissionModal.tsx +95 -0
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +9 -8
- package/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.tsx +130 -0
- package/src/constants.ts +1 -1
- package/src/hooks/useAppContext.tsx +1 -1
- package/src/hooks/useFetchPeriodically.ts +11 -11
- package/src/hooks/{useTablePagination.tsx → useTablePagination.ts} +13 -7
- package/src/hooks/useWebSocket.ts +4 -4
- package/src/links.ts +2 -0
- package/src/types/rbac.ts +2 -0
- package/src/utils/api.ts +13 -6
- package/src/utils/apiCalls.ts +15 -0
- package/src/utils/devices.ts +21 -3
- package/src/utils/patch.ts +182 -8
- package/src/utils/status/common.ts +8 -8
- package/src/utils/status/devices.ts +39 -8
- package/src/utils/status/fleet.ts +21 -6
- package/src/utils/tooltip.ts +2 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts +0 -8
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts.map +0 -1
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js +0 -23
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js.map +0 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts +0 -16
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts.map +0 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.js.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts +0 -9
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts +0 -7
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js +0 -13
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js.map +0 -1
- package/dist/src/components/Status/IntegrityStatus.d.ts +0 -7
- package/dist/src/components/Status/IntegrityStatus.d.ts.map +0 -1
- package/dist/src/components/Status/IntegrityStatus.js +0 -17
- package/dist/src/components/Status/IntegrityStatus.js.map +0 -1
- package/dist/src/utils/status/integrity.d.ts +0 -5
- package/dist/src/utils/status/integrity.d.ts.map +0 -1
- package/dist/src/utils/status/integrity.js +0 -28
- package/dist/src/utils/status/integrity.js.map +0 -1
- package/src/components/DetailsPage/Tables/IntegrityDetails.tsx +0 -44
- package/src/components/Fleet/FleetDetails/FleetDevicesLink.tsx +0 -16
- package/src/components/Status/IntegrityStatus.tsx +0 -19
- package/src/utils/status/integrity.ts +0 -26
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
} from '../../Status/utils';
|
|
13
13
|
import DonutChart from '../../charts/DonutChart';
|
|
14
14
|
import { getApplicationSummaryStatusItems } from '../../../utils/status/applications';
|
|
15
|
-
import { toChartData } from '
|
|
15
|
+
import { toChartData } from '../../charts/utils';
|
|
16
16
|
|
|
17
|
-
interface
|
|
17
|
+
interface FleetDevicesChartsProps {
|
|
18
18
|
fleetId: string;
|
|
19
19
|
devicesSummary: DevicesSummary;
|
|
20
20
|
}
|
|
@@ -90,7 +90,7 @@ const DevicesByDeviceStatusChart = ({
|
|
|
90
90
|
return <DonutChart title={t('Device status')} data={deviceStatusData} helperText={getDeviceStatusHelperText(t)} />;
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
const
|
|
93
|
+
const FleetDevicesCharts = ({ devicesSummary, fleetId }: FleetDevicesChartsProps) => {
|
|
94
94
|
return (
|
|
95
95
|
<Flex justifyContent={{ default: 'justifyContentSpaceAround' }}>
|
|
96
96
|
<FlexItem>
|
|
@@ -106,4 +106,4 @@ const FleetDevices = ({ devicesSummary, fleetId }: FleetDevicesProps) => {
|
|
|
106
106
|
);
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
export default
|
|
109
|
+
export default FleetDevicesCharts;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DevicesSummary } from '@flightctl/types';
|
|
3
|
+
import { Icon, Popover } from '@patternfly/react-core';
|
|
4
|
+
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
5
|
+
|
|
6
|
+
import { Link, ROUTE } from '../../../hooks/useNavigate';
|
|
7
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
8
|
+
|
|
9
|
+
type FleetDevicesCountProps = {
|
|
10
|
+
fleetId: string;
|
|
11
|
+
devicesSummary: DevicesSummary | undefined;
|
|
12
|
+
error?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const UpdatedFleetDevices = ({ error }: { error?: string }) => {
|
|
16
|
+
const { t } = useTranslation();
|
|
17
|
+
if (!error) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Popover
|
|
23
|
+
aria-label={t('Fleet devices popover')}
|
|
24
|
+
headerContent={t('Rollout error')}
|
|
25
|
+
bodyContent={error}
|
|
26
|
+
hasAutoWidth={false}
|
|
27
|
+
>
|
|
28
|
+
<Icon status="danger" className="pf-v5-u-mr-sm">
|
|
29
|
+
<ExclamationCircleIcon />
|
|
30
|
+
</Icon>
|
|
31
|
+
</Popover>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const FleetDevicesCount = ({ fleetId, devicesSummary, error }: FleetDevicesCountProps) => {
|
|
36
|
+
if (!devicesSummary || !devicesSummary.total) {
|
|
37
|
+
return <>0/0</>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const upToDate = devicesSummary.updateStatus['UpToDate'];
|
|
41
|
+
return (
|
|
42
|
+
<>
|
|
43
|
+
{/* Devices may continue updating even after a rollout failed. If all devices are up-to-date, do not show the rollout error */}
|
|
44
|
+
{upToDate !== devicesSummary.total && <UpdatedFleetDevices error={error} />}
|
|
45
|
+
{`${upToDate || 0}`}/
|
|
46
|
+
<Link to={ROUTE.DEVICES} query={`fleetId=${fleetId}`}>
|
|
47
|
+
{devicesSummary.total}
|
|
48
|
+
</Link>
|
|
49
|
+
</>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default FleetDevicesCount;
|
|
@@ -146,14 +146,14 @@ const FleetResourceSyncs = () => {
|
|
|
146
146
|
return (
|
|
147
147
|
<PageSection variant={PageSectionVariants.light}>
|
|
148
148
|
<Stack hasGutter>
|
|
149
|
-
{
|
|
149
|
+
{pendingRs.map((rs) => {
|
|
150
150
|
return (
|
|
151
151
|
<StackItem key={rs.metadata.name as string}>
|
|
152
152
|
<ResourceSyncInfoAlert rs={rs} />
|
|
153
153
|
</StackItem>
|
|
154
154
|
);
|
|
155
155
|
})}
|
|
156
|
-
{
|
|
156
|
+
{errorRs.map((rs) => {
|
|
157
157
|
return (
|
|
158
158
|
<StackItem key={rs.metadata.name as string}>
|
|
159
159
|
<ResourceSyncErrorAlert rs={rs} refetch={rsRefetch} />
|
|
@@ -3,11 +3,13 @@ import { ActionsColumn, IAction, OnSelect, Td, Tr } from '@patternfly/react-tabl
|
|
|
3
3
|
|
|
4
4
|
import { Fleet } from '@flightctl/types';
|
|
5
5
|
import { useTranslation } from '../../hooks/useTranslation';
|
|
6
|
-
import { FleetOwnerLinkIcon, getOwnerName } from './FleetDetails/FleetOwnerLink';
|
|
7
6
|
import { ROUTE, useNavigate } from '../../hooks/useNavigate';
|
|
7
|
+
import { getFleetRolloutStatusWarning } from '../../utils/status/fleet';
|
|
8
|
+
|
|
9
|
+
import { FleetOwnerLinkIcon, getOwnerName } from './FleetDetails/FleetOwnerLink';
|
|
8
10
|
import FleetStatus from './FleetStatus';
|
|
9
11
|
import ResourceLink from '../common/ResourceLink';
|
|
10
|
-
import
|
|
12
|
+
import FleetDevicesCount from './FleetDetails/FleetDevicesCount';
|
|
11
13
|
|
|
12
14
|
type FleetRowProps = {
|
|
13
15
|
fleet: Fleet;
|
|
@@ -52,6 +54,8 @@ const FleetRow: React.FC<FleetRowProps> = ({
|
|
|
52
54
|
|
|
53
55
|
const isManaged = !!fleet.metadata?.owner;
|
|
54
56
|
const actions = useFleetActions(fleetName, isManaged, canEdit);
|
|
57
|
+
const fleetRolloutError = getFleetRolloutStatusWarning(fleet, t);
|
|
58
|
+
|
|
55
59
|
if (canDelete) {
|
|
56
60
|
actions.push({
|
|
57
61
|
title: t('Delete fleet'),
|
|
@@ -82,8 +86,12 @@ const FleetRow: React.FC<FleetRowProps> = ({
|
|
|
82
86
|
</FleetOwnerLinkIcon>
|
|
83
87
|
</Td>
|
|
84
88
|
<Td dataLabel={t('System image')}>{fleet.spec.template.spec.os?.image || '-'}</Td>
|
|
85
|
-
<Td dataLabel={t('
|
|
86
|
-
<
|
|
89
|
+
<Td dataLabel={t('Up-to-date/devices')}>
|
|
90
|
+
<FleetDevicesCount
|
|
91
|
+
fleetId={fleetName}
|
|
92
|
+
devicesSummary={fleet.status?.devicesSummary}
|
|
93
|
+
error={fleetRolloutError}
|
|
94
|
+
/>
|
|
87
95
|
</Td>
|
|
88
96
|
<Td dataLabel={t('Status')}>
|
|
89
97
|
<FleetStatus fleet={fleet} />
|
|
@@ -97,7 +97,7 @@ const getColumns = (t: TFunction): ApiSortTableColumn[] => [
|
|
|
97
97
|
name: t('System image'),
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
name: t('
|
|
100
|
+
name: t('Up-to-date/devices'),
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
name: t('Status'),
|
|
@@ -110,7 +110,7 @@ const FleetTable = () => {
|
|
|
110
110
|
const fleetColumns = React.useMemo(() => getColumns(t), [t]);
|
|
111
111
|
const { name, setName, hasFiltersEnabled } = useFleetBackendFilters();
|
|
112
112
|
|
|
113
|
-
const { fleets, isLoading, error, isUpdating, refetch, pagination } = useFleets({ name,
|
|
113
|
+
const { fleets, isLoading, error, isUpdating, refetch, pagination } = useFleets({ name, addDevicesSummary: true });
|
|
114
114
|
|
|
115
115
|
const [isMassDeleteModalOpen, setIsMassDeleteModalOpen] = React.useState(false);
|
|
116
116
|
const [fleetToDeleteId, setFleetToDeleteId] = React.useState<string>();
|
|
@@ -14,7 +14,7 @@ export enum FleetSearchParams {
|
|
|
14
14
|
type FleetsEndpointArgs = {
|
|
15
15
|
name?: string;
|
|
16
16
|
nextContinue?: string;
|
|
17
|
-
|
|
17
|
+
addDevicesSummary?: boolean;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const useFleetBackendFilters = () => {
|
|
@@ -47,11 +47,11 @@ export const useFleetBackendFilters = () => {
|
|
|
47
47
|
|
|
48
48
|
const getFleetsEndpoint = ({
|
|
49
49
|
name,
|
|
50
|
-
|
|
50
|
+
addDevicesSummary,
|
|
51
51
|
nextContinue,
|
|
52
52
|
}: {
|
|
53
53
|
name?: string;
|
|
54
|
-
|
|
54
|
+
addDevicesSummary?: boolean;
|
|
55
55
|
nextContinue?: string;
|
|
56
56
|
}) => {
|
|
57
57
|
const params = new URLSearchParams({
|
|
@@ -60,8 +60,8 @@ const getFleetsEndpoint = ({
|
|
|
60
60
|
if (name) {
|
|
61
61
|
params.set('fieldSelector', `metadata.name contains ${name}`);
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
64
|
-
params.set('
|
|
63
|
+
if (addDevicesSummary) {
|
|
64
|
+
params.set('addDevicesSummary', 'true');
|
|
65
65
|
}
|
|
66
66
|
if (nextContinue) {
|
|
67
67
|
params.set('continue', nextContinue);
|
|
@@ -81,11 +81,11 @@ export type FleetLoad = {
|
|
|
81
81
|
error: unknown;
|
|
82
82
|
isUpdating: boolean;
|
|
83
83
|
refetch: VoidFunction;
|
|
84
|
-
pagination: PaginationDetails
|
|
84
|
+
pagination: PaginationDetails<FleetList>;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
export const useFleets = (args: FleetsEndpointArgs): FleetLoad => {
|
|
88
|
-
const pagination = useTablePagination();
|
|
88
|
+
const pagination = useTablePagination<FleetList>();
|
|
89
89
|
const [fleetsEndpoint, fleetsDebouncing] = useFleetsEndpoint({ ...args, nextContinue: pagination.nextContinue });
|
|
90
90
|
const [fleetsList, isLoading, error, refetch, updating] = useFetchPeriodically<FleetList>(
|
|
91
91
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import { PageSection, PageSectionVariants, Title, TitleProps } from '@patternfly/react-core';
|
|
3
|
+
import { Flex, FlexItem, PageSection, PageSectionVariants, Title, TitleProps } from '@patternfly/react-core';
|
|
4
|
+
import TechPreviewBadge from '../common/TechPreviewBadge';
|
|
4
5
|
|
|
5
6
|
type ListPageProps = {
|
|
6
7
|
title: string;
|
|
@@ -11,9 +12,16 @@ type ListPageProps = {
|
|
|
11
12
|
const ListPage: React.FC<ListPageProps> = ({ title, headingLevel = 'h1', children }) => {
|
|
12
13
|
return (
|
|
13
14
|
<PageSection variant={PageSectionVariants.light}>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
<Flex gap={{ default: 'gapMd' }} alignItems={{ default: 'alignItemsCenter' }}>
|
|
16
|
+
<FlexItem>
|
|
17
|
+
<Title headingLevel={headingLevel} size="3xl">
|
|
18
|
+
{title}
|
|
19
|
+
</Title>
|
|
20
|
+
</FlexItem>
|
|
21
|
+
<FlexItem>
|
|
22
|
+
<TechPreviewBadge />
|
|
23
|
+
</FlexItem>
|
|
24
|
+
</Flex>
|
|
17
25
|
{children}
|
|
18
26
|
</PageSection>
|
|
19
27
|
);
|
|
@@ -1,20 +1,18 @@
|
|
|
1
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
2
|
import { TFunction } from 'react-i18next';
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
deleteModal: React.ReactNode;
|
|
10
|
-
};
|
|
4
|
+
import { DeviceDecommissionTargetType } from '@flightctl/types';
|
|
5
|
+
import { ListAction, ListActionProps, ListActionResult } from './types';
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
8
|
+
import { getDisabledTooltipProps } from '../../utils/tooltip';
|
|
9
|
+
import DeleteModal from '../modals/DeleteModal/DeleteModal';
|
|
10
|
+
import DecommissionModal from '../modals/DecommissionModal/DecommissionModal';
|
|
13
11
|
|
|
14
|
-
type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
type DeleteResourceType = 'EnrollmentRequest' | 'ResourceSync' | 'Device';
|
|
13
|
+
type DecommissionResourceType = 'Device';
|
|
14
|
+
|
|
15
|
+
type ResourceType = 'Device' | 'EnrollmentRequest' | 'ResourceSync';
|
|
18
16
|
|
|
19
17
|
const getResourceTypeLabel = (t: TFunction, resourceType: ResourceType) => {
|
|
20
18
|
switch (resourceType) {
|
|
@@ -27,14 +25,17 @@ const getResourceTypeLabel = (t: TFunction, resourceType: ResourceType) => {
|
|
|
27
25
|
}
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
export const useDeleteListAction = ({
|
|
28
|
+
export const useDeleteListAction = ({
|
|
29
|
+
resourceType,
|
|
30
|
+
onConfirm,
|
|
31
|
+
}: ListActionProps<DeleteResourceType, never>): ListActionResult => {
|
|
31
32
|
const { t } = useTranslation();
|
|
32
33
|
const [deleteResourceId, setDeleteResourceId] = React.useState<string>();
|
|
33
34
|
const [name, setName] = React.useState<string>();
|
|
34
35
|
|
|
35
36
|
const resourceTypeLabel = getResourceTypeLabel(t, resourceType);
|
|
36
37
|
|
|
37
|
-
const deleteAction:
|
|
38
|
+
const deleteAction: ListAction = ({ resourceId, resourceName, disabledReason }) => {
|
|
38
39
|
const popperProps = disabledReason ? { tooltipProps: { content: disabledReason } } : undefined;
|
|
39
40
|
return {
|
|
40
41
|
title: t('Delete {{ resourceType }}', { resourceType: resourceTypeLabel }),
|
|
@@ -58,11 +59,44 @@ export const useDeleteListAction = ({ resourceType, onDelete }: DeleteListAction
|
|
|
58
59
|
resourceName={name || deleteResourceId}
|
|
59
60
|
onClose={onClose}
|
|
60
61
|
onDelete={async () => {
|
|
61
|
-
await
|
|
62
|
+
await onConfirm(deleteResourceId);
|
|
62
63
|
onClose();
|
|
63
64
|
}}
|
|
64
65
|
/>
|
|
65
66
|
);
|
|
66
67
|
|
|
67
|
-
return { deleteAction, deleteModal };
|
|
68
|
+
return { action: deleteAction, modal: deleteModal };
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const useDecommissionListAction = ({
|
|
72
|
+
onConfirm,
|
|
73
|
+
}: ListActionProps<DecommissionResourceType, { target: DeviceDecommissionTargetType }>): ListActionResult => {
|
|
74
|
+
const { t } = useTranslation();
|
|
75
|
+
const [decommissionDeviceId, setDecommissionDeviceId] = React.useState<string>();
|
|
76
|
+
|
|
77
|
+
const decommissionAction: ListAction = ({ resourceId, disabledReason }) => {
|
|
78
|
+
const popperProps = getDisabledTooltipProps(disabledReason);
|
|
79
|
+
return {
|
|
80
|
+
title: t('Decommission device'),
|
|
81
|
+
...popperProps,
|
|
82
|
+
onClick: () => {
|
|
83
|
+
setDecommissionDeviceId(resourceId);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const onClose = () => {
|
|
89
|
+
setDecommissionDeviceId(undefined);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const decommissionModal = decommissionDeviceId && (
|
|
93
|
+
<DecommissionModal
|
|
94
|
+
onClose={onClose}
|
|
95
|
+
onDecommission={async (target: DeviceDecommissionTargetType) => {
|
|
96
|
+
await onConfirm(decommissionDeviceId, { target });
|
|
97
|
+
}}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
return { action: decommissionAction, modal: decommissionModal };
|
|
68
102
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IAction } from '@patternfly/react-table';
|
|
2
2
|
|
|
3
|
-
export type
|
|
4
|
-
deleteAction: (params: { resourceId: string; resourceName?: string; disabledReason?: string }) => IAction;
|
|
5
|
-
deleteModal: React.ReactNode;
|
|
6
|
-
};
|
|
3
|
+
export type ListAction = (params: { resourceId: string; resourceName?: string; disabledReason?: string }) => IAction;
|
|
7
4
|
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export type ListActionResult = {
|
|
6
|
+
action: ListAction;
|
|
7
|
+
modal: React.ReactNode;
|
|
11
8
|
};
|
|
12
9
|
|
|
13
|
-
export type
|
|
10
|
+
export type ListActionProps<T extends string, P> = {
|
|
11
|
+
onConfirm: (resourceId: string, params?: P) => Promise<unknown>;
|
|
12
|
+
resourceType: T;
|
|
13
|
+
};
|
|
@@ -23,7 +23,6 @@ const DeviceStatusChart = ({
|
|
|
23
23
|
|
|
24
24
|
const statusItems = getDeviceStatusItems(t);
|
|
25
25
|
|
|
26
|
-
// TODO should we add the "Pending" devices, now that the Device table does not contain ERs?
|
|
27
26
|
const devStatusData = toOverviewChartData<DeviceSummaryStatusType>(
|
|
28
27
|
deviceStatus,
|
|
29
28
|
statusItems,
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Overview from './Overview';
|
|
3
3
|
import { useTranslation } from '../../hooks/useTranslation';
|
|
4
|
-
import { PageSection, PageSectionVariants, Title } from '@patternfly/react-core';
|
|
4
|
+
import { Flex, FlexItem, PageSection, PageSectionVariants, Title } from '@patternfly/react-core';
|
|
5
|
+
import TechPreviewBadge from '../common/TechPreviewBadge';
|
|
5
6
|
|
|
6
7
|
const OverviewPage = () => {
|
|
7
8
|
const { t } = useTranslation();
|
|
8
9
|
return (
|
|
9
10
|
<>
|
|
10
11
|
<PageSection variant={PageSectionVariants.light}>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
<Flex gap={{ default: 'gapMd' }} alignItems={{ default: 'alignItemsCenter' }}>
|
|
13
|
+
<FlexItem>
|
|
14
|
+
<Title headingLevel="h1" size="3xl" role="heading">
|
|
15
|
+
{t('Overview')}
|
|
16
|
+
</Title>
|
|
17
|
+
</FlexItem>
|
|
18
|
+
<FlexItem>
|
|
19
|
+
<TechPreviewBadge />
|
|
20
|
+
</FlexItem>
|
|
21
|
+
</Flex>
|
|
14
22
|
</PageSection>
|
|
15
23
|
<PageSection variant={PageSectionVariants.light} isFilled>
|
|
16
24
|
<Overview />
|
|
@@ -14,7 +14,7 @@ const ResourceSyncsTab = ({ repositoryId }: { repositoryId: string }) => {
|
|
|
14
14
|
showLabel
|
|
15
15
|
ariaLabel={t('Resource syncs')}
|
|
16
16
|
content={t(
|
|
17
|
-
'
|
|
17
|
+
'Edge Manager will monitor the specified paths, import the defined fleets and synchronise devices',
|
|
18
18
|
)}
|
|
19
19
|
/>
|
|
20
20
|
</CardTitle>
|
|
@@ -35,9 +35,9 @@ export const useRepositories = (): [
|
|
|
35
35
|
unknown,
|
|
36
36
|
boolean,
|
|
37
37
|
VoidFunction,
|
|
38
|
-
Pick<PaginationDetails
|
|
38
|
+
Pick<PaginationDetails<RepositoryList>, 'currentPage' | 'setCurrentPage' | 'itemCount'>,
|
|
39
39
|
] => {
|
|
40
|
-
const { currentPage, setCurrentPage, itemCount, nextContinue, onPageFetched } = useTablePagination();
|
|
40
|
+
const { currentPage, setCurrentPage, itemCount, nextContinue, onPageFetched } = useTablePagination<RepositoryList>();
|
|
41
41
|
const [repoEndpoint, isDebouncing] = useRepositoriesEndpoint({ nextContinue });
|
|
42
42
|
|
|
43
43
|
const [repoList, isLoading, error, refetch] = useFetchPeriodically<RepositoryList>(
|
|
@@ -198,9 +198,9 @@ const RepositoryResourceSyncList = ({ repositoryId }: { repositoryId: string })
|
|
|
198
198
|
|
|
199
199
|
const { onRowSelect, hasSelectedRows, isAllSelected, isRowSelected, setAllSelected } = useTableSelect();
|
|
200
200
|
|
|
201
|
-
const { deleteAction, deleteModal } = useDeleteListAction({
|
|
201
|
+
const { action: deleteAction, modal: deleteModal } = useDeleteListAction({
|
|
202
202
|
resourceType: 'ResourceSync',
|
|
203
|
-
|
|
203
|
+
onConfirm: async (resourceId: string) => {
|
|
204
204
|
await remove(`resourcesyncs/${resourceId}`);
|
|
205
205
|
refetch();
|
|
206
206
|
},
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import disabledColor from '@patternfly/react-tokens/dist/js/global_disabled_color_100';
|
|
3
|
+
|
|
4
|
+
import { Device, DeviceLifecycleStatusType } from '@flightctl/types';
|
|
5
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
6
|
+
import { getDeviceLifecycleStatus, getDeviceLifecycleStatusItems } from '../../utils/status/devices';
|
|
7
|
+
import StatusDisplay, { StatusDisplayContent } from './StatusDisplay';
|
|
8
|
+
|
|
9
|
+
const DeviceLifecycleStatus = ({ device }: { device: Device }) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
|
|
12
|
+
const status = getDeviceLifecycleStatus(device);
|
|
13
|
+
const statusItems = getDeviceLifecycleStatusItems(t);
|
|
14
|
+
|
|
15
|
+
const item = statusItems.find((statusItem) => {
|
|
16
|
+
return statusItem.id === status;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
if (item?.id === DeviceLifecycleStatusType.DeviceLifecycleStatusDecommissioned) {
|
|
20
|
+
// TODO The decommissioned status appears as disabled. Could there be a message associated to it? It would look weird (disabled with a link)
|
|
21
|
+
return (
|
|
22
|
+
<StatusDisplayContent
|
|
23
|
+
level={item.level}
|
|
24
|
+
customIcon={item.customIcon}
|
|
25
|
+
label={<span style={{ color: disabledColor.value }}>{item.label}</span>}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return <StatusDisplay item={item} message={device.status?.lifecycle.info} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default DeviceLifecycleStatus;
|
|
@@ -9,7 +9,7 @@ import { useTranslation } from '../../hooks/useTranslation';
|
|
|
9
9
|
import './StatusDisplay.css';
|
|
10
10
|
|
|
11
11
|
type StatusLabelProps = {
|
|
12
|
-
label:
|
|
12
|
+
label: React.ReactNode;
|
|
13
13
|
message?: React.ReactNode;
|
|
14
14
|
messageTitle?: string;
|
|
15
15
|
level: StatusLevel;
|
|
@@ -17,7 +17,7 @@ type StatusLabelProps = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const StatusDisplayContent = ({ label, messageTitle, message, level, customIcon }: StatusLabelProps) => {
|
|
20
|
-
const
|
|
20
|
+
const iconStatus = level === 'unknown' ? undefined : level;
|
|
21
21
|
const IconComponent = customIcon || getDefaultStatusIcon(level);
|
|
22
22
|
|
|
23
23
|
if (message) {
|
|
@@ -34,7 +34,7 @@ export const StatusDisplayContent = ({ label, messageTitle, message, level, cust
|
|
|
34
34
|
isInline
|
|
35
35
|
icon={
|
|
36
36
|
<Icon
|
|
37
|
-
status={
|
|
37
|
+
status={iconStatus}
|
|
38
38
|
style={{ '--pf-v5-c-icon__content--Color': getDefaultStatusColor(level) } as React.CSSProperties}
|
|
39
39
|
>
|
|
40
40
|
<IconComponent />
|
|
@@ -51,7 +51,7 @@ export const StatusDisplayContent = ({ label, messageTitle, message, level, cust
|
|
|
51
51
|
<Flex className="ftcl_status-label">
|
|
52
52
|
<FlexItem>
|
|
53
53
|
<Icon
|
|
54
|
-
status={
|
|
54
|
+
status={iconStatus}
|
|
55
55
|
style={{ '--pf-v5-c-icon__content--Color': getDefaultStatusColor(level) } as React.CSSProperties}
|
|
56
56
|
>
|
|
57
57
|
<IconComponent />
|
|
@@ -65,6 +65,7 @@ const Table: TableFC = ({
|
|
|
65
65
|
<Tr>
|
|
66
66
|
{!emptyData && onSelectAll && (
|
|
67
67
|
<Th
|
|
68
|
+
aria-label={t('Select all rows')}
|
|
68
69
|
select={{
|
|
69
70
|
onSelect: (_event, isSelecting) => onSelectAll(isSelecting),
|
|
70
71
|
isSelected: !!isAllSelected,
|
|
@@ -72,7 +73,7 @@ const Table: TableFC = ({
|
|
|
72
73
|
/>
|
|
73
74
|
)}
|
|
74
75
|
{columns.map((c) => (
|
|
75
|
-
<Th key={c.name} {...c.thProps}>
|
|
76
|
+
<Th key={c.name} {...c.thProps} aria-label={c.name}>
|
|
76
77
|
{c.helperText ? (
|
|
77
78
|
<WithHelperText ariaLabel={c.name} showLabel content={c.helperText} triggerAction="hover" />
|
|
78
79
|
) : (
|
|
@@ -5,6 +5,7 @@ import { Pagination, PaginationVariant, Spinner } from '@patternfly/react-core';
|
|
|
5
5
|
import { PAGE_SIZE } from '../../constants';
|
|
6
6
|
import { PaginationDetails } from '../../hooks/useTablePagination';
|
|
7
7
|
import { useTranslation } from '../../hooks/useTranslation';
|
|
8
|
+
import { ApiList } from '../../utils/api';
|
|
8
9
|
|
|
9
10
|
const PaginationTemplate = ({
|
|
10
11
|
currentPage,
|
|
@@ -16,26 +17,27 @@ const PaginationTemplate = ({
|
|
|
16
17
|
isUpdating: boolean;
|
|
17
18
|
}) => {
|
|
18
19
|
const { t } = useTranslation();
|
|
19
|
-
const
|
|
20
|
+
const pagesCount = Math.ceil((itemCount || 0) / PAGE_SIZE);
|
|
20
21
|
|
|
21
|
-
const
|
|
22
|
+
const page = String(currentPage <= pagesCount ? currentPage : 0);
|
|
23
|
+
const totalPages = String(pagesCount);
|
|
22
24
|
return (
|
|
23
25
|
<>
|
|
24
26
|
{isUpdating && <Spinner size="sm" />}{' '}
|
|
25
27
|
<Trans t={t}>
|
|
26
|
-
{
|
|
28
|
+
{page} of <strong>{totalPages}</strong>
|
|
27
29
|
</Trans>
|
|
28
30
|
</>
|
|
29
31
|
);
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
function TablePagination<T extends ApiList>({
|
|
33
35
|
isUpdating,
|
|
34
36
|
pagination,
|
|
35
37
|
}: {
|
|
36
|
-
pagination: Pick<PaginationDetails
|
|
38
|
+
pagination: Pick<PaginationDetails<T>, 'currentPage' | 'setCurrentPage' | 'itemCount'>;
|
|
37
39
|
isUpdating: boolean;
|
|
38
|
-
})
|
|
40
|
+
}) {
|
|
39
41
|
const { t } = useTranslation();
|
|
40
42
|
const { itemCount, currentPage, setCurrentPage } = pagination;
|
|
41
43
|
|
|
@@ -69,6 +71,6 @@ const TablePagination = ({
|
|
|
69
71
|
onSetPage={onSetPage}
|
|
70
72
|
/>
|
|
71
73
|
);
|
|
72
|
-
}
|
|
74
|
+
}
|
|
73
75
|
|
|
74
76
|
export default TablePagination;
|
|
@@ -16,16 +16,14 @@ const EditableLabelControl = ({
|
|
|
16
16
|
onAddLabel,
|
|
17
17
|
isEditable = true,
|
|
18
18
|
}: EditableLabelControlProps) => {
|
|
19
|
-
const [isEditing, setIsEditing] = React.useState<boolean>();
|
|
19
|
+
const [isEditing, setIsEditing] = React.useState<boolean>(false);
|
|
20
20
|
const [label, setLabel] = React.useState<string>('');
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
|
|
23
23
|
const onConfirmAdd = () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
setLabel('');
|
|
28
|
-
}
|
|
24
|
+
onAddLabel(label);
|
|
25
|
+
setIsEditing(false);
|
|
26
|
+
setLabel('');
|
|
29
27
|
};
|
|
30
28
|
|
|
31
29
|
const onDiscardAdd = () => {
|
|
@@ -54,7 +52,10 @@ const EditableLabelControl = ({
|
|
|
54
52
|
/>
|
|
55
53
|
) : (
|
|
56
54
|
<Button
|
|
55
|
+
aria-label={addButtonText || t('Add label')}
|
|
57
56
|
variant="link"
|
|
57
|
+
className="pf-v5-u-ml-xs"
|
|
58
|
+
isInline
|
|
58
59
|
isDisabled={!isEditable}
|
|
59
60
|
onClick={() => {
|
|
60
61
|
setIsEditing(true);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Label, Popover, Stack, StackItem } from '@patternfly/react-core';
|
|
3
|
+
import { InfoCircleIcon } from '@patternfly/react-icons/dist/js/icons';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
6
|
+
import LearnMoreLink from './LearnMoreLink';
|
|
7
|
+
import { TECH_PREVIEW_LEVEL_LINK } from '../../links';
|
|
8
|
+
|
|
9
|
+
const TechPreviewPopoverContent = () => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Stack>
|
|
14
|
+
<StackItem>
|
|
15
|
+
{t(
|
|
16
|
+
'Technology preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process.',
|
|
17
|
+
)}
|
|
18
|
+
</StackItem>
|
|
19
|
+
<StackItem>
|
|
20
|
+
<LearnMoreLink link={TECH_PREVIEW_LEVEL_LINK} />
|
|
21
|
+
</StackItem>
|
|
22
|
+
</Stack>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const TechPreviewBadge = () => {
|
|
27
|
+
const { t } = useTranslation();
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Popover
|
|
31
|
+
aria-label={t('Technology preview description')}
|
|
32
|
+
bodyContent={<TechPreviewPopoverContent />}
|
|
33
|
+
withFocusTrap
|
|
34
|
+
triggerAction="click"
|
|
35
|
+
>
|
|
36
|
+
<Label color="orange" icon={<InfoCircleIcon />}>
|
|
37
|
+
{t('Technology preview')}
|
|
38
|
+
</Label>
|
|
39
|
+
</Popover>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default TechPreviewBadge;
|