@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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ActionsColumn, Td, Tr } from '@patternfly/react-table';
|
|
3
|
+
import { Label } from '@patternfly/react-core';
|
|
4
|
+
|
|
5
|
+
import { AuthProvider } from '@flightctl/types';
|
|
6
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
7
|
+
import { Link, ROUTE, useNavigate } from '../../hooks/useNavigate';
|
|
8
|
+
import { RESOURCE, VERB } from '../../types/rbac';
|
|
9
|
+
import { DynamicAuthProviderSpec } from '../../types/extraTypes';
|
|
10
|
+
import { isOAuth2Provider } from './CreateAuthProvider/types';
|
|
11
|
+
import { getProviderTypeLabel } from './CreateAuthProvider/utils';
|
|
12
|
+
import { usePermissionsContext } from '../common/PermissionsContext';
|
|
13
|
+
|
|
14
|
+
const authProviderPermissions = [
|
|
15
|
+
{ kind: RESOURCE.AUTH_PROVIDER, verb: VERB.UPDATE },
|
|
16
|
+
{ kind: RESOURCE.AUTH_PROVIDER, verb: VERB.DELETE },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const AuthProviderRow = ({ provider, onDeleteClick }: { provider: AuthProvider; onDeleteClick: VoidFunction }) => {
|
|
20
|
+
const { t } = useTranslation();
|
|
21
|
+
const navigate = useNavigate();
|
|
22
|
+
const providerName = provider.metadata.name || '';
|
|
23
|
+
const providerSpec = provider.spec as DynamicAuthProviderSpec;
|
|
24
|
+
|
|
25
|
+
const { checkPermissions } = usePermissionsContext();
|
|
26
|
+
const [canEdit, canDelete] = checkPermissions(authProviderPermissions);
|
|
27
|
+
|
|
28
|
+
const actions = [
|
|
29
|
+
{
|
|
30
|
+
title: t('View details'),
|
|
31
|
+
onClick: () => navigate({ route: ROUTE.AUTH_PROVIDER_DETAILS, postfix: providerName }),
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
if (canEdit) {
|
|
36
|
+
actions.push({
|
|
37
|
+
title: t('Edit'),
|
|
38
|
+
onClick: () => navigate({ route: ROUTE.AUTH_PROVIDER_EDIT, postfix: providerName }),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (canDelete) {
|
|
43
|
+
actions.push({
|
|
44
|
+
title: t('Delete'),
|
|
45
|
+
onClick: onDeleteClick,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let url: string = 'N/A';
|
|
50
|
+
let urlTitle: string = '';
|
|
51
|
+
if (isOAuth2Provider(providerSpec)) {
|
|
52
|
+
url = providerSpec.authorizationUrl;
|
|
53
|
+
urlTitle = t('Authorization URL');
|
|
54
|
+
} else {
|
|
55
|
+
url = providerSpec.issuer;
|
|
56
|
+
urlTitle = t('Issuer URL');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const isEnabled = providerSpec.enabled ?? true;
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<Tr>
|
|
63
|
+
<Td dataLabel={t('Name')}>
|
|
64
|
+
<Link to={{ route: ROUTE.AUTH_PROVIDER_DETAILS, postfix: providerName }}>
|
|
65
|
+
<strong>{providerName}</strong>
|
|
66
|
+
</Link>
|
|
67
|
+
</Td>
|
|
68
|
+
<Td dataLabel={t('Type')}>
|
|
69
|
+
<Label color="blue">{getProviderTypeLabel(providerSpec.providerType, t)}</Label>
|
|
70
|
+
</Td>
|
|
71
|
+
<Td dataLabel={urlTitle}>{url || 'N/A'}</Td>
|
|
72
|
+
<Td dataLabel={t('Enabled')}>
|
|
73
|
+
<Label color={isEnabled ? 'green' : 'grey'} isDisabled={!isEnabled}>
|
|
74
|
+
{isEnabled ? t('Enabled') : t('Disabled')}
|
|
75
|
+
</Label>
|
|
76
|
+
</Td>
|
|
77
|
+
<Td isActionCell>
|
|
78
|
+
<ActionsColumn items={actions} />
|
|
79
|
+
</Td>
|
|
80
|
+
</Tr>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default AuthProviderRow;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
EmptyStateActions,
|
|
5
|
+
EmptyStateBody,
|
|
6
|
+
EmptyStateFooter,
|
|
7
|
+
PageSection,
|
|
8
|
+
Stack,
|
|
9
|
+
StackItem,
|
|
10
|
+
Text,
|
|
11
|
+
TextContent,
|
|
12
|
+
TextVariants,
|
|
13
|
+
Title,
|
|
14
|
+
Toolbar,
|
|
15
|
+
ToolbarContent,
|
|
16
|
+
ToolbarItem,
|
|
17
|
+
} from '@patternfly/react-core';
|
|
18
|
+
import { Tbody } from '@patternfly/react-table';
|
|
19
|
+
import { TFunction } from 'i18next';
|
|
20
|
+
import { CubesIcon } from '@patternfly/react-icons/dist/js/icons/cubes-icon';
|
|
21
|
+
|
|
22
|
+
import ListPageBody from '../ListPage/ListPageBody';
|
|
23
|
+
import Table, { ApiSortTableColumn } from '../Table/Table';
|
|
24
|
+
import { useTranslation } from '../../hooks/useTranslation';
|
|
25
|
+
import AuthProviderRow from './AuthProviderRow';
|
|
26
|
+
import { useAuthProviders } from './useAuthProviders';
|
|
27
|
+
import ResourceListEmptyState from '../common/ResourceListEmptyState';
|
|
28
|
+
import PageWithPermissions from '../common/PageWithPermissions';
|
|
29
|
+
import { usePermissionsContext } from '../common/PermissionsContext';
|
|
30
|
+
import { RESOURCE, VERB } from '../../types/rbac';
|
|
31
|
+
import { ROUTE, useNavigate } from '../../hooks/useNavigate';
|
|
32
|
+
import DeleteAuthProviderModal from './AuthProviderDetails/DeleteAuthProviderModal';
|
|
33
|
+
|
|
34
|
+
const getColumns = (t: TFunction): ApiSortTableColumn[] => [
|
|
35
|
+
{
|
|
36
|
+
name: t('Name'),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: t('Type'),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: t('Issuer/Authorization URL'),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: t('Status'),
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const CreateAuthProviderButton = () => {
|
|
50
|
+
const { t } = useTranslation();
|
|
51
|
+
const navigate = useNavigate();
|
|
52
|
+
const { checkPermissions } = usePermissionsContext();
|
|
53
|
+
const [canCreate] = checkPermissions([{ kind: RESOURCE.AUTH_PROVIDER, verb: VERB.CREATE }]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
canCreate && (
|
|
57
|
+
<Button variant="primary" onClick={() => navigate(ROUTE.AUTH_PROVIDER_CREATE)}>
|
|
58
|
+
{t('Add authentication provider')}
|
|
59
|
+
</Button>
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const AuthProviderEmptyState = () => {
|
|
65
|
+
const { t } = useTranslation();
|
|
66
|
+
return (
|
|
67
|
+
<ResourceListEmptyState icon={CubesIcon} titleText={t('Add your first authentication providers')}>
|
|
68
|
+
<EmptyStateBody>
|
|
69
|
+
{t('Connect OIDC and OAuth2 providers to enable additional secure authentication options for your users.')}
|
|
70
|
+
</EmptyStateBody>
|
|
71
|
+
<EmptyStateFooter>
|
|
72
|
+
<EmptyStateActions>
|
|
73
|
+
<CreateAuthProviderButton />
|
|
74
|
+
</EmptyStateActions>
|
|
75
|
+
</EmptyStateFooter>
|
|
76
|
+
</ResourceListEmptyState>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const AuthProvidersTable = () => {
|
|
81
|
+
const { t } = useTranslation();
|
|
82
|
+
|
|
83
|
+
const providerColumns = React.useMemo(() => getColumns(t), [t]);
|
|
84
|
+
const { providers, isLoading, error, isUpdating, refetch } = useAuthProviders();
|
|
85
|
+
const [deleteModalProviderId, setDeleteModalProviderId] = React.useState<string>();
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<ListPageBody error={error} loading={isLoading}>
|
|
89
|
+
<Table
|
|
90
|
+
aria-label={t('Authentication providers list')}
|
|
91
|
+
loading={isUpdating}
|
|
92
|
+
columns={providerColumns}
|
|
93
|
+
emptyData={providers.length === 0}
|
|
94
|
+
>
|
|
95
|
+
<Tbody>
|
|
96
|
+
{providers.map((provider) => {
|
|
97
|
+
const providerId = provider.metadata.name as string;
|
|
98
|
+
return (
|
|
99
|
+
<AuthProviderRow
|
|
100
|
+
key={providerId}
|
|
101
|
+
provider={provider}
|
|
102
|
+
onDeleteClick={() => {
|
|
103
|
+
setDeleteModalProviderId(providerId);
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
})}
|
|
108
|
+
</Tbody>
|
|
109
|
+
</Table>
|
|
110
|
+
{!isUpdating && providers.length === 0 && <AuthProviderEmptyState />}
|
|
111
|
+
{deleteModalProviderId && (
|
|
112
|
+
<DeleteAuthProviderModal
|
|
113
|
+
authProviderId={deleteModalProviderId}
|
|
114
|
+
onClose={() => setDeleteModalProviderId(undefined)}
|
|
115
|
+
onDeleteSuccess={() => {
|
|
116
|
+
setDeleteModalProviderId(undefined);
|
|
117
|
+
refetch();
|
|
118
|
+
}}
|
|
119
|
+
/>
|
|
120
|
+
)}
|
|
121
|
+
</ListPageBody>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const AuthProvidersPage = () => {
|
|
126
|
+
const { t } = useTranslation();
|
|
127
|
+
|
|
128
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
129
|
+
const [canList] = checkPermissions([{ kind: RESOURCE.AUTH_PROVIDER, verb: VERB.LIST }]);
|
|
130
|
+
const navigate = useNavigate();
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<PageWithPermissions allowed={canList} loading={loading}>
|
|
134
|
+
<PageSection variant="light" type="breadcrumb">
|
|
135
|
+
<Stack hasGutter>
|
|
136
|
+
<StackItem>
|
|
137
|
+
<Title headingLevel="h1" size="3xl">
|
|
138
|
+
{t('Authentication')}
|
|
139
|
+
</Title>
|
|
140
|
+
<TextContent>
|
|
141
|
+
<Text component={TextVariants.small}>{t('Manage authentication providers')}</Text>
|
|
142
|
+
</TextContent>
|
|
143
|
+
</StackItem>
|
|
144
|
+
<StackItem>
|
|
145
|
+
<Toolbar>
|
|
146
|
+
<ToolbarContent>
|
|
147
|
+
<ToolbarItem>
|
|
148
|
+
<Title headingLevel="h2" size="lg">
|
|
149
|
+
{t('Authentication providers')}
|
|
150
|
+
</Title>
|
|
151
|
+
</ToolbarItem>
|
|
152
|
+
<ToolbarItem variant="separator" />
|
|
153
|
+
<ToolbarItem>
|
|
154
|
+
<Button variant="primary" onClick={() => navigate(ROUTE.AUTH_PROVIDER_CREATE)}>
|
|
155
|
+
{t('Add authentication provider')}
|
|
156
|
+
</Button>
|
|
157
|
+
</ToolbarItem>
|
|
158
|
+
</ToolbarContent>
|
|
159
|
+
</Toolbar>
|
|
160
|
+
</StackItem>
|
|
161
|
+
<AuthProvidersTable />
|
|
162
|
+
</Stack>
|
|
163
|
+
</PageSection>
|
|
164
|
+
</PageWithPermissions>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export default AuthProvidersPage;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FormGroup, FormSection, Split, SplitItem } from '@patternfly/react-core';
|
|
3
|
+
import { useFormikContext } from 'formik';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
6
|
+
import RadioField from '../../form/RadioField';
|
|
7
|
+
import TextField from '../../form/TextField';
|
|
8
|
+
import ListItemField from '../../form/ListItemField';
|
|
9
|
+
import { AuthProviderFormValues, OrgAssignmentType } from './types';
|
|
10
|
+
|
|
11
|
+
const OrganizationAssignmentSection = () => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const { values } = useFormikContext<AuthProviderFormValues>();
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<FormSection title={t('Organization assignment')} className="pf-v5-u-mt-md">
|
|
17
|
+
<Split hasGutter>
|
|
18
|
+
<SplitItem>
|
|
19
|
+
<RadioField
|
|
20
|
+
id="orgAssignmentStatic"
|
|
21
|
+
name="orgAssignmentType"
|
|
22
|
+
label={t('Static')}
|
|
23
|
+
checkedValue={OrgAssignmentType.Static}
|
|
24
|
+
/>
|
|
25
|
+
</SplitItem>
|
|
26
|
+
<SplitItem>
|
|
27
|
+
<RadioField
|
|
28
|
+
id="orgAssignmentDynamic"
|
|
29
|
+
name="orgAssignmentType"
|
|
30
|
+
label={t('Dynamic')}
|
|
31
|
+
checkedValue={OrgAssignmentType.Dynamic}
|
|
32
|
+
/>
|
|
33
|
+
</SplitItem>
|
|
34
|
+
<SplitItem>
|
|
35
|
+
<RadioField
|
|
36
|
+
id="orgAssignmentPerUser"
|
|
37
|
+
name="orgAssignmentType"
|
|
38
|
+
label={t('Per user')}
|
|
39
|
+
checkedValue={OrgAssignmentType.PerUser}
|
|
40
|
+
/>
|
|
41
|
+
</SplitItem>
|
|
42
|
+
</Split>
|
|
43
|
+
|
|
44
|
+
{values.orgAssignmentType === OrgAssignmentType.Static && (
|
|
45
|
+
<FormGroup label={t('External organization name')} isRequired>
|
|
46
|
+
<TextField
|
|
47
|
+
name="orgName"
|
|
48
|
+
aria-label={t('External organization name')}
|
|
49
|
+
helperText={t('Users from this provider will be assigned to this organization')}
|
|
50
|
+
/>
|
|
51
|
+
</FormGroup>
|
|
52
|
+
)}
|
|
53
|
+
|
|
54
|
+
{values.orgAssignmentType === OrgAssignmentType.Dynamic && (
|
|
55
|
+
<>
|
|
56
|
+
<FormGroup label={t('Claim path')} isRequired>
|
|
57
|
+
<ListItemField
|
|
58
|
+
name="claimPath"
|
|
59
|
+
helperText={t('Enter the path segments to the claim (e.g., ["groups"], ["custom_claims", "org_id"])')}
|
|
60
|
+
addButtonText={t('Add path segment')}
|
|
61
|
+
/>
|
|
62
|
+
</FormGroup>
|
|
63
|
+
<FormGroup label={t('Organization name prefix')}>
|
|
64
|
+
<TextField
|
|
65
|
+
name="orgNamePrefix"
|
|
66
|
+
aria-label={t('Organization name prefix')}
|
|
67
|
+
helperText={t('Optional prefix for the organization name')}
|
|
68
|
+
/>
|
|
69
|
+
</FormGroup>
|
|
70
|
+
<FormGroup label={t('Organization name suffix')}>
|
|
71
|
+
<TextField
|
|
72
|
+
name="orgNameSuffix"
|
|
73
|
+
aria-label={t('Organization name suffix')}
|
|
74
|
+
helperText={t('Optional suffix for the organization name')}
|
|
75
|
+
/>
|
|
76
|
+
</FormGroup>
|
|
77
|
+
</>
|
|
78
|
+
)}
|
|
79
|
+
|
|
80
|
+
{values.orgAssignmentType === OrgAssignmentType.PerUser && (
|
|
81
|
+
<>
|
|
82
|
+
<FormGroup label={t('Organization name prefix')}>
|
|
83
|
+
<TextField
|
|
84
|
+
name="orgNamePrefix"
|
|
85
|
+
aria-label={t('Organization name prefix')}
|
|
86
|
+
helperText={t('Optional prefix for the user-specific organization name')}
|
|
87
|
+
/>
|
|
88
|
+
</FormGroup>
|
|
89
|
+
<FormGroup label={t('Organization name suffix')}>
|
|
90
|
+
<TextField
|
|
91
|
+
name="orgNameSuffix"
|
|
92
|
+
aria-label={t('Organization name suffix')}
|
|
93
|
+
helperText={t('Optional suffix for the user-specific organization name')}
|
|
94
|
+
/>
|
|
95
|
+
</FormGroup>
|
|
96
|
+
</>
|
|
97
|
+
)}
|
|
98
|
+
</FormSection>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default OrganizationAssignmentSection;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
3
|
+
|
|
4
|
+
export const ScopesHelperText = () => {
|
|
5
|
+
const { t } = useTranslation();
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<p>
|
|
9
|
+
<strong>{t('Purpose')}:</strong>
|
|
10
|
+
{t('Scopes define the permissions your application requests from the provider.')}
|
|
11
|
+
</p>
|
|
12
|
+
<p>
|
|
13
|
+
<strong>{t('Configuration')}:</strong> {t("Check your provider's documentation for required scopes.")}
|
|
14
|
+
</p>
|
|
15
|
+
<p>
|
|
16
|
+
<strong>{t('Common examples')}:</strong> {t('openid, profile, email, groups.')}
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const UsernameClaimHelperText = () => {
|
|
23
|
+
const { t } = useTranslation();
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
<p>
|
|
27
|
+
<strong>{t('Purpose')}:</strong> {t('The claim field that contains the username.')}
|
|
28
|
+
</p>
|
|
29
|
+
<p>
|
|
30
|
+
<strong>{t('Format')}:</strong>{' '}
|
|
31
|
+
{t(
|
|
32
|
+
'Enter each segment of the claim path as a separate item. Simple claims like "email" require only one segment. For nested claims like "user.name", add multiple segments in order: first "user", then "name".',
|
|
33
|
+
)}
|
|
34
|
+
</p>
|
|
35
|
+
<p>
|
|
36
|
+
<strong>{t('Requirements')}:</strong>{' '}
|
|
37
|
+
{t(
|
|
38
|
+
'Each segment must start with a letter or underscore and contain only letters, numbers, dots or underscores.',
|
|
39
|
+
)}
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const RoleClaimHelperText = () => {
|
|
46
|
+
const { t } = useTranslation();
|
|
47
|
+
return (
|
|
48
|
+
<div>
|
|
49
|
+
<p>
|
|
50
|
+
<strong>{t('Purpose')}:</strong>{' '}
|
|
51
|
+
{t('The claim field that contains user roles or group memberships for authorization.')}
|
|
52
|
+
</p>
|
|
53
|
+
<p>
|
|
54
|
+
<strong>{t('Configuration')}:</strong> {t("Refer to your provider's documentation for the correct claim path.")}
|
|
55
|
+
</p>
|
|
56
|
+
<p>
|
|
57
|
+
<strong>{t('Format')}:</strong>{' '}
|
|
58
|
+
{t('Use an array of path segments (e.g., ["groups"], ["roles"], ["realm_access", "roles"]).')}
|
|
59
|
+
</p>
|
|
60
|
+
<p>
|
|
61
|
+
<strong>{t('Common examples')}:</strong> {t('["groups"], ["roles"], ["authorities"]')}
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const RoleSeparatorHelperText = () => {
|
|
68
|
+
const { t } = useTranslation();
|
|
69
|
+
return (
|
|
70
|
+
<div>
|
|
71
|
+
<p>
|
|
72
|
+
{t(
|
|
73
|
+
'Separator for org:role format (default: ":"). Roles containing the separator are split into organization-scoped roles. Roles without separator are global and apply to all organizations. Example: "org1:admin" becomes org-scoped role "admin" for organization "org1", while "admin" becomes a global role.',
|
|
74
|
+
)}
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Alert,
|
|
4
|
+
Breadcrumb,
|
|
5
|
+
BreadcrumbItem,
|
|
6
|
+
Bullseye,
|
|
7
|
+
PageSection,
|
|
8
|
+
PageSectionVariants,
|
|
9
|
+
Spinner,
|
|
10
|
+
Text,
|
|
11
|
+
TextContent,
|
|
12
|
+
TextVariants,
|
|
13
|
+
Title,
|
|
14
|
+
} from '@patternfly/react-core';
|
|
15
|
+
|
|
16
|
+
import { AuthProvider } from '@flightctl/types';
|
|
17
|
+
|
|
18
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
19
|
+
import { useFetch } from '../../../hooks/useFetch';
|
|
20
|
+
import { Link, ROUTE, useNavigate } from '../../../hooks/useNavigate';
|
|
21
|
+
import { useAppContext } from '../../../hooks/useAppContext';
|
|
22
|
+
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
23
|
+
import { isDynamicAuthProvider } from '../../../types/extraTypes';
|
|
24
|
+
import { getErrorMessage } from '../../../utils/error';
|
|
25
|
+
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
26
|
+
import { usePermissionsContext } from '../../common/PermissionsContext';
|
|
27
|
+
|
|
28
|
+
import CreateAuthProviderForm from './CreateAuthProviderForm';
|
|
29
|
+
|
|
30
|
+
const CreateAuthProvider = ({ authProviderId }: { authProviderId: string | undefined }) => {
|
|
31
|
+
const { t } = useTranslation();
|
|
32
|
+
const { get } = useFetch();
|
|
33
|
+
const [error, setError] = React.useState<string>();
|
|
34
|
+
const [isLoading, setIsLoading] = React.useState(!!authProviderId);
|
|
35
|
+
const [authProviderDetails, setAuthProviderDetails] = React.useState<AuthProvider>();
|
|
36
|
+
const navigate = useNavigate();
|
|
37
|
+
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
const fetchAuthProvider = async () => {
|
|
40
|
+
setIsLoading(true);
|
|
41
|
+
try {
|
|
42
|
+
const provider = await get<AuthProvider>(`authproviders/${authProviderId}`);
|
|
43
|
+
// API should not return non-dynamic providers, but we add the check for safety
|
|
44
|
+
if (!isDynamicAuthProvider(provider)) {
|
|
45
|
+
throw new Error('Authentication providers of type ' + provider.spec.providerType + ' cannot be modified');
|
|
46
|
+
}
|
|
47
|
+
setAuthProviderDetails(provider);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
setError(getErrorMessage(e));
|
|
50
|
+
} finally {
|
|
51
|
+
setIsLoading(false);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
if (authProviderId) {
|
|
56
|
+
void fetchAuthProvider();
|
|
57
|
+
}
|
|
58
|
+
}, [get, authProviderId]);
|
|
59
|
+
|
|
60
|
+
let content: React.ReactNode;
|
|
61
|
+
if (error) {
|
|
62
|
+
content = (
|
|
63
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
64
|
+
<div>
|
|
65
|
+
{t('Failed to retrieve authentication provider details')}: {error}
|
|
66
|
+
</div>
|
|
67
|
+
</Alert>
|
|
68
|
+
);
|
|
69
|
+
} else if (isLoading) {
|
|
70
|
+
content = (
|
|
71
|
+
<Bullseye>
|
|
72
|
+
<Spinner />
|
|
73
|
+
</Bullseye>
|
|
74
|
+
);
|
|
75
|
+
} else {
|
|
76
|
+
content = (
|
|
77
|
+
<CreateAuthProviderForm
|
|
78
|
+
authProvider={authProviderDetails}
|
|
79
|
+
onClose={() => navigate(ROUTE.AUTH_PROVIDERS)}
|
|
80
|
+
onSuccess={(authProvider) =>
|
|
81
|
+
navigate({ route: ROUTE.AUTH_PROVIDER_DETAILS, postfix: authProvider.metadata.name })
|
|
82
|
+
}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
let title: string;
|
|
88
|
+
if (!!authProviderDetails) {
|
|
89
|
+
title = t('Edit authentication provider');
|
|
90
|
+
} else {
|
|
91
|
+
title = t('Add authentication provider');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<>
|
|
96
|
+
<PageSection variant="light" type="breadcrumb">
|
|
97
|
+
<Breadcrumb>
|
|
98
|
+
<BreadcrumbItem>
|
|
99
|
+
<Link to={ROUTE.AUTH_PROVIDERS}>{t('Authentication providers')}</Link>
|
|
100
|
+
</BreadcrumbItem>
|
|
101
|
+
{authProviderId && (
|
|
102
|
+
<BreadcrumbItem>
|
|
103
|
+
<Link to={{ route: ROUTE.AUTH_PROVIDER_DETAILS, postfix: authProviderId }}>{authProviderId}</Link>
|
|
104
|
+
</BreadcrumbItem>
|
|
105
|
+
)}
|
|
106
|
+
<BreadcrumbItem isActive>{title}</BreadcrumbItem>
|
|
107
|
+
</Breadcrumb>
|
|
108
|
+
</PageSection>
|
|
109
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
110
|
+
<Title headingLevel="h1" size="3xl">
|
|
111
|
+
{title}
|
|
112
|
+
</Title>
|
|
113
|
+
<TextContent>
|
|
114
|
+
<Text component={TextVariants.small}>
|
|
115
|
+
{t("Set up how users will sign in and which organization they'll be assigned to.")}
|
|
116
|
+
</Text>
|
|
117
|
+
</TextContent>
|
|
118
|
+
</PageSection>
|
|
119
|
+
<PageSection variant={PageSectionVariants.light} className="pf-v5-u-pt-0">
|
|
120
|
+
{content}
|
|
121
|
+
</PageSection>
|
|
122
|
+
</>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const createAuthProviderPermissions = [
|
|
127
|
+
{ kind: RESOURCE.AUTH_PROVIDER, verb: VERB.CREATE },
|
|
128
|
+
{ kind: RESOURCE.AUTH_PROVIDER, verb: VERB.PATCH },
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
const CreateAuthProviderWithPermissions = () => {
|
|
132
|
+
const {
|
|
133
|
+
router: { useParams },
|
|
134
|
+
} = useAppContext();
|
|
135
|
+
const { authProviderId } = useParams<{ authProviderId: string }>();
|
|
136
|
+
const { checkPermissions, loading } = usePermissionsContext();
|
|
137
|
+
const [createAllowed, patchAllowed] = checkPermissions(createAuthProviderPermissions);
|
|
138
|
+
return (
|
|
139
|
+
<PageWithPermissions allowed={authProviderId ? patchAllowed : createAllowed} loading={loading}>
|
|
140
|
+
<CreateAuthProvider authProviderId={authProviderId} />
|
|
141
|
+
</PageWithPermissions>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default CreateAuthProviderWithPermissions;
|