]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20532 Confirmation toast after saving github roles
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>
Thu, 28 Sep 2023 15:42:08 +0000 (17:42 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 3 Oct 2023 20:02:47 +0000 (20:02 +0000)
server/sonar-web/src/main/js/queries/identity-provider.ts
server/sonar-web/src/main/js/queries/settings.ts
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 85e8d706bae845c7c8b5836336d74e5ec671e3ea..c37a624849479bd23fef56f5708b44e2afa3fbab 100644 (file)
@@ -37,6 +37,8 @@ import {
 } from '../api/provisioning';
 import { getSystemInfo } from '../api/system';
 import { AvailableFeaturesContext } from '../app/components/available-features/AvailableFeaturesContext';
+import { addGlobalSuccessMessage } from '../helpers/globalMessages';
+import { translate } from '../helpers/l10n';
 import { mapReactQueryResult } from '../helpers/react-query';
 import { Feature } from '../types/features';
 import { GitHubMapping } from '../types/provisioning';
@@ -175,6 +177,9 @@ export function useGithubRolesMappingMutation() {
         );
         client.setQueryData(queryKey, newData);
       }
+      addGlobalSuccessMessage(
+        translate('settings.authentication.github.configuration.roles_mapping.save_success'),
+      );
     },
   });
 }
index c55f7f1f53c72cf0717faefa4dc26e46667e599c..0d6eac585c7a5825bb2f3572f1c8074856a66cbc 100644 (file)
@@ -19,6 +19,8 @@
  */
 import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
 import { getValue, getValues, resetSettingValue, setSettingValue } from '../api/settings';
+import { addGlobalSuccessMessage } from '../helpers/globalMessages';
+import { translate } from '../helpers/l10n';
 import { ExtendedSettingDefinition } from '../types/settings';
 
 type SettingValue = string | boolean | string[];
@@ -74,6 +76,7 @@ export function useSaveValuesMutation() {
     onSuccess: (data) => {
       if (data.length > 0) {
         queryClient.invalidateQueries(['settings']);
+        addGlobalSuccessMessage(translate('settings.authentication.form.settings.save_success'));
       }
     },
   });
@@ -97,6 +100,7 @@ export function useSaveValueMutation() {
     },
     onSuccess: () => {
       queryClient.invalidateQueries(['settings']);
+      addGlobalSuccessMessage(translate('settings.authentication.form.settings.save_success'));
     },
   });
 }
index 47fddcc4e356e3ef50576aa9e4d9fe36984207f0..193f4c37ff1a0b5ce1aad4e11bd42ec66d855072 100644 (file)
@@ -1487,6 +1487,7 @@ settings.authentication.form.disable=Disable configuration
 settings.authentication.form.provisioning=Provisioning
 settings.authentication.form.provisioning_at_login=Just-in-Time user and group provisioning (default)
 settings.authentication.form.other_provisioning_enabled=Already enabled for another provider.  Only one identity provider can have automatic users and groups provisioning enabled.
+settings.authentication.form.settings.save_success=Settings saved successfully.
 
 # GITHUB
 settings.authentication.form.create.github=New GitHub Configuration
@@ -1544,6 +1545,7 @@ settings.authentication.github.configuration.roles_mapping.dialog.custom_roles_d
 settings.authentication.github.configuration.roles_mapping.dialog.delete_custom_role=Delete custom role {0}
 settings.authentication.github.configuration.roles_mapping.role_exists=Role already exists.
 settings.authentication.github.configuration.roles_mapping.empty_custom_role=Custom roles should have some permissions.
+settings.authentication.github.configuration.roles_mapping.save_success=GitHub roles mapping saved successfully.
 settings.authentication.github.configuration.unsaved_changes=You have unsaved changes.
 
 # SAML