@flightctl/ui-components 0.10.0-rc7 → 1.0.0-rc1
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/AuthProvider/AuthProviderDetails/AuthProviderDetails.d.ts +4 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.js +57 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.js.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.d.ts +7 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.js +118 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.js.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.d.ts +9 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.js +55 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.js.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.d.ts +7 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.js +35 -0
- package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.js.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderRow.d.ts +8 -0
- package/dist/src/components/AuthProvider/AuthProviderRow.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/AuthProviderRow.js +67 -0
- package/dist/src/components/AuthProvider/AuthProviderRow.js.map +1 -0
- package/dist/src/components/AuthProvider/AuthProvidersPage.d.ts +4 -0
- package/dist/src/components/AuthProvider/AuthProvidersPage.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/AuthProvidersPage.js +90 -0
- package/dist/src/components/AuthProvider/AuthProvidersPage.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.d.ts +4 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.js +39 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.d.ts +6 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.js +87 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.d.ts +4 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.js +94 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.d.ts +13 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.js +161 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.d.ts +4 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.js +19 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.d.ts +4 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.js +71 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/types.d.ts +57 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/types.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/types.js +33 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/types.js.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/utils.d.ts +15 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/utils.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/utils.js +466 -0
- package/dist/src/components/AuthProvider/CreateAuthProvider/utils.js.map +1 -0
- package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.d.ts +9 -0
- package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.js +67 -0
- package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.js.map +1 -0
- package/dist/src/components/AuthProvider/useAuthProviders.d.ts +8 -0
- package/dist/src/components/AuthProvider/useAuthProviders.d.ts.map +1 -0
- package/dist/src/components/AuthProvider/useAuthProviders.js +19 -0
- package/dist/src/components/AuthProvider/useAuthProviders.js.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts +1 -1
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.js +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts +1 -7
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +26 -81
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.js +67 -0
- package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts +1 -3
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +5 -49
- 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 +15 -9
- 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 +5 -2
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.d.ts +8 -0
- package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.js +19 -0
- package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +3 -2
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +7 -3
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.js +3 -2
- package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +9 -15
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +8 -4
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +4 -3
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +2 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +230 -54
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.css +5 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.js +169 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.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 +95 -37
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.d.ts +11 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.js +99 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +6 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +21 -10
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +41 -3
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.js +5 -2
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +9 -4
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts +1 -3
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +8 -9
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +10 -5
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js +2 -5
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.js +11 -6
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetYaml.d.ts +9 -0
- package/dist/src/components/Fleet/FleetDetails/FleetYaml.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetYaml.js +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetYaml.js.map +1 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetResourceSyncs.js +3 -2
- package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.js +22 -13
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js +9 -2
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +3 -2
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
- package/dist/src/components/ListPage/ListPage.d.ts +0 -1
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -1
- package/dist/src/components/ListPage/ListPage.js +2 -5
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/Login/ProviderSelector.d.ts +11 -0
- package/dist/src/components/Login/ProviderSelector.d.ts.map +1 -0
- package/dist/src/components/Login/ProviderSelector.js +66 -0
- package/dist/src/components/Login/ProviderSelector.js.map +1 -0
- package/dist/src/components/Login/TokenLoginForm.d.ts +9 -0
- package/dist/src/components/Login/TokenLoginForm.d.ts.map +1 -0
- package/dist/src/components/Login/TokenLoginForm.js +107 -0
- package/dist/src/components/Login/TokenLoginForm.js.map +1 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts.map +1 -1
- package/dist/src/components/Masthead/CommandLineToolsPage.js +1 -6
- package/dist/src/components/Masthead/CommandLineToolsPage.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Alerts/AlertsCard.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Alerts/AlertsCard.js +2 -0
- package/dist/src/components/OverviewPage/Cards/Alerts/AlertsCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Overview.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Overview.js +8 -4
- package/dist/src/components/OverviewPage/Overview.js.map +1 -1
- package/dist/src/components/OverviewPage/OverviewPage.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/OverviewPage.js +3 -8
- package/dist/src/components/OverviewPage/OverviewPage.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js +3 -2
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +3 -2
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +11 -6
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryList.js +11 -5
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +7 -3
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/common/CodeEditor/YamlEditor.d.ts +7 -5
- package/dist/src/components/common/CodeEditor/YamlEditor.d.ts.map +1 -1
- package/dist/src/components/common/CodeEditor/YamlEditor.js +142 -10
- package/dist/src/components/common/CodeEditor/YamlEditor.js.map +1 -1
- package/dist/src/components/common/CodeEditor/YamlEditorBase.d.ts +7 -1
- package/dist/src/components/common/CodeEditor/YamlEditorBase.d.ts.map +1 -1
- package/dist/src/components/common/CodeEditor/YamlEditorBase.js +16 -8
- package/dist/src/components/common/CodeEditor/YamlEditorBase.js.map +1 -1
- package/dist/src/components/common/OrganizationGuard.d.ts.map +1 -1
- package/dist/src/components/common/OrganizationGuard.js +11 -19
- package/dist/src/components/common/OrganizationGuard.js.map +1 -1
- package/dist/src/components/common/PageNavigation.css +9 -0
- package/dist/src/components/common/PageNavigation.d.ts +4 -1
- package/dist/src/components/common/PageNavigation.d.ts.map +1 -1
- package/dist/src/components/common/PageNavigation.js +25 -10
- package/dist/src/components/common/PageNavigation.js.map +1 -1
- package/dist/src/components/common/PermissionsContext.d.ts +14 -0
- package/dist/src/components/common/PermissionsContext.d.ts.map +1 -0
- package/dist/src/components/common/PermissionsContext.js +84 -0
- package/dist/src/components/common/PermissionsContext.js.map +1 -0
- package/dist/src/components/form/FilterSelect.d.ts.map +1 -1
- package/dist/src/components/form/FilterSelect.js +1 -1
- package/dist/src/components/form/FilterSelect.js.map +1 -1
- package/dist/src/components/form/FormSelect.d.ts.map +1 -1
- package/dist/src/components/form/FormSelect.js +1 -1
- package/dist/src/components/form/FormSelect.js.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.js +84 -4
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -1
- package/dist/src/components/form/ListItemField.d.ts +12 -0
- package/dist/src/components/form/ListItemField.d.ts.map +1 -0
- package/dist/src/components/form/ListItemField.js +67 -0
- package/dist/src/components/form/ListItemField.js.map +1 -0
- package/dist/src/components/form/NameField.d.ts +1 -1
- package/dist/src/components/form/NameField.d.ts.map +1 -1
- package/dist/src/components/form/NameField.js +4 -2
- package/dist/src/components/form/NameField.js.map +1 -1
- package/dist/src/components/form/SwitchField.d.ts +2 -1
- package/dist/src/components/form/SwitchField.d.ts.map +1 -1
- package/dist/src/components/form/SwitchField.js +2 -2
- package/dist/src/components/form/SwitchField.js.map +1 -1
- package/dist/src/components/form/validations.d.ts +50 -4
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +332 -41
- package/dist/src/components/form/validations.js.map +1 -1
- 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/useAlertsEnabled.d.ts.map +1 -1
- package/dist/src/hooks/useAlertsEnabled.js +10 -4
- package/dist/src/hooks/useAlertsEnabled.js.map +1 -1
- package/dist/src/hooks/useAppContext.d.ts +4 -2
- package/dist/src/hooks/useAppContext.d.ts.map +1 -1
- package/dist/src/hooks/useAppContext.js +4 -1
- package/dist/src/hooks/useAppContext.js.map +1 -1
- package/dist/src/hooks/useFetch.d.ts +0 -1
- package/dist/src/hooks/useFetch.d.ts.map +1 -1
- package/dist/src/hooks/useNavigate.d.ts +6 -2
- package/dist/src/hooks/useNavigate.d.ts.map +1 -1
- package/dist/src/hooks/useNavigate.js +4 -0
- package/dist/src/hooks/useNavigate.js.map +1 -1
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.d.ts.map +1 -1
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.js +9 -1
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.js.map +1 -1
- package/dist/src/hooks/useSystemRestoreContext.d.ts.map +1 -1
- package/dist/src/hooks/useSystemRestoreContext.js +3 -2
- package/dist/src/hooks/useSystemRestoreContext.js.map +1 -1
- package/dist/src/types/deviceSpec.d.ts +56 -15
- package/dist/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/src/types/deviceSpec.js +23 -8
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +14 -2
- package/dist/src/types/extraTypes.d.ts.map +1 -1
- package/dist/src/types/extraTypes.js +11 -1
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/types/rbac.d.ts +2 -1
- package/dist/src/types/rbac.d.ts.map +1 -1
- package/dist/src/types/rbac.js +1 -0
- package/dist/src/types/rbac.js.map +1 -1
- package/dist/src/utils/authProvider.d.ts +4 -0
- package/dist/src/utils/authProvider.d.ts.map +1 -0
- package/dist/src/utils/authProvider.js +22 -0
- package/dist/src/utils/authProvider.js.map +1 -0
- package/dist/src/utils/error.d.ts +1 -0
- package/dist/src/utils/error.d.ts.map +1 -1
- package/dist/src/utils/error.js +6 -1
- package/dist/src/utils/error.js.map +1 -1
- package/dist/src/utils/k8sProvider.d.ts +3 -0
- package/dist/src/utils/k8sProvider.d.ts.map +1 -0
- package/dist/src/utils/k8sProvider.js +18 -0
- package/dist/src/utils/k8sProvider.js.map +1 -0
- package/dist/src/utils/patch.d.ts.map +1 -1
- package/dist/src/utils/patch.js +3 -1
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/status/applications.d.ts.map +1 -1
- package/dist/src/utils/status/applications.js +7 -0
- package/dist/src/utils/status/applications.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.tsx +111 -0
- package/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.tsx +239 -0
- package/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.tsx +95 -0
- package/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.tsx +53 -0
- package/src/components/AuthProvider/AuthProviderRow.tsx +84 -0
- package/src/components/AuthProvider/AuthProvidersPage.tsx +168 -0
- package/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.tsx +102 -0
- package/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.tsx +78 -0
- package/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.tsx +145 -0
- package/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.tsx +284 -0
- package/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.tsx +24 -0
- package/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.tsx +165 -0
- package/src/components/AuthProvider/CreateAuthProvider/types.ts +96 -0
- package/src/components/AuthProvider/CreateAuthProvider/utils.ts +557 -0
- package/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.tsx +136 -0
- package/src/components/AuthProvider/useAuthProviders.ts +18 -0
- package/src/components/DetailsPage/DetailsPage.tsx +1 -1
- package/src/components/DetailsPage/DetailsPageActions.tsx +2 -0
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +29 -132
- package/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx +98 -0
- package/src/components/Device/DeviceDetails/DeviceApplications.tsx +3 -73
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +19 -9
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +6 -2
- package/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx +30 -0
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +3 -2
- package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +8 -3
- package/src/components/Device/DevicesPage/DevicesEmptyStates.tsx +3 -2
- package/src/components/Device/DevicesPage/DevicesPage.tsx +9 -15
- package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +9 -4
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +10 -4
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +291 -59
- package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.css +5 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.tsx +319 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +2 -2
- package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +3 -3
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +186 -80
- package/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.tsx +202 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +6 -4
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +26 -10
- package/src/components/Device/EditDeviceWizard/utils.ts +15 -1
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +10 -4
- package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +9 -13
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +11 -8
- package/src/components/Fleet/CreateFleet/utils.ts +2 -4
- package/src/components/Fleet/FleetDetails/FleetDetailsPage.tsx +11 -6
- package/src/components/Fleet/FleetDetails/FleetYaml.tsx +13 -0
- package/src/components/Fleet/FleetResourceSyncs.tsx +3 -2
- package/src/components/Fleet/FleetsPage.tsx +34 -27
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.tsx +10 -2
- package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +3 -2
- package/src/components/ListPage/ListPage.tsx +1 -8
- package/src/components/Login/ProviderSelector.tsx +114 -0
- package/src/components/Login/TokenLoginForm.tsx +202 -0
- package/src/components/Masthead/CommandLineToolsPage.tsx +1 -11
- package/src/components/OverviewPage/Cards/Alerts/AlertsCard.tsx +2 -0
- package/src/components/OverviewPage/Overview.tsx +9 -4
- package/src/components/OverviewPage/OverviewPage.tsx +6 -13
- package/src/components/Repository/CreateRepository/CreateRepository.tsx +3 -2
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +3 -2
- package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +11 -9
- package/src/components/Repository/RepositoryList.tsx +11 -5
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +8 -3
- package/src/components/common/CodeEditor/YamlEditor.tsx +195 -15
- package/src/components/common/CodeEditor/YamlEditorBase.tsx +42 -8
- package/src/components/common/OrganizationGuard.tsx +13 -22
- package/src/components/common/PageNavigation.css +9 -0
- package/src/components/common/PageNavigation.tsx +42 -14
- package/src/components/common/PermissionsContext.tsx +108 -0
- package/src/components/form/FilterSelect.tsx +2 -0
- package/src/components/form/FormSelect.tsx +2 -0
- package/src/components/form/FormSelectTypeahead.tsx +97 -4
- package/src/components/form/ListItemField.tsx +123 -0
- package/src/components/form/NameField.tsx +3 -1
- package/src/components/form/SwitchField.tsx +3 -2
- package/src/components/form/validations.ts +413 -64
- package/src/constants.ts +1 -1
- package/src/hooks/useAlertsEnabled.ts +10 -5
- package/src/hooks/useAppContext.tsx +4 -3
- package/src/hooks/useNavigate.tsx +7 -1
- package/src/hooks/usePendingEnrollmentRequestsCount.ts +13 -1
- package/src/hooks/useSystemRestoreContext.tsx +3 -2
- package/src/types/deviceSpec.ts +78 -21
- package/src/types/extraTypes.ts +19 -1
- package/src/types/rbac.ts +1 -0
- package/src/utils/authProvider.ts +20 -0
- package/src/utils/error.ts +5 -0
- package/src/utils/k8sProvider.ts +11 -0
- package/src/utils/patch.ts +3 -1
- package/src/utils/status/applications.ts +7 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.css +0 -7
- package/dist/src/components/common/ButtonWithPermissions.d.ts +0 -8
- package/dist/src/components/common/ButtonWithPermissions.d.ts.map +0 -1
- package/dist/src/components/common/ButtonWithPermissions.js +0 -12
- package/dist/src/components/common/ButtonWithPermissions.js.map +0 -1
- package/dist/src/components/common/TechPreviewBadge.d.ts +0 -4
- package/dist/src/components/common/TechPreviewBadge.d.ts.map +0 -1
- package/dist/src/components/common/TechPreviewBadge.js +0 -24
- package/dist/src/components/common/TechPreviewBadge.js.map +0 -1
- package/dist/src/hooks/useAccessReview.d.ts +0 -4
- package/dist/src/hooks/useAccessReview.d.ts.map +0 -1
- package/dist/src/hooks/useAccessReview.js +0 -46
- package/dist/src/hooks/useAccessReview.js.map +0 -1
- package/dist/src/hooks/useFleetImportAccessReview.d.ts +0 -3
- package/dist/src/hooks/useFleetImportAccessReview.d.ts.map +0 -1
- package/dist/src/hooks/useFleetImportAccessReview.js +0 -12
- package/dist/src/hooks/useFleetImportAccessReview.js.map +0 -1
- package/src/components/DetailsPage/Tables/ApplicationsTable.css +0 -7
- package/src/components/common/ButtonWithPermissions.tsx +0 -14
- package/src/components/common/TechPreviewBadge.tsx +0 -45
- package/src/hooks/useAccessReview.ts +0 -49
- package/src/hooks/useFleetImportAccessReview.ts +0 -8
|
@@ -26,7 +26,7 @@ export type DetailsPageProps = {
|
|
|
26
26
|
children: React.ReactNode;
|
|
27
27
|
error: unknown;
|
|
28
28
|
loading: boolean;
|
|
29
|
-
resourceType: 'Fleets' | 'Devices' | 'Repositories' | 'Enrollment requests';
|
|
29
|
+
resourceType: 'Fleets' | 'Devices' | 'Repositories' | 'Enrollment requests' | 'Authentication providers';
|
|
30
30
|
resourceTypeLabel: string;
|
|
31
31
|
resourceLink: Route;
|
|
32
32
|
actions?: React.ReactNode;
|
|
@@ -127,6 +127,8 @@ const DetailsPageActions = ({ children }: React.PropsWithChildren) => {
|
|
|
127
127
|
onSelect={() => setActionsOpen(false)}
|
|
128
128
|
onOpenChange={(isOpen: boolean) => setActionsOpen(isOpen)}
|
|
129
129
|
popperProps={{ position: 'left', preventOverflow: true }}
|
|
130
|
+
shouldFocusToggleOnSelect
|
|
131
|
+
shouldFocusFirstItemOnOpen
|
|
130
132
|
toggle={(toggleRef) => (
|
|
131
133
|
<MenuToggle
|
|
132
134
|
ref={toggleRef}
|
|
@@ -1,74 +1,40 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Bullseye,
|
|
2
|
+
import { Bullseye, Label } from '@patternfly/react-core';
|
|
3
3
|
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
4
|
-
import MinusCircleIcon from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
|
|
5
4
|
|
|
6
5
|
import { DeviceApplicationStatus } from '@flightctl/types';
|
|
7
6
|
import { useTranslation } from '../../../hooks/useTranslation';
|
|
8
7
|
import ApplicationStatus from '../../Status/ApplicationStatus';
|
|
9
|
-
import WithTooltip from '../../common/WithTooltip';
|
|
10
|
-
|
|
11
|
-
import './ApplicationsTable.css';
|
|
12
8
|
|
|
13
9
|
type ApplicationsTableProps = {
|
|
14
|
-
// Contains the statuses of all detected applications
|
|
10
|
+
// Contains the statuses of all detected applications
|
|
15
11
|
appsStatus: DeviceApplicationStatus[];
|
|
16
12
|
// List of apps as defined the device / fleet spec
|
|
17
13
|
specApps: string[];
|
|
18
|
-
// List of systemd units as defined in the device / fleet spec
|
|
19
|
-
specSystemdUnits: string[];
|
|
20
|
-
// Map: (systemdUnitName, timeItWasAdded)
|
|
21
|
-
addedSystemdUnitDates: Record<string, number>;
|
|
22
|
-
onSystemdDelete?: (deletedUnit: string) => void;
|
|
23
|
-
isUpdating: boolean;
|
|
24
|
-
canEdit: boolean;
|
|
25
14
|
};
|
|
26
15
|
|
|
27
|
-
const
|
|
16
|
+
const emptyAppDetails: Partial<DeviceApplicationStatus> = {
|
|
17
|
+
name: '',
|
|
18
|
+
ready: '-',
|
|
19
|
+
restarts: 0,
|
|
20
|
+
embedded: false,
|
|
21
|
+
};
|
|
28
22
|
|
|
29
|
-
const ApplicationsTable = ({
|
|
30
|
-
appsStatus,
|
|
31
|
-
specApps,
|
|
32
|
-
specSystemdUnits,
|
|
33
|
-
addedSystemdUnitDates,
|
|
34
|
-
onSystemdDelete,
|
|
35
|
-
isUpdating,
|
|
36
|
-
canEdit,
|
|
37
|
-
}: ApplicationsTableProps) => {
|
|
23
|
+
const ApplicationsTable = ({ appsStatus, specApps }: ApplicationsTableProps) => {
|
|
38
24
|
const { t } = useTranslation();
|
|
39
25
|
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
const [deletedSystemdUnits, setDeletedSystemdUnits] = React.useState<string[]>([]);
|
|
43
|
-
|
|
44
|
-
React.useEffect(() => {
|
|
45
|
-
// Remove a service from the deleted list if it was added back later
|
|
46
|
-
const filtered = deletedSystemdUnits.filter((deletedUnit) => {
|
|
47
|
-
if (addedSystemdUnitDates[deletedUnit]) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
});
|
|
52
|
-
if (filtered.length < deletedSystemdUnits.length) {
|
|
53
|
-
setDeletedSystemdUnits(filtered);
|
|
54
|
-
}
|
|
55
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
|
-
}, [addedSystemdUnitDates]);
|
|
57
|
-
|
|
58
|
-
const appsAndSystemdUnits: string[] = [];
|
|
26
|
+
// Includes applications already reported in status as well as those that are only in the spec yet
|
|
27
|
+
const allAppNames: string[] = [];
|
|
59
28
|
specApps.forEach((app) => {
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
specSystemdUnits.forEach((systemdUnit) => {
|
|
63
|
-
appsAndSystemdUnits.push(systemdUnit);
|
|
29
|
+
allAppNames.push(app);
|
|
64
30
|
});
|
|
65
31
|
appsStatus.forEach((appStatus) => {
|
|
66
|
-
if (!
|
|
67
|
-
|
|
32
|
+
if (!allAppNames.includes(appStatus.name)) {
|
|
33
|
+
allAppNames.push(appStatus.name);
|
|
68
34
|
}
|
|
69
35
|
});
|
|
70
36
|
|
|
71
|
-
return
|
|
37
|
+
return allAppNames.length ? (
|
|
72
38
|
<Table aria-label={t('Device applications table')}>
|
|
73
39
|
<Thead>
|
|
74
40
|
<Tr>
|
|
@@ -77,100 +43,31 @@ const ApplicationsTable = ({
|
|
|
77
43
|
<Th modifier="wrap">{t('Ready')}</Th>
|
|
78
44
|
<Th modifier="wrap">{t('Restarts')}</Th>
|
|
79
45
|
<Th modifier="wrap">{t('Type')}</Th>
|
|
46
|
+
<Th modifier="wrap">{t('Embedded')}</Th>
|
|
80
47
|
</Tr>
|
|
81
48
|
</Thead>
|
|
82
49
|
<Tbody>
|
|
83
|
-
{
|
|
84
|
-
const appDetails = appsStatus.find((app) => app.name === appName);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const deleteSystemdUnit = canEdit && !isDeletedSystemdUnit && onSystemdDelete && (
|
|
92
|
-
<Button
|
|
93
|
-
aria-label={t('Delete system service')}
|
|
94
|
-
isDisabled={isUpdating}
|
|
95
|
-
variant="plain"
|
|
96
|
-
icon={<MinusCircleIcon />}
|
|
97
|
-
onClick={() => {
|
|
98
|
-
setDeletedSystemdUnits(deletedSystemdUnits.concat(appName));
|
|
99
|
-
onSystemdDelete(appName);
|
|
100
|
-
}}
|
|
101
|
-
/>
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
if (!appDetails) {
|
|
105
|
-
// It's an app or a systemd unit which has not been reported yet
|
|
106
|
-
const appAddedTime = addedSystemdUnitDates[appName] || 0;
|
|
107
|
-
// For apps there is no spinner since we don't know when the app was added to the spec
|
|
108
|
-
const showSpinner = !isApp && Date.now() - appAddedTime < DELETE_SYSTED_TIMEOUT;
|
|
109
|
-
return (
|
|
110
|
-
<Tr key={appName} className="applications-table__row">
|
|
111
|
-
<Td dataLabel={t('Name')}>{appName}</Td>
|
|
112
|
-
|
|
113
|
-
<Td dataLabel={t('Status')} colSpan={showSpinner ? 3 : 1}>
|
|
114
|
-
{showSpinner ? (
|
|
115
|
-
<>
|
|
116
|
-
<Spinner size="sm" /> {t('Waiting for service to be reported...')}
|
|
117
|
-
</>
|
|
118
|
-
) : (
|
|
119
|
-
'-'
|
|
120
|
-
)}
|
|
121
|
-
</Td>
|
|
122
|
-
{!showSpinner && <Td dataLabel={t('Ready')}>-</Td>}
|
|
123
|
-
{!showSpinner && <Td dataLabel={t('Restarts')}>-</Td>}
|
|
124
|
-
<Td dataLabel={t('Type')}>
|
|
125
|
-
{isApp ? (
|
|
126
|
-
<>{t('App')}</>
|
|
127
|
-
) : (
|
|
128
|
-
<>
|
|
129
|
-
{t('Systemd')} {deleteSystemdUnit}
|
|
130
|
-
</>
|
|
131
|
-
)}
|
|
132
|
-
</Td>
|
|
133
|
-
</Tr>
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
let typeColumnContent: React.ReactNode;
|
|
138
|
-
|
|
139
|
-
if (isApp) {
|
|
140
|
-
typeColumnContent = t('App');
|
|
141
|
-
} else if (onSystemdDelete) {
|
|
142
|
-
let extraContent: React.ReactNode;
|
|
143
|
-
if (isDeletedSystemdUnit) {
|
|
144
|
-
extraContent = (
|
|
145
|
-
<WithTooltip
|
|
146
|
-
showTooltip
|
|
147
|
-
content={t('{{ appName }} is being removed, this may take some time.', { appName })}
|
|
148
|
-
>
|
|
149
|
-
<Spinner size="sm" />
|
|
150
|
-
</WithTooltip>
|
|
151
|
-
);
|
|
152
|
-
} else {
|
|
153
|
-
extraContent = deleteSystemdUnit;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
typeColumnContent = (
|
|
157
|
-
<>
|
|
158
|
-
{t('Systemd')} {extraContent}
|
|
159
|
-
</>
|
|
160
|
-
);
|
|
161
|
-
} else {
|
|
162
|
-
typeColumnContent = t('Systemd');
|
|
50
|
+
{allAppNames.map((appName) => {
|
|
51
|
+
const appDetails = appsStatus.find((app) => app.name === appName) || emptyAppDetails;
|
|
52
|
+
let embedded = '-';
|
|
53
|
+
if (appDetails.embedded === true) {
|
|
54
|
+
embedded = t('Yes');
|
|
55
|
+
} else if (appDetails.embedded === false) {
|
|
56
|
+
embedded = t('No');
|
|
163
57
|
}
|
|
164
58
|
|
|
165
59
|
return (
|
|
166
|
-
<Tr key={appName}
|
|
60
|
+
<Tr key={appName}>
|
|
167
61
|
<Td dataLabel={t('Name')}>{appName}</Td>
|
|
168
62
|
<Td dataLabel={t('Status')}>
|
|
169
|
-
<ApplicationStatus status={appDetails.status} />
|
|
63
|
+
{appDetails.status ? <ApplicationStatus status={appDetails.status} /> : '-'}
|
|
170
64
|
</Td>
|
|
171
65
|
<Td dataLabel={t('Ready')}>{appDetails.ready}</Td>
|
|
172
66
|
<Td dataLabel={t('Restarts')}>{appDetails.restarts}</Td>
|
|
173
|
-
<Td dataLabel={t('Type')}>
|
|
67
|
+
<Td dataLabel={t('Type')}>
|
|
68
|
+
{appDetails.appType ? <Label variant="outline">{appDetails.appType}</Label> : '-'}
|
|
69
|
+
</Td>
|
|
70
|
+
<Td dataLabel={t('Embedded')}>{embedded}</Td>
|
|
174
71
|
</Tr>
|
|
175
72
|
);
|
|
176
73
|
})}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Bullseye, EmptyState, EmptyStateBody, EmptyStateVariant, Label } from '@patternfly/react-core';
|
|
3
|
+
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
4
|
+
import { CogIcon } from '@patternfly/react-icons/dist/js/icons/cog-icon';
|
|
5
|
+
import { ClockIcon } from '@patternfly/react-icons/dist/js/icons/clock-icon';
|
|
6
|
+
|
|
7
|
+
import { SystemdUnitStatus } from '@flightctl/types';
|
|
8
|
+
import FolderIcon from '@patternfly/react-icons/dist/js/icons/folder-icon';
|
|
9
|
+
import { DatabaseIcon } from '@patternfly/react-icons/dist/js/icons/database-icon';
|
|
10
|
+
import { NetworkIcon } from '@patternfly/react-icons/dist/js/icons/network-icon';
|
|
11
|
+
import { ConnectedIcon } from '@patternfly/react-icons/dist/js/icons/connected-icon';
|
|
12
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
13
|
+
|
|
14
|
+
const unitTypeIconMap: Record<string, React.ComponentType<{ className?: string }>> = {
|
|
15
|
+
service: CogIcon,
|
|
16
|
+
timer: ClockIcon,
|
|
17
|
+
socket: ConnectedIcon,
|
|
18
|
+
target: NetworkIcon,
|
|
19
|
+
mount: DatabaseIcon,
|
|
20
|
+
path: FolderIcon,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const SystemdUnitStatusIcon = ({ unitName }: { unitName: string }) => {
|
|
24
|
+
const unitType = unitName.split('.').pop();
|
|
25
|
+
const IconComponent = unitType ? unitTypeIconMap[unitType] : null;
|
|
26
|
+
|
|
27
|
+
if (!IconComponent) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return <IconComponent className="pf-v5-u-mr-xs" />;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type SystemdUnitsTableProps = {
|
|
35
|
+
systemdUnitsStatus: SystemdUnitStatus[];
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const SystemdUnitRow = ({ unitStatus }: { unitStatus: SystemdUnitStatus }) => {
|
|
39
|
+
const { t } = useTranslation();
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Tr key={unitStatus.unit}>
|
|
43
|
+
<Td dataLabel={t('Name')}>
|
|
44
|
+
<SystemdUnitStatusIcon unitName={unitStatus.unit} /> {unitStatus.unit}
|
|
45
|
+
</Td>
|
|
46
|
+
<Td dataLabel={t('Enable')}>
|
|
47
|
+
<Label color="blue" variant="outline">
|
|
48
|
+
{unitStatus.enableState}
|
|
49
|
+
</Label>
|
|
50
|
+
</Td>
|
|
51
|
+
<Td dataLabel={t('Load state')}>
|
|
52
|
+
<Label color="blue" variant="outline">
|
|
53
|
+
{unitStatus.loadState}
|
|
54
|
+
</Label>
|
|
55
|
+
</Td>
|
|
56
|
+
<Td dataLabel={t('Status')}>
|
|
57
|
+
<Label color="blue" variant="outline">
|
|
58
|
+
{unitStatus.activeState} {unitStatus.subState && `(${unitStatus.subState})`}
|
|
59
|
+
</Label>
|
|
60
|
+
</Td>
|
|
61
|
+
</Tr>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Contrary to applications, we don't show the matchPatterns that were defined in the device spec.
|
|
66
|
+
// Since these may contain glob patterns, etc, we can't reliably translate the patterns to a list of units.
|
|
67
|
+
const SystemdUnitsTable = ({ systemdUnitsStatus }: SystemdUnitsTableProps) => {
|
|
68
|
+
const { t } = useTranslation();
|
|
69
|
+
|
|
70
|
+
return systemdUnitsStatus.length ? (
|
|
71
|
+
<Table aria-label={t('System services table')}>
|
|
72
|
+
<Thead>
|
|
73
|
+
<Tr>
|
|
74
|
+
<Th>{t('Name')}</Th>
|
|
75
|
+
<Th modifier="wrap">{t('Enable')}</Th>
|
|
76
|
+
<Th modifier="wrap">{t('Load state')}</Th>
|
|
77
|
+
<Th modifier="wrap">{t('Status')}</Th>
|
|
78
|
+
</Tr>
|
|
79
|
+
</Thead>
|
|
80
|
+
<Tbody>
|
|
81
|
+
{systemdUnitsStatus.map((unitStatus) => {
|
|
82
|
+
return <SystemdUnitRow key={unitStatus.unit} unitStatus={unitStatus} />;
|
|
83
|
+
})}
|
|
84
|
+
</Tbody>
|
|
85
|
+
</Table>
|
|
86
|
+
) : (
|
|
87
|
+
<Bullseye>
|
|
88
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
|
89
|
+
<EmptyStateBody>
|
|
90
|
+
<p>{t('No system services found')}</p>
|
|
91
|
+
<p className="pf-v5-u-font-size-sm">{t('System services can be configured via the device specification')}</p>
|
|
92
|
+
</EmptyStateBody>
|
|
93
|
+
</EmptyState>
|
|
94
|
+
</Bullseye>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default SystemdUnitsTable;
|
|
@@ -1,46 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CardTitle, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
4
|
import { Device } from '@flightctl/types';
|
|
5
5
|
import { useTranslation } from '../../../hooks/useTranslation';
|
|
6
|
-
import { useFetch } from '../../../hooks/useFetch';
|
|
7
|
-
import { getStringListPatches } from '../../../utils/patch';
|
|
8
|
-
import { getDeviceFleet } from '../../../utils/devices';
|
|
9
|
-
import SystemdUnitsModal from '../SystemdUnitsModal/SystemdUnitsModal';
|
|
10
6
|
import ApplicationsTable from '../../DetailsPage/Tables/ApplicationsTable';
|
|
11
7
|
import DetailsPageCard, { DetailsPageCardBody } from '../../DetailsPage/DetailsPageCard';
|
|
12
8
|
import { isImageAppProvider } from '../../../types/deviceSpec';
|
|
13
9
|
|
|
14
10
|
type DeviceDetailsTabProps = {
|
|
15
11
|
device: Required<Device>;
|
|
16
|
-
canEdit: boolean;
|
|
17
|
-
refetch?: VoidFunction;
|
|
18
12
|
};
|
|
19
13
|
|
|
20
|
-
const DeviceApplications = ({ device
|
|
14
|
+
const DeviceApplications = ({ device }: DeviceDetailsTabProps) => {
|
|
21
15
|
const { t } = useTranslation();
|
|
22
|
-
const { patch } = useFetch();
|
|
23
|
-
const [showSystemdModal, setShowSystemdModal] = React.useState<boolean>(false);
|
|
24
|
-
const [isUpdating, setIsUpdating] = React.useState<boolean>(false);
|
|
25
|
-
const [addedSystemdDates, setAddedSystemdDates] = React.useState<Record<string, number>>({});
|
|
26
16
|
|
|
27
|
-
const onClose = (hasChanges?: boolean, addedUnits?: string[]) => {
|
|
28
|
-
if (hasChanges) {
|
|
29
|
-
refetch?.();
|
|
30
|
-
}
|
|
31
|
-
if (addedUnits?.length) {
|
|
32
|
-
const allAddedUnitDates = { ...addedSystemdDates };
|
|
33
|
-
const addedDate = Date.now();
|
|
34
|
-
addedUnits.forEach((newUnit) => {
|
|
35
|
-
allAddedUnitDates[newUnit] = addedDate;
|
|
36
|
-
});
|
|
37
|
-
setAddedSystemdDates(allAddedUnitDates);
|
|
38
|
-
}
|
|
39
|
-
setShowSystemdModal(false);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const isManagedDevice = !!getDeviceFleet(device.metadata);
|
|
43
|
-
const trackedSystemdUnits = device.spec?.systemd?.matchPatterns || [];
|
|
44
17
|
const specApps =
|
|
45
18
|
device.spec?.applications?.map((app) => {
|
|
46
19
|
if (isImageAppProvider(app)) {
|
|
@@ -48,59 +21,16 @@ const DeviceApplications = ({ device, refetch, canEdit }: React.PropsWithChildre
|
|
|
48
21
|
}
|
|
49
22
|
return app.name as string;
|
|
50
23
|
}) || [];
|
|
51
|
-
const apps = device.status.applications; // includes available systemdUnits
|
|
52
|
-
|
|
53
|
-
const deleteSystemdUnit = isManagedDevice
|
|
54
|
-
? undefined
|
|
55
|
-
: (removedUnit: string) => {
|
|
56
|
-
const updateDeviceSpec = async () => {
|
|
57
|
-
const patches = getStringListPatches(
|
|
58
|
-
'/spec/systemd',
|
|
59
|
-
trackedSystemdUnits,
|
|
60
|
-
trackedSystemdUnits.filter((unit) => unit !== removedUnit),
|
|
61
|
-
(units: string[]) => ({ matchPatterns: units }),
|
|
62
|
-
);
|
|
63
|
-
if (patches.length > 0) {
|
|
64
|
-
setIsUpdating(true);
|
|
65
|
-
await patch(`devices/${device.metadata.name}`, patches);
|
|
66
|
-
refetch?.();
|
|
67
|
-
setIsUpdating(false);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
void updateDeviceSpec();
|
|
71
|
-
};
|
|
72
24
|
|
|
73
25
|
return (
|
|
74
26
|
<DetailsPageCard>
|
|
75
27
|
<CardTitle>
|
|
76
28
|
<Flex justifyContent={{ default: 'justifyContentSpaceBetween' }}>
|
|
77
29
|
<FlexItem>{t('Applications')}</FlexItem>
|
|
78
|
-
{!isManagedDevice && canEdit && (
|
|
79
|
-
<FlexItem>
|
|
80
|
-
<Button
|
|
81
|
-
variant="link"
|
|
82
|
-
isDisabled={isUpdating}
|
|
83
|
-
onClick={() => {
|
|
84
|
-
setShowSystemdModal(true);
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
{t('Track systemd services')}
|
|
88
|
-
</Button>
|
|
89
|
-
</FlexItem>
|
|
90
|
-
)}
|
|
91
30
|
</Flex>
|
|
92
31
|
</CardTitle>
|
|
93
32
|
<DetailsPageCardBody>
|
|
94
|
-
<ApplicationsTable
|
|
95
|
-
appsStatus={apps}
|
|
96
|
-
specApps={specApps}
|
|
97
|
-
specSystemdUnits={trackedSystemdUnits}
|
|
98
|
-
onSystemdDelete={deleteSystemdUnit}
|
|
99
|
-
isUpdating={isUpdating}
|
|
100
|
-
addedSystemdUnitDates={addedSystemdDates}
|
|
101
|
-
canEdit={canEdit}
|
|
102
|
-
/>
|
|
103
|
-
{showSystemdModal && <SystemdUnitsModal device={device} onClose={onClose} />}
|
|
33
|
+
<ApplicationsTable appsStatus={device.status.applications} specApps={specApps} />
|
|
104
34
|
</DetailsPageCardBody>
|
|
105
35
|
</DetailsPageCard>
|
|
106
36
|
);
|
|
@@ -26,7 +26,7 @@ import TerminalTab from './TerminalTab';
|
|
|
26
26
|
import NavItem from '../../NavItem/NavItem';
|
|
27
27
|
import { getEditDisabledReason, getResumeDisabledReason, isDeviceEnrolled } from '../../../utils/devices';
|
|
28
28
|
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
29
|
-
import {
|
|
29
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
30
30
|
import EventsCard from '../../Events/EventsCard';
|
|
31
31
|
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
32
32
|
import YamlEditor from '../../common/CodeEditor/YamlEditor';
|
|
@@ -35,6 +35,14 @@ import { SystemRestoreBanners } from '../../SystemRestore/SystemRestoreBanners';
|
|
|
35
35
|
|
|
36
36
|
type DeviceDetailsPageProps = React.PropsWithChildren<{ hideTerminal?: boolean }>;
|
|
37
37
|
|
|
38
|
+
const deviceDetailsPermissions = [
|
|
39
|
+
{ kind: RESOURCE.DEVICE_CONSOLE, verb: VERB.GET },
|
|
40
|
+
{ kind: RESOURCE.DEVICE, verb: VERB.DELETE },
|
|
41
|
+
{ kind: RESOURCE.DEVICE, verb: VERB.PATCH },
|
|
42
|
+
{ kind: RESOURCE.DEVICE_DECOMMISSION, verb: VERB.UPDATE },
|
|
43
|
+
{ kind: RESOURCE.DEVICE_RESUME, verb: VERB.UPDATE },
|
|
44
|
+
];
|
|
45
|
+
|
|
38
46
|
const DeviceDetailsPage = ({ children, hideTerminal }: DeviceDetailsPageProps) => {
|
|
39
47
|
const { t } = useTranslation();
|
|
40
48
|
const {
|
|
@@ -50,11 +58,9 @@ const DeviceDetailsPage = ({ children, hideTerminal }: DeviceDetailsPageProps) =
|
|
|
50
58
|
const deviceNameOrAlias = deviceAlias || deviceId;
|
|
51
59
|
const isEnrolled = !device || isDeviceEnrolled(device);
|
|
52
60
|
|
|
53
|
-
const
|
|
54
|
-
const [canDelete
|
|
55
|
-
|
|
56
|
-
const [canDecommission] = useAccessReview(RESOURCE.DEVICE_DECOMMISSION, VERB.UPDATE);
|
|
57
|
-
const [canResume] = useAccessReview(RESOURCE.DEVICE_RESUME, VERB.UPDATE);
|
|
61
|
+
const { checkPermissions } = usePermissionsContext();
|
|
62
|
+
const [hasTerminalAccess, canDelete, canEdit, canDecommission, canResume] =
|
|
63
|
+
checkPermissions(deviceDetailsPermissions);
|
|
58
64
|
|
|
59
65
|
const canOpenTerminal = hasTerminalAccess && isEnrolled;
|
|
60
66
|
|
|
@@ -85,7 +91,8 @@ const DeviceDetailsPage = ({ children, hideTerminal }: DeviceDetailsPageProps) =
|
|
|
85
91
|
onResumeComplete: refetch,
|
|
86
92
|
});
|
|
87
93
|
|
|
88
|
-
const
|
|
94
|
+
const editDisabledReason = device ? getEditDisabledReason(device, t) : undefined;
|
|
95
|
+
const editActionProps = device ? getDisabledTooltipProps(editDisabledReason) : undefined;
|
|
89
96
|
const resumeDevice = {
|
|
90
97
|
actionText: t('Resume device'),
|
|
91
98
|
title: (
|
|
@@ -188,7 +195,9 @@ const DeviceDetailsPage = ({ children, hideTerminal }: DeviceDetailsPageProps) =
|
|
|
188
195
|
/>
|
|
189
196
|
<Route
|
|
190
197
|
path="yaml"
|
|
191
|
-
element={
|
|
198
|
+
element={
|
|
199
|
+
<YamlEditor apiObj={device} refetch={refetch} disabledEditReason={editDisabledReason} canEdit={canEdit} />
|
|
200
|
+
}
|
|
192
201
|
/>
|
|
193
202
|
{!hideTerminal && canOpenTerminal && <Route path="terminal" element={<TerminalTab device={device} />} />}
|
|
194
203
|
<Route path="events" element={<EventsCard kind={ResourceKind.DEVICE} objId={deviceId} />} />
|
|
@@ -201,7 +210,8 @@ const DeviceDetailsPage = ({ children, hideTerminal }: DeviceDetailsPageProps) =
|
|
|
201
210
|
};
|
|
202
211
|
|
|
203
212
|
const DeviceDetailsPageWithPermissions = (props: DeviceDetailsPageProps) => {
|
|
204
|
-
const
|
|
213
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
214
|
+
const [allowed] = checkPermissions([{ kind: RESOURCE.DEVICE, verb: VERB.GET }]);
|
|
205
215
|
return (
|
|
206
216
|
<PageWithPermissions allowed={allowed} loading={loading}>
|
|
207
217
|
<DeviceDetailsPage {...props} />
|
|
@@ -26,6 +26,7 @@ import DeviceLifecycleStatus from '../../Status/DeviceLifecycleStatus';
|
|
|
26
26
|
import DeviceFleet from './DeviceFleet';
|
|
27
27
|
import DeviceOs from './DeviceOs';
|
|
28
28
|
import DeviceApplications from './DeviceApplications';
|
|
29
|
+
import DeviceSystemdUnits from './DeviceSystemdUnits';
|
|
29
30
|
import StatusContent from './DeviceDetailsTabContent/StatusContent';
|
|
30
31
|
import SystemResourcesContent from './DeviceDetailsTabContent/SystemResourcesContent';
|
|
31
32
|
|
|
@@ -157,7 +158,10 @@ const EnrolledDeviceDetails = ({
|
|
|
157
158
|
</DetailsPageCard>
|
|
158
159
|
</GridItem>
|
|
159
160
|
<GridItem md={12} lg={6}>
|
|
160
|
-
<DeviceApplications device={device}
|
|
161
|
+
<DeviceApplications device={device} />
|
|
162
|
+
</GridItem>
|
|
163
|
+
<GridItem md={12} lg={6}>
|
|
164
|
+
<DeviceSystemdUnits device={device} />
|
|
161
165
|
</GridItem>
|
|
162
166
|
</Grid>
|
|
163
167
|
);
|
|
@@ -221,7 +225,7 @@ const DecommissionedDeviceDetails = ({ device, children }: React.PropsWithChildr
|
|
|
221
225
|
</DetailsPageCard>
|
|
222
226
|
</GridItem>
|
|
223
227
|
<GridItem md={12} lg={6}>
|
|
224
|
-
<DeviceApplications device={device}
|
|
228
|
+
<DeviceApplications device={device} />
|
|
225
229
|
</GridItem>
|
|
226
230
|
</Grid>
|
|
227
231
|
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CardTitle, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
import { Device } from '@flightctl/types';
|
|
5
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
6
|
+
import SystemdUnitsTable from '../../DetailsPage/Tables/SystemdUnitsTable';
|
|
7
|
+
import DetailsPageCard, { DetailsPageCardBody } from '../../DetailsPage/DetailsPageCard';
|
|
8
|
+
|
|
9
|
+
type DeviceSystemdUnitsProps = {
|
|
10
|
+
device: Required<Device>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const DeviceSystemdUnits = ({ device }: DeviceSystemdUnitsProps) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<DetailsPageCard>
|
|
18
|
+
<CardTitle>
|
|
19
|
+
<Flex justifyContent={{ default: 'justifyContentSpaceBetween' }}>
|
|
20
|
+
<FlexItem>{t('System services')}</FlexItem>
|
|
21
|
+
</Flex>
|
|
22
|
+
</CardTitle>
|
|
23
|
+
<DetailsPageCardBody>
|
|
24
|
+
<SystemdUnitsTable systemdUnitsStatus={device.status.systemd || []} />
|
|
25
|
+
</DetailsPageCardBody>
|
|
26
|
+
</DetailsPageCard>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default DeviceSystemdUnits;
|
|
@@ -7,7 +7,7 @@ import ErrorAlert from '../../ErrorAlert/ErrorAlert';
|
|
|
7
7
|
import { useTranslation } from '../../../hooks/useTranslation';
|
|
8
8
|
import Terminal, { ImperativeTerminalType } from '../../Terminal/Terminal';
|
|
9
9
|
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
10
|
-
import {
|
|
10
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
11
11
|
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
12
12
|
import { useOrganizationGuardContext } from '../../common/OrganizationGuard';
|
|
13
13
|
|
|
@@ -97,7 +97,8 @@ const TerminalTab = ({ device }: TerminalTabProps) => {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
const TerminalTabWithPermissions = (props: TerminalTabProps) => {
|
|
100
|
-
const
|
|
100
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
101
|
+
const [allowed] = checkPermissions([{ kind: RESOURCE.DEVICE_CONSOLE, verb: VERB.GET }]);
|
|
101
102
|
return (
|
|
102
103
|
<PageWithPermissions allowed={allowed} loading={loading}>
|
|
103
104
|
<TerminalTab {...props} />
|
|
@@ -8,7 +8,7 @@ import { Device, DeviceList } from '@flightctl/types';
|
|
|
8
8
|
import { PaginationDetails } from '../../../hooks/useTablePagination';
|
|
9
9
|
import { useTranslation } from '../../../hooks/useTranslation';
|
|
10
10
|
import { useTableSelect } from '../../../hooks/useTableSelect';
|
|
11
|
-
import {
|
|
11
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
12
12
|
import { useFetch } from '../../../hooks/useFetch';
|
|
13
13
|
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
14
14
|
|
|
@@ -41,6 +41,11 @@ const getDeviceColumns = (t: TFunction): ApiSortTableColumn[] => [
|
|
|
41
41
|
},
|
|
42
42
|
];
|
|
43
43
|
|
|
44
|
+
const decommissionedDevicesPermissions = [
|
|
45
|
+
{ kind: RESOURCE.DEVICE, verb: VERB.DELETE },
|
|
46
|
+
{ kind: RESOURCE.DEVICE, verb: VERB.PATCH },
|
|
47
|
+
];
|
|
48
|
+
|
|
44
49
|
const DecommissionedDevicesTable = ({
|
|
45
50
|
devices,
|
|
46
51
|
refetch,
|
|
@@ -67,8 +72,8 @@ const DecommissionedDevicesTable = ({
|
|
|
67
72
|
},
|
|
68
73
|
});
|
|
69
74
|
|
|
70
|
-
const
|
|
71
|
-
const [canEdit] =
|
|
75
|
+
const { checkPermissions } = usePermissionsContext();
|
|
76
|
+
const [canDelete, canEdit] = checkPermissions(decommissionedDevicesPermissions);
|
|
72
77
|
|
|
73
78
|
return (
|
|
74
79
|
<>
|
|
@@ -4,7 +4,7 @@ import { Button, EmptyStateActions, EmptyStateBody, EmptyStateFooter } from '@pa
|
|
|
4
4
|
import MicrochipIcon from '@patternfly/react-icons/dist/js/icons/microchip-icon';
|
|
5
5
|
import BanIcon from '@patternfly/react-icons/dist/js/icons/ban-icon';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
8
8
|
import { useTranslation } from '../../../hooks/useTranslation';
|
|
9
9
|
import { Link, ROUTE } from '../../../hooks/useNavigate';
|
|
10
10
|
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
@@ -16,7 +16,8 @@ type DevicesEmptyStateProps = {
|
|
|
16
16
|
|
|
17
17
|
export const EnrolledDevicesEmptyState = ({ onAddDevice }: DevicesEmptyStateProps) => {
|
|
18
18
|
const { t } = useTranslation();
|
|
19
|
-
const
|
|
19
|
+
const { checkPermissions } = usePermissionsContext();
|
|
20
|
+
const [canCreateFleet] = checkPermissions([{ kind: RESOURCE.FLEET, verb: VERB.CREATE }]);
|
|
20
21
|
return (
|
|
21
22
|
<ResourceListEmptyState icon={MicrochipIcon} titleText={t('No devices here!')}>
|
|
22
23
|
<EmptyStateBody>
|