@flightctl/ui-components 0.10.0-rc7 → 1.0.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/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 +36 -10
- 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 +235 -56
- 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 +167 -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 +100 -38
- 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 +63 -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 +55 -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/Terminal/Terminal.css +12 -1
- package/dist/src/components/Terminal/Terminal.js +3 -3
- package/dist/src/components/Terminal/Terminal.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 +1 -1
- package/dist/src/components/common/OrganizationGuard.d.ts.map +1 -1
- package/dist/src/components/common/OrganizationGuard.js +16 -22
- package/dist/src/components/common/OrganizationGuard.js.map +1 -1
- package/dist/src/components/common/OrganizationSelector.d.ts.map +1 -1
- package/dist/src/components/common/OrganizationSelector.js +20 -6
- package/dist/src/components/common/OrganizationSelector.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 +64 -4
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +340 -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/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/src/hooks/useWebSocket.js +47 -19
- package/dist/src/hooks/useWebSocket.js.map +1 -1
- package/dist/src/types/deviceSpec.d.ts +50 -15
- package/dist/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/src/types/deviceSpec.js +17 -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 +57 -24
- 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 +295 -60
- package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.css +5 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.tsx +312 -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 +196 -80
- package/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.tsx +149 -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/Terminal/Terminal.css +12 -1
- package/src/components/Terminal/Terminal.tsx +3 -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 +19 -27
- package/src/components/common/OrganizationSelector.tsx +65 -38
- 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 +430 -65
- 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/hooks/useWebSocket.ts +53 -16
- package/src/types/deviceSpec.ts +72 -22
- 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
package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx
CHANGED
|
@@ -35,12 +35,17 @@ import { useTranslation } from '../../../hooks/useTranslation';
|
|
|
35
35
|
import { ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
36
36
|
import { useDeviceSpecSystemInfo } from '../../../hooks/useDeviceSpecSystemInfo';
|
|
37
37
|
import { useAppContext } from '../../../hooks/useAppContext';
|
|
38
|
-
import {
|
|
38
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
39
39
|
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
40
40
|
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
41
41
|
|
|
42
42
|
import './EnrollmentRequestDetails.css';
|
|
43
43
|
|
|
44
|
+
const enrollmentRequestDetailsPermissions = [
|
|
45
|
+
{ kind: RESOURCE.ENROLLMENT_REQUEST_APPROVAL, verb: VERB.POST },
|
|
46
|
+
{ kind: RESOURCE.ENROLLMENT_REQUEST, verb: VERB.DELETE },
|
|
47
|
+
];
|
|
48
|
+
|
|
44
49
|
const EnrollmentRequestDetails = () => {
|
|
45
50
|
const { t } = useTranslation();
|
|
46
51
|
const {
|
|
@@ -52,8 +57,8 @@ const EnrollmentRequestDetails = () => {
|
|
|
52
57
|
});
|
|
53
58
|
const { remove } = useFetch();
|
|
54
59
|
const navigate = useNavigate();
|
|
55
|
-
const
|
|
56
|
-
const [canDelete] =
|
|
60
|
+
const { checkPermissions } = usePermissionsContext();
|
|
61
|
+
const [canApprove, canDelete] = checkPermissions(enrollmentRequestDetailsPermissions);
|
|
57
62
|
|
|
58
63
|
const [isApprovalModalOpen, setIsApprovalModalOpen] = React.useState(false);
|
|
59
64
|
const erSystemInfo = useDeviceSpecSystemInfo(er?.spec.deviceStatus?.systemInfo, t);
|
|
@@ -222,7 +227,8 @@ const EnrollmentRequestDetails = () => {
|
|
|
222
227
|
};
|
|
223
228
|
|
|
224
229
|
const EnrollmentRequestDetailsWithPermissions = () => {
|
|
225
|
-
const
|
|
230
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
231
|
+
const [allowed] = checkPermissions([{ kind: RESOURCE.ENROLLMENT_REQUEST, verb: VERB.GET }]);
|
|
226
232
|
return (
|
|
227
233
|
<PageWithPermissions allowed={allowed} loading={loading}>
|
|
228
234
|
<EnrollmentRequestDetails />
|
|
@@ -4,8 +4,6 @@ import { Tbody } from '@patternfly/react-table';
|
|
|
4
4
|
import { SelectList, SelectOption, ToolbarItem } from '@patternfly/react-core';
|
|
5
5
|
import { MicrochipIcon } from '@patternfly/react-icons/dist/js/icons';
|
|
6
6
|
|
|
7
|
-
import { EnrollmentRequestList } from '@flightctl/types';
|
|
8
|
-
|
|
9
7
|
import Table, { ApiSortTableColumn } from '../Table/Table';
|
|
10
8
|
import TableActions from '../Table/TableActions';
|
|
11
9
|
import ListPage from '../ListPage/ListPage';
|
|
@@ -20,7 +18,7 @@ import MassApproveDeviceModal from '../modals/massModals/MassApproveDeviceModal/
|
|
|
20
18
|
import EnrollmentRequestTableRow from '../EnrollmentRequest/EnrollmentRequestTableRow';
|
|
21
19
|
import EnrollmentRequestTableToolbar from './EnrollmentRequestTableToolbar';
|
|
22
20
|
import { RESOURCE, VERB } from '../../types/rbac';
|
|
23
|
-
import {
|
|
21
|
+
import { usePermissionsContext } from '../common/PermissionsContext';
|
|
24
22
|
import ResourceListEmptyState from '../common/ResourceListEmptyState';
|
|
25
23
|
import { usePendingEnrollments } from './useEnrollmentRequests';
|
|
26
24
|
import TablePagination from '../Table/TablePagination';
|
|
@@ -44,14 +42,18 @@ const getEnrollmentColumns = (t: TFunction): ApiSortTableColumn[] => [
|
|
|
44
42
|
|
|
45
43
|
type EnrollmentRequestListProps = {
|
|
46
44
|
refetchDevices?: VoidFunction;
|
|
47
|
-
onEmptyListChanged?: (isEmpty: boolean) => void;
|
|
48
45
|
isStandalone?: boolean;
|
|
49
46
|
};
|
|
50
47
|
|
|
51
|
-
const
|
|
48
|
+
const enrollmentRequestListPermissions = [
|
|
49
|
+
{ kind: RESOURCE.ENROLLMENT_REQUEST_APPROVAL, verb: VERB.POST },
|
|
50
|
+
{ kind: RESOURCE.ENROLLMENT_REQUEST, verb: VERB.DELETE },
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
const EnrollmentRequestList = ({ refetchDevices, isStandalone }: EnrollmentRequestListProps) => {
|
|
52
54
|
const { t } = useTranslation();
|
|
53
|
-
const
|
|
54
|
-
const [canDelete] =
|
|
55
|
+
const { checkPermissions } = usePermissionsContext();
|
|
56
|
+
const [canApprove, canDelete] = checkPermissions(enrollmentRequestListPermissions);
|
|
55
57
|
const { remove } = useFetch();
|
|
56
58
|
const [search, setSearch] = React.useState<string>('');
|
|
57
59
|
|
|
@@ -78,12 +80,6 @@ const EnrollmentRequestList = ({ onEmptyListChanged, refetchDevices, isStandalon
|
|
|
78
80
|
},
|
|
79
81
|
});
|
|
80
82
|
|
|
81
|
-
React.useEffect(() => {
|
|
82
|
-
if (onEmptyListChanged && !search && !isLoading) {
|
|
83
|
-
onEmptyListChanged?.(itemCount === 0);
|
|
84
|
-
}
|
|
85
|
-
}, [search, itemCount, isLoading, onEmptyListChanged]);
|
|
86
|
-
|
|
87
83
|
// In non-standalone mode, hide the entire component when the search result is empty (and not due to filtering)
|
|
88
84
|
const isLastUnfilteredListEmpty = !search && itemCount === 0;
|
|
89
85
|
if (!isStandalone && isLastUnfilteredListEmpty) {
|
|
@@ -33,7 +33,7 @@ import CreateFleetWizardFooter from './CreateFleetWizardFooter';
|
|
|
33
33
|
import { useEditFleet } from './useEditFleet';
|
|
34
34
|
import LeaveFormConfirmation from '../../common/LeaveFormConfirmation';
|
|
35
35
|
import ErrorBoundary from '../../common/ErrorBoundary';
|
|
36
|
-
import {
|
|
36
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
37
37
|
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
38
38
|
import { useAppContext } from '../../../hooks/useAppContext';
|
|
39
39
|
|
|
@@ -79,7 +79,8 @@ const CreateFleetWizard = () => {
|
|
|
79
79
|
const [currentStep, setCurrentStep] = React.useState<WizardStepType>();
|
|
80
80
|
const [fleetId, fleet, loading, editError] = useEditFleet();
|
|
81
81
|
|
|
82
|
-
const
|
|
82
|
+
const { checkPermissions } = usePermissionsContext();
|
|
83
|
+
const [canEdit] = checkPermissions([{ kind: RESOURCE.FLEET, verb: VERB.PATCH }]);
|
|
83
84
|
|
|
84
85
|
const isEdit = !!fleetId;
|
|
85
86
|
const isReadOnly = !!fleet?.metadata.owner || (isEdit && !canEdit);
|
|
@@ -216,18 +217,20 @@ const CreateFleetWizard = () => {
|
|
|
216
217
|
);
|
|
217
218
|
};
|
|
218
219
|
|
|
220
|
+
const createFleetWizardPermissions = [
|
|
221
|
+
{ kind: RESOURCE.FLEET, verb: VERB.CREATE },
|
|
222
|
+
{ kind: RESOURCE.FLEET, verb: VERB.PATCH },
|
|
223
|
+
];
|
|
224
|
+
|
|
219
225
|
const CreateFleetWizardWithPermissions = () => {
|
|
220
226
|
const {
|
|
221
227
|
router: { useParams },
|
|
222
228
|
} = useAppContext();
|
|
223
229
|
const { fleetId } = useParams<{ fleetId: string }>();
|
|
224
|
-
const
|
|
225
|
-
const [
|
|
230
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
231
|
+
const [createAllowed, patchAllowed] = checkPermissions(createFleetWizardPermissions);
|
|
226
232
|
return (
|
|
227
|
-
<PageWithPermissions
|
|
228
|
-
allowed={fleetId ? patchAllowed : createAllowed}
|
|
229
|
-
loading={fleetId ? patchLoading : createLoading}
|
|
230
|
-
>
|
|
233
|
+
<PageWithPermissions allowed={fleetId ? patchAllowed : createAllowed} loading={loading}>
|
|
231
234
|
<CreateFleetWizard />
|
|
232
235
|
</PageWithPermissions>
|
|
233
236
|
);
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
getApplicationValues,
|
|
33
33
|
getConfigTemplatesValues,
|
|
34
34
|
getDeviceSpecConfigPatches,
|
|
35
|
+
getSystemdUnitsValues,
|
|
35
36
|
hasMicroshiftRegistrationConfig,
|
|
36
37
|
toAPIApplication,
|
|
37
38
|
} from '../../Device/EditDeviceWizard/deviceSpecUtils';
|
|
@@ -236,10 +237,7 @@ export const getInitialValues = (fleet?: Fleet): FleetFormValues => {
|
|
|
236
237
|
osImage: fleet.spec.template.spec.os?.image || '',
|
|
237
238
|
configTemplates: getConfigTemplatesValues(fleet.spec.template.spec, registerMicroShift),
|
|
238
239
|
applications: getApplicationValues(fleet.spec.template.spec),
|
|
239
|
-
systemdUnits: (fleet.spec.template.spec
|
|
240
|
-
pattern: p,
|
|
241
|
-
exists: true,
|
|
242
|
-
})),
|
|
240
|
+
systemdUnits: getSystemdUnitsValues(fleet.spec.template.spec),
|
|
243
241
|
registerMicroShift,
|
|
244
242
|
rolloutPolicy,
|
|
245
243
|
disruptionBudget,
|
|
@@ -7,16 +7,20 @@ import PageWithPermissions from '../../common/PageWithPermissions';
|
|
|
7
7
|
import { useFetchPeriodically } from '../../../hooks/useFetchPeriodically';
|
|
8
8
|
import { useTranslation } from '../../../hooks/useTranslation';
|
|
9
9
|
import { ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
10
|
-
import {
|
|
10
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
11
11
|
import { useAppContext } from '../../../hooks/useAppContext';
|
|
12
12
|
import NavItem from '../../NavItem/NavItem';
|
|
13
13
|
import DetailsPage from '../../DetailsPage/DetailsPage';
|
|
14
14
|
import DetailsPageActions from '../../DetailsPage/DetailsPageActions';
|
|
15
15
|
import DeleteFleetModal from '../DeleteFleetModal/DeleteFleetModal';
|
|
16
|
-
import YamlEditor from '../../common/CodeEditor/YamlEditor';
|
|
17
16
|
import FleetDetailsContent from './FleetDetailsContent';
|
|
18
17
|
import FleetRestoreBanner from './FleetRestoreBanner';
|
|
18
|
+
import FleetYaml from './FleetYaml';
|
|
19
19
|
|
|
20
|
+
const fleetDetailsPermissions = [
|
|
21
|
+
{ kind: RESOURCE.FLEET, verb: VERB.DELETE },
|
|
22
|
+
{ kind: RESOURCE.FLEET, verb: VERB.PATCH },
|
|
23
|
+
];
|
|
20
24
|
const FleetDetailPage = () => {
|
|
21
25
|
const { t } = useTranslation();
|
|
22
26
|
|
|
@@ -32,8 +36,8 @@ const FleetDetailPage = () => {
|
|
|
32
36
|
|
|
33
37
|
const navigate = useNavigate();
|
|
34
38
|
|
|
35
|
-
const
|
|
36
|
-
const [canEdit] =
|
|
39
|
+
const { checkPermissions } = usePermissionsContext();
|
|
40
|
+
const [canDelete, canEdit] = checkPermissions(fleetDetailsPermissions);
|
|
37
41
|
|
|
38
42
|
const isManaged = !!fleet?.metadata?.owner;
|
|
39
43
|
const hasActions = canDelete || (canEdit && !isManaged) || isManaged;
|
|
@@ -100,7 +104,7 @@ const FleetDetailPage = () => {
|
|
|
100
104
|
<Routes>
|
|
101
105
|
<Route index element={<Navigate to="details" replace />} />
|
|
102
106
|
<Route path="details" element={<FleetDetailsContent fleet={fleet} />} />
|
|
103
|
-
<Route path="yaml" element={<
|
|
107
|
+
<Route path="yaml" element={<FleetYaml fleet={fleet} refetch={refetch} canEdit={canEdit} />} />
|
|
104
108
|
</Routes>
|
|
105
109
|
{isDeleteModalOpen && (
|
|
106
110
|
<DeleteFleetModal
|
|
@@ -121,7 +125,8 @@ const FleetDetailPage = () => {
|
|
|
121
125
|
};
|
|
122
126
|
|
|
123
127
|
const FleetDetailsWithPermissions = () => {
|
|
124
|
-
const
|
|
128
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
129
|
+
const [allowed] = checkPermissions([{ kind: RESOURCE.FLEET, verb: VERB.GET }]);
|
|
125
130
|
return (
|
|
126
131
|
<PageWithPermissions allowed={allowed} loading={loading}>
|
|
127
132
|
<FleetDetailPage />
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Fleet } from '@flightctl/types';
|
|
3
|
+
|
|
4
|
+
import YamlEditor from '../../common/CodeEditor/YamlEditor';
|
|
5
|
+
|
|
6
|
+
// In the YAML editor, we must have the raw Fleet object, without extra details that are not part of the PATCH response.
|
|
7
|
+
// For that reason, we must remove the extra "devicesSummary" field that was added to the fleet details.
|
|
8
|
+
const FleetYaml = ({ fleet, refetch, canEdit }: { fleet: Fleet; refetch: VoidFunction; canEdit: boolean }) => {
|
|
9
|
+
const fleetWithoutSummary = { ...fleet, status: { ...fleet.status, devicesSummary: undefined } } as Fleet;
|
|
10
|
+
return <YamlEditor apiObj={fleetWithoutSummary} refetch={refetch} canEdit={canEdit} />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default FleetYaml;
|
|
@@ -15,7 +15,7 @@ import { useTranslation } from '../../hooks/useTranslation';
|
|
|
15
15
|
import { useFetchPeriodically } from '../../hooks/useFetchPeriodically';
|
|
16
16
|
import { Link, ROUTE } from '../../hooks/useNavigate';
|
|
17
17
|
import { getLastTransitionTime, getRepositorySyncStatus } from '../../utils/status/repository';
|
|
18
|
-
import {
|
|
18
|
+
import { usePermissionsContext } from '../common/PermissionsContext';
|
|
19
19
|
import { RESOURCE, VERB } from '../../types/rbac';
|
|
20
20
|
|
|
21
21
|
// Entries format: <rs0Name>@@<rs0LastSync>,<rs1Name>@@<rs1LastSync>,...
|
|
@@ -166,7 +166,8 @@ const FleetResourceSyncs = () => {
|
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
const FleetResourceSyncsWithPermissions = () => {
|
|
169
|
-
const
|
|
169
|
+
const { checkPermissions } = usePermissionsContext();
|
|
170
|
+
const [allowed] = checkPermissions([{ kind: RESOURCE.RESOURCE_SYNC, verb: VERB.LIST }]);
|
|
170
171
|
return allowed && <FleetResourceSyncs />;
|
|
171
172
|
};
|
|
172
173
|
|
|
@@ -32,39 +32,40 @@ import { ROUTE, useNavigate } from '../../hooks/useNavigate';
|
|
|
32
32
|
import DeleteFleetModal from './DeleteFleetModal/DeleteFleetModal';
|
|
33
33
|
import FleetResourceSyncs from './FleetResourceSyncs';
|
|
34
34
|
import { useFleetBackendFilters, useFleets } from './useFleets';
|
|
35
|
-
import {
|
|
36
|
-
import ButtonWithPermissions from '../common/ButtonWithPermissions';
|
|
35
|
+
import { usePermissionsContext } from '../common/PermissionsContext';
|
|
37
36
|
import { RESOURCE, VERB } from '../../types/rbac';
|
|
38
37
|
import PageWithPermissions from '../common/PageWithPermissions';
|
|
39
|
-
import { useFleetImportAccessReview } from '../../hooks/useFleetImportAccessReview';
|
|
40
38
|
import { GlobalSystemRestoreBanners } from '../SystemRestore/SystemRestoreBanners';
|
|
41
39
|
|
|
40
|
+
const fleetPageActionsPermissions = [
|
|
41
|
+
{ kind: RESOURCE.FLEET, verb: VERB.CREATE },
|
|
42
|
+
{ kind: RESOURCE.RESOURCE_SYNC, verb: VERB.CREATE },
|
|
43
|
+
{ kind: RESOURCE.REPOSITORY, verb: VERB.LIST },
|
|
44
|
+
];
|
|
45
|
+
|
|
42
46
|
const FleetPageActions = ({ createText }: { createText?: string }) => {
|
|
43
47
|
const { t } = useTranslation();
|
|
44
48
|
const navigate = useNavigate();
|
|
45
|
-
const
|
|
46
|
-
const
|
|
49
|
+
const { checkPermissions } = usePermissionsContext();
|
|
50
|
+
const [canCreateFleet, canCreateRs, canReadRepo] = checkPermissions(fleetPageActionsPermissions);
|
|
51
|
+
const canImportFleet = canCreateRs && canReadRepo;
|
|
47
52
|
|
|
48
53
|
return (
|
|
49
54
|
<Split hasGutter>
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
>
|
|
65
|
-
{t('Import fleets')}
|
|
66
|
-
</ButtonWithPermissions>
|
|
67
|
-
</SplitItem>
|
|
55
|
+
{canCreateFleet && (
|
|
56
|
+
<SplitItem>
|
|
57
|
+
<Button variant="primary" onClick={() => navigate(ROUTE.FLEET_CREATE)}>
|
|
58
|
+
{createText || t('Create a fleet')}
|
|
59
|
+
</Button>
|
|
60
|
+
</SplitItem>
|
|
61
|
+
)}
|
|
62
|
+
{canImportFleet && (
|
|
63
|
+
<SplitItem>
|
|
64
|
+
<Button variant="secondary" onClick={() => navigate(ROUTE.FLEET_IMPORT)}>
|
|
65
|
+
{t('Import fleets')}
|
|
66
|
+
</Button>
|
|
67
|
+
</SplitItem>
|
|
68
|
+
)}
|
|
68
69
|
</Split>
|
|
69
70
|
);
|
|
70
71
|
};
|
|
@@ -104,6 +105,12 @@ const getColumns = (t: TFunction): ApiSortTableColumn[] => [
|
|
|
104
105
|
},
|
|
105
106
|
];
|
|
106
107
|
|
|
108
|
+
const fleetTablePermissions = [
|
|
109
|
+
{ kind: RESOURCE.FLEET, verb: VERB.DELETE },
|
|
110
|
+
{ kind: RESOURCE.FLEET, verb: VERB.CREATE },
|
|
111
|
+
{ kind: RESOURCE.FLEET, verb: VERB.PATCH },
|
|
112
|
+
];
|
|
113
|
+
|
|
107
114
|
const FleetTable = () => {
|
|
108
115
|
const { t } = useTranslation();
|
|
109
116
|
|
|
@@ -117,9 +124,8 @@ const FleetTable = () => {
|
|
|
117
124
|
|
|
118
125
|
const { onRowSelect, isAllSelected, hasSelectedRows, isRowSelected, setAllSelected } = useTableSelect();
|
|
119
126
|
|
|
120
|
-
const
|
|
121
|
-
const [canCreate] =
|
|
122
|
-
const [canEdit] = useAccessReview(RESOURCE.FLEET, VERB.PATCH);
|
|
127
|
+
const { checkPermissions } = usePermissionsContext();
|
|
128
|
+
const [canDelete, canCreate, canEdit] = checkPermissions(fleetTablePermissions);
|
|
123
129
|
|
|
124
130
|
return (
|
|
125
131
|
<ListPageBody error={error} loading={isLoading}>
|
|
@@ -214,7 +220,8 @@ const FleetsPage = () => {
|
|
|
214
220
|
};
|
|
215
221
|
|
|
216
222
|
const FleetsPageWithPermissions = () => {
|
|
217
|
-
const
|
|
223
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
224
|
+
const [allowed] = checkPermissions([{ kind: RESOURCE.FLEET, verb: VERB.LIST }]);
|
|
218
225
|
return (
|
|
219
226
|
<PageWithPermissions allowed={allowed} loading={loading}>
|
|
220
227
|
<FleetsPage />
|
|
@@ -41,7 +41,8 @@ import { Link, ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
|
41
41
|
import LeaveFormConfirmation from '../../common/LeaveFormConfirmation';
|
|
42
42
|
import ErrorBoundary from '../../common/ErrorBoundary';
|
|
43
43
|
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
44
|
-
import {
|
|
44
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
45
|
+
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
45
46
|
|
|
46
47
|
import './ImportFleetWizard.css';
|
|
47
48
|
|
|
@@ -217,8 +218,15 @@ const ImportFleetWizard = () => {
|
|
|
217
218
|
);
|
|
218
219
|
};
|
|
219
220
|
|
|
221
|
+
const importFleetWizardPermissions = [
|
|
222
|
+
{ kind: RESOURCE.RESOURCE_SYNC, verb: VERB.CREATE },
|
|
223
|
+
{ kind: RESOURCE.REPOSITORY, verb: VERB.LIST },
|
|
224
|
+
];
|
|
225
|
+
|
|
220
226
|
const ImportFleetWizardWithPermissions = () => {
|
|
221
|
-
const
|
|
227
|
+
const { checkPermissions, loading: isLoading } = usePermissionsContext();
|
|
228
|
+
const [canCreateRs, canReadRepo] = checkPermissions(importFleetWizardPermissions);
|
|
229
|
+
const allowed = canCreateRs && canReadRepo;
|
|
222
230
|
return (
|
|
223
231
|
<PageWithPermissions allowed={allowed} loading={isLoading}>
|
|
224
232
|
<ImportFleetWizard />
|
|
@@ -12,7 +12,7 @@ import { getLastTransitionTimeText, getRepositorySyncStatus } from '../../../../
|
|
|
12
12
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
13
13
|
import FormSelect from '../../../form/FormSelect';
|
|
14
14
|
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
15
|
-
import {
|
|
15
|
+
import { usePermissionsContext } from '../../../common/PermissionsContext';
|
|
16
16
|
import { RESOURCE, VERB } from '../../../../types/rbac';
|
|
17
17
|
|
|
18
18
|
export const repositoryStepId = 'repository';
|
|
@@ -77,7 +77,8 @@ const RepositoryStep = ({ repositories, hasLoaded }: { repositories: Repository[
|
|
|
77
77
|
const { t } = useTranslation();
|
|
78
78
|
const { values, setFieldValue } = useFormikContext<ImportFleetFormValues>();
|
|
79
79
|
|
|
80
|
-
const
|
|
80
|
+
const { checkPermissions } = usePermissionsContext();
|
|
81
|
+
const [canCreateRepo] = checkPermissions([{ kind: RESOURCE.REPOSITORY, verb: VERB.CREATE }]);
|
|
81
82
|
|
|
82
83
|
const noRepositoriesExist = hasLoaded && repositories.length === 0;
|
|
83
84
|
React.useEffect(() => {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
import { Flex, FlexItem, PageSection, PageSectionVariants, Title, TitleProps } from '@patternfly/react-core';
|
|
4
|
-
import TechPreviewBadge from '../common/TechPreviewBadge';
|
|
5
4
|
|
|
6
5
|
type ListPageProps = {
|
|
7
6
|
title: string;
|
|
8
7
|
headingLevel?: TitleProps['headingLevel'];
|
|
9
8
|
children: React.ReactNode;
|
|
10
|
-
withBadge?: boolean;
|
|
11
9
|
};
|
|
12
10
|
|
|
13
|
-
const ListPage: React.FC<ListPageProps> = ({ title, headingLevel = 'h1',
|
|
11
|
+
const ListPage: React.FC<ListPageProps> = ({ title, headingLevel = 'h1', children }) => {
|
|
14
12
|
return (
|
|
15
13
|
<PageSection variant={PageSectionVariants.light}>
|
|
16
14
|
<Flex gap={{ default: 'gapMd' }} alignItems={{ default: 'alignItemsCenter' }}>
|
|
@@ -19,11 +17,6 @@ const ListPage: React.FC<ListPageProps> = ({ title, headingLevel = 'h1', withBad
|
|
|
19
17
|
{title}
|
|
20
18
|
</Title>
|
|
21
19
|
</FlexItem>
|
|
22
|
-
{withBadge && (
|
|
23
|
-
<FlexItem>
|
|
24
|
-
<TechPreviewBadge />
|
|
25
|
-
</FlexItem>
|
|
26
|
-
)}
|
|
27
20
|
</Flex>
|
|
28
21
|
{children}
|
|
29
22
|
</PageSection>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button, Card, CardBody, CardTitle, Stack, StackItem, Title } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
import { AuthProvider } from '@flightctl/types';
|
|
5
|
+
import fcLogo from '@fctl-assets/bgimages/flight-control-logo.svg';
|
|
6
|
+
import rhemLogo from '@fctl-assets/bgimages/RHEM-logo.svg';
|
|
7
|
+
|
|
8
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
9
|
+
import { useAppContext } from '../../hooks/useAppContext';
|
|
10
|
+
import { isOAuth2Provider } from '../AuthProvider/CreateAuthProvider/types';
|
|
11
|
+
import { getProviderDisplayName } from '../../utils/authProvider';
|
|
12
|
+
import { DynamicAuthProviderSpec } from '../../types/extraTypes';
|
|
13
|
+
|
|
14
|
+
type ProviderSelectorProps = {
|
|
15
|
+
providers: AuthProvider[];
|
|
16
|
+
defaultProviderName: string;
|
|
17
|
+
onProviderSelect: (provider: AuthProvider) => void;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Returns a unique key for a provider.
|
|
22
|
+
// Theoretically there could be multiple providers with the same name across different organizations.
|
|
23
|
+
const getProviderKey = (provider: AuthProvider): string => {
|
|
24
|
+
const name = provider.metadata.name as string;
|
|
25
|
+
const issuerUrl = 'issuer' in provider.spec ? provider.spec.issuer : 'issuer';
|
|
26
|
+
const clientId = 'clientId' in provider.spec ? provider.spec.clientId : 'clientId';
|
|
27
|
+
return `${name}-${issuerUrl}-${clientId}`;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const ProviderSelector = ({
|
|
31
|
+
providers,
|
|
32
|
+
defaultProviderName,
|
|
33
|
+
onProviderSelect,
|
|
34
|
+
disabled = false,
|
|
35
|
+
}: ProviderSelectorProps) => {
|
|
36
|
+
const { t } = useTranslation();
|
|
37
|
+
const { settings } = useAppContext();
|
|
38
|
+
|
|
39
|
+
const duplicateProviderNames = React.useMemo(() => {
|
|
40
|
+
// Record of provider names and display names that are duplicates
|
|
41
|
+
const result: Record<string, boolean> = {};
|
|
42
|
+
|
|
43
|
+
providers.forEach((provider) => {
|
|
44
|
+
const displayName = getProviderDisplayName(provider, t) || (provider.metadata.name as string);
|
|
45
|
+
if (result[displayName] === undefined) {
|
|
46
|
+
result[displayName] = false;
|
|
47
|
+
} else {
|
|
48
|
+
result[displayName] = true;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return result;
|
|
53
|
+
}, [providers, t]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<>
|
|
57
|
+
<Card isLarge>
|
|
58
|
+
<CardBody>
|
|
59
|
+
<Stack hasGutter>
|
|
60
|
+
<StackItem>
|
|
61
|
+
<img
|
|
62
|
+
src={settings.isRHEM ? (rhemLogo as string) : (fcLogo as string)}
|
|
63
|
+
alt={settings.isRHEM ? 'Red Hat Edge Manager' : 'Flight Control'}
|
|
64
|
+
/>
|
|
65
|
+
</StackItem>
|
|
66
|
+
|
|
67
|
+
<StackItem>
|
|
68
|
+
<CardTitle>
|
|
69
|
+
<Title headingLevel="h2" size="lg">
|
|
70
|
+
{t('Choose login method')}
|
|
71
|
+
</Title>
|
|
72
|
+
</CardTitle>
|
|
73
|
+
</StackItem>
|
|
74
|
+
|
|
75
|
+
<StackItem>
|
|
76
|
+
<Stack hasGutter>
|
|
77
|
+
{providers.map((provider) => {
|
|
78
|
+
const displayName = getProviderDisplayName(provider, t);
|
|
79
|
+
|
|
80
|
+
const isDuplicateName = duplicateProviderNames[displayName];
|
|
81
|
+
let details: string | undefined;
|
|
82
|
+
if (isDuplicateName) {
|
|
83
|
+
const spec = provider.spec as DynamicAuthProviderSpec;
|
|
84
|
+
if (isOAuth2Provider(spec)) {
|
|
85
|
+
details = spec.authorizationUrl || spec.clientId || '';
|
|
86
|
+
} else {
|
|
87
|
+
details = spec.issuer || spec.clientId || '';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return (
|
|
91
|
+
<StackItem key={getProviderKey(provider)}>
|
|
92
|
+
<Button
|
|
93
|
+
variant={defaultProviderName === provider.metadata.name ? 'primary' : 'secondary'}
|
|
94
|
+
isBlock
|
|
95
|
+
size="lg"
|
|
96
|
+
onClick={() => onProviderSelect(provider)}
|
|
97
|
+
isDisabled={disabled}
|
|
98
|
+
>
|
|
99
|
+
{t('Log in with {{ providerName }}', { providerName: getProviderDisplayName(provider, t) })}
|
|
100
|
+
</Button>
|
|
101
|
+
{isDuplicateName && <small>{details}</small>}
|
|
102
|
+
</StackItem>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</Stack>
|
|
106
|
+
</StackItem>
|
|
107
|
+
</Stack>
|
|
108
|
+
</CardBody>
|
|
109
|
+
</Card>
|
|
110
|
+
</>
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default ProviderSelector;
|