diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Auth/AppAuthenticators/MsalAuthenticator.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Auth/AppAuthenticators/MsalAuthenticator.tsx index 6ec4eba160b..a11553d84f3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Auth/AppAuthenticators/MsalAuthenticator.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Auth/AppAuthenticators/MsalAuthenticator.tsx @@ -26,8 +26,11 @@ import React, { useImperativeHandle, } from 'react'; import { useMutex } from 'react-context-mutex'; +import { toast } from 'react-toastify'; import { useApplicationStore } from '../../../hooks/useApplicationStore'; import { msalLoginRequest } from '../../../utils/AuthProvider.util'; +import { getPopupSettingLink } from '../../../utils/BrowserUtils'; +import { Transi18next } from '../../../utils/CommonUtils'; import { AuthenticatorRef, OidcUser, @@ -114,6 +117,20 @@ const MsalAuthenticator = forwardRef( .catch((e) => { // eslint-disable-next-line no-console console.error(e); + if (e?.message?.includes('popup_window_error')) { + toast.error( + + } + /> + ); + } throw e; }); diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json index de0f6ee4802..1a44eda6024 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Drücke Enter, um Datenvermögenswerte mit <0>{{keyword}}<0> zu finden.", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Überprüfe die Spaltennamen, um PII-sensitive/nicht sensitive Spalten automatisch zu taggen.", "process-pii-sensitive-column-message-profiler": "Wenn aktiviert, wird die Beispiel-Daten analysiert, um geeignete PII-Tags für jede Spalte zu bestimmen.", "profile-sample-percentage-message": "Setze den Profiler-Wert als Prozentsatz", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 2673f52eec0..25c3016b28e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Press Enter to find data assets containing <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Check column names to auto tag PII Senstive/nonSensitive columns.", "process-pii-sensitive-column-message-profiler": "When enabled, the sample data will be analysed to determine appropriate PII tags for each column", "profile-sample-percentage-message": "Set the Profiler value as percentage", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index 9c37723edf0..080f8be24b0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Presiona Enter para encontrar activos de datos que contengan <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Por favor, escribe {{text}} para confirmar.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Revisa los nombres de las columnas para etiquetar automáticamente las columnas sensibles/no sensibles de PII.", "process-pii-sensitive-column-message-profiler": "Cuando está habilitado, los datos de muestra se analizarán para determinar las etiquetas de PII apropiadas para cada columna.", "profile-sample-percentage-message": "Establece el valor del perfilador como porcentaje", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index aa7a5220f36..3a9abe72a59 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Appuyez sur Entrée pour trouver les actifs de données contenant <0>{{keyword}}", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Vérifiez les noms de colonne pour marquer automatiquement les colonnes sensibles/non sensibles.", "process-pii-sensitive-column-message-profiler": "Quand activé, les données d'échantillon seront analysées pour déterminer les balises PII appropriées pour chaque colonne.", "profile-sample-percentage-message": "Configurez la valeur du profilage en pourcentage.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json index 69918703fec..c625ceeead6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "יש ללחוץ Enter כדי למצוא נכסי נתונים הכוללים <0>{{keyword}}", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "בדוק את שמות העמודות כדי לקבוע תגי PII Sensistive/NonSensitive באופן אוטומטי.", "process-pii-sensitive-column-message-profiler": "כאשר מופעל, המידע הדוגמא ינתח כדי לקבוע תגי PII המתאימים לכל עמודה.", "profile-sample-percentage-message": "הגדר את ערך הפרופילר כאחוז", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index 75cf9ad0d92..da550caaccc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Press Enter to find data assets containing <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Check column names to auto tag PII Senstive/nonSensitive columns.", "process-pii-sensitive-column-message-profiler": "When enabled, the sample data will be analysed to determine appropriate PII tags for each column", "profile-sample-percentage-message": "Set the Profiler value as percentage", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json index e77084566c6..b5ecc6d1bde 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Druk op Enter om data-assets te vinden met <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Typ alstublieft {{text}} om te bevestigen.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Controleer kolomnamen om PII-gevoelige/niet-gevoelige kolommen automatisch te taggen.", "process-pii-sensitive-column-message-profiler": "Indien ingeschakeld, wordt de voorbeelddata geanalyseerd om geschikte PII-tags voor elke kolom te bepalen", "profile-sample-percentage-message": "Stel de Profiler-waarde in als percentage", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index 9fec3f38fa4..f98cebc6dfb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Pressione Enter para encontrar ativos de dados contendo <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Digite {{text}} para confirmar.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Verifique os nomes das colunas para marcar automaticamente as colunas PII Sensíveis/Não Sensíveis.", "process-pii-sensitive-column-message-profiler": "Quando ativado, os dados de amostra serão analisados para determinar as tags PII apropriadas para cada coluna.", "profile-sample-percentage-message": "Defina o valor do Examinador como porcentagem", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json index 931241dce16..87825d43999 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Press Enter to find data assets containing <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "Проверьте имена столбцов, чтобы автоматически пометить столбцы с конфиденциальной/неконфиденциальной информацией PII.", "process-pii-sensitive-column-message-profiler": "Если эта функция включена, образцы данных будут проанализированы для определения соответствующих тегов PII для каждого столбца.", "profile-sample-percentage-message": "Установите значение профайлера в процентах", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index 63eb3d2632d..3f65fafbdd1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -1658,6 +1658,7 @@ "please-enter-to-find-data-assets": "Press Enter to find data assets containing <0>{{keyword}}<0>", "please-refresh-the-page": "Please refresh the page to see the changes.", "please-type-text-to-confirm": "Please type {{text}} to confirm.", + "popup-block-message": "The sign in pop-up was blocked by the browser. Please <0>enable it and try again.", "process-pii-sensitive-column-message": "检查列名以自动标记PII敏感/非敏感列", "process-pii-sensitive-column-message-profiler": "启用后,将分析样本数据以确定每个列的适当PII标记", "profile-sample-percentage-message": "将分析器值设置为百分比", diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/BrowserUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/BrowserUtils.ts new file mode 100644 index 00000000000..c03ee1eabb8 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/utils/BrowserUtils.ts @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export const getBrowser = () => { + const userAgent = navigator.userAgent; + + if (userAgent.match(/chrome|chromium|crios/i)) { + return 'Chrome'; + } else if (userAgent.match(/firefox|fxios/i)) { + return 'Firefox'; + } else if (userAgent.match(/safari/i)) { + return 'Safari'; + } else if (userAgent.match(/opr\//i)) { + return 'Opera'; + } else if (userAgent.match(/edg/i)) { + return 'Edge'; + } else { + return 'Other'; + } +}; + +export const getPopupSettingLink = () => { + const browser = getBrowser(); + switch (browser) { + case 'Chrome': + return 'https://support.google.com/chrome/answer/95472'; + case 'Firefox': + return 'https://support.mozilla.org/en-US/kb/pop-blocker-settings-exceptions-troubleshooting'; + case 'Safari': + return 'https://support.apple.com/en-in/guide/safari/sfri40696/mac'; + case 'Opera': + return 'https://help.opera.com/en/latest/web-preferences/#popUps'; + case 'Edge': + return 'https://support.microsoft.com/en-us/microsoft-edge/block-pop-ups-in-microsoft-edge-1d8ba4f8-f385-9a0b-e944-aa47339b6bb5'; + default: + return ''; + } +};