mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-04 13:26:30 +00:00
chore(ui): Added error logs for missing config values (#21541)
* added error logs for corrupt or missing config values * update console info to warn * update localization files * address pr comments (cherry picked from commit da5cfff72452bc71b67bf2c581545a748635dfd0)
This commit is contained in:
parent
92be66904e
commit
5beb7b39f3
@ -74,6 +74,7 @@ import {
|
||||
getUserManagerConfig,
|
||||
isProtectedRoute,
|
||||
prepareUserProfileFromClaims,
|
||||
validateAuthFields,
|
||||
} from '../../../utils/AuthProvider.util';
|
||||
import {
|
||||
getOidcToken,
|
||||
@ -608,6 +609,7 @@ export const AuthProvider = ({
|
||||
// show an error toast if provider is null or not supported
|
||||
if (provider && Object.values(AuthProviderEnum).includes(provider)) {
|
||||
const configJson = getAuthConfig(authConfig);
|
||||
validateAuthFields(configJson, t);
|
||||
setJwtPrincipalClaims(authConfig.jwtPrincipalClaims);
|
||||
setJwtPrincipalClaimsMapping(authConfig.jwtPrincipalClaimsMapping);
|
||||
setAuthConfig(configJson);
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Überwachen Sie die Gesundheit Ihrer Datenobjekte mit Metriken.",
|
||||
"minimum-value-error": "Der Minimalwert sollte kleiner als der Maximalwert sein.",
|
||||
"minute": "Minute",
|
||||
"missing-config-value": "Fehlender Konfigurationswert: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Ändern Sie die Hierarchie, indem Sie die übergeordnete {{entity}} ändern.",
|
||||
"most-active-users": "Zeigt die aktivsten Benutzer auf der Plattform basierend auf Seitenaufrufen.",
|
||||
"most-expensive-queries-widget-description": "Top 5 der aufwändigsten Abfragen für die Datenvermögenswerte im Dienst. <0>Mehr erfahren.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Minute",
|
||||
"missing-config-value": "Missing config value: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Displays the most active users on the platform based on Page Views.",
|
||||
"most-expensive-queries-widget-description": "Top 5 most expensive queries for the data assets in the service. <0>learn more.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Minuto",
|
||||
"missing-config-value": "Falta el valor de configuración: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Muestra los usuarios más activos en la plataforma basado en las vistas de página.",
|
||||
"most-expensive-queries-widget-description": "Las 5 consultas más costosas para los activos de datos en el servicio. <0>saber más.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "La vleur minimum value doit être plus petite que la valeur maximum.",
|
||||
"minute": "Minute",
|
||||
"missing-config-value": "Valeur de configuration manquante : {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modifier la hiérarchie en changeant le {{entity}} parent.",
|
||||
"most-active-users": "Affiche les utilisateurs les plus actifs en fonction du nombre de consultations de pages.",
|
||||
"most-expensive-queries-widget-description": "Top 5 des requêtes les plus coûteuses pour les actifs de données dans le service. <0>en savoir plus.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Fai un seguimento da saúde dos teus activos de datos con métricas.",
|
||||
"minimum-value-error": "O valor mínimo debe ser menor que o valor máximo.",
|
||||
"minute": "Minuto",
|
||||
"missing-config-value": "Falta o valor de configuración: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modifica a xerarquía cambiando o {{entity}} Pai.",
|
||||
"most-active-users": "Mostra os usuarios máis activos na plataforma baseándose nas Vistas de Páxina.",
|
||||
"most-expensive-queries-widget-description": "As 5 consultas máis custosas para os activos de datos no servizo. <0>saber máis.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "דקה",
|
||||
"missing-config-value": "חסר ערך הגדרה: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "מציג את המשתמשים הפעילים ביותר בפלטפורמה על פי צפיות בדף.",
|
||||
"most-expensive-queries-widget-description": "5 השאילתות היקרות ביותר עבור נכסי הנתונים בשירות. <0>למד עוד</0>.",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "分",
|
||||
"missing-config-value": "設定値が不足しています: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "ページビューベースの最もアクティブなユーザの表示。",
|
||||
"most-expensive-queries-widget-description": "サービス内のデータアセットにおける最もコストの高い上位5つのクエリ。<0>詳細を見る。</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "메트릭을 사용하여 데이터 자산의 상태를 추적하세요.",
|
||||
"minimum-value-error": "최소값은 최대값보다 작아야 합니다.",
|
||||
"minute": "분",
|
||||
"missing-config-value": "누락된 구성 값: {{field}}",
|
||||
"modify-hierarchy-entity-description": "상위 {{entity}}를 변경하여 계층 구조를 수정합니다.",
|
||||
"most-active-users": "페이지 조회수를 기반으로 플랫폼에서 가장 활발한 사용자를 표시합니다.",
|
||||
"most-expensive-queries-widget-description": "서비스 내에서 가장 많이 사용된 데이터 자산 상위 5개입니다. <0>자세히 알아보기.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "तुमच्या डेटा ॲसेट्सच्या आरोग्याचा मेट्रिक्ससह मागोवा घ्या.",
|
||||
"minimum-value-error": "किमान मूल्य कमाल मूल्यापेक्षा लहान असावे.",
|
||||
"minute": "मिनिट",
|
||||
"missing-config-value": "कॉन्फिगरेशन व्हॅल्यू गहाळ आहे: {{field}}",
|
||||
"modify-hierarchy-entity-description": "पालक {{entity}} बदलून श्रेणीक्रम बदल करा.",
|
||||
"most-active-users": "पृष्ठ दृश्यांवर आधारित प्लॅटफॉर्मवरील सर्वात सक्रिय वापरकर्ते दर्शवते.",
|
||||
"most-expensive-queries-widget-description": "सेवेतील डेटा मालमत्तांसाठी शीर्ष 5 सर्वात महाग क्वेरी. <0>अधिक जाणून घ्या.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Minuut",
|
||||
"missing-config-value": "Ontbrekende configuratiewaarde: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Toont de meest actieve gebruikers op het platform op basis van paginaweergaven.",
|
||||
"most-expensive-queries-widget-description": "Top 5 meest kostbare queries voor de data-assets in de service. <0>meer informatie.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "سلامت داراییهای دادهای خود را با متریکها دنبال کنید.",
|
||||
"minimum-value-error": "مقدار حداقل باید کوچکتر از مقدار حداکثر باشد.",
|
||||
"minute": "دقیقه",
|
||||
"missing-config-value": "مقدار پیکربندی گم شده: {{field}}",
|
||||
"modify-hierarchy-entity-description": "با تغییر والد {{entity}}، سلسلهمراتب را ویرایش کنید.",
|
||||
"most-active-users": "فعالترین کاربران بر اساس بازدیدهای صفحه را نمایش میدهد.",
|
||||
"most-expensive-queries-widget-description": "5 کوئری پرهزینه برتر برای داراییهای داده در سرویس. <0>بیشتر بدانید.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Minuto",
|
||||
"missing-config-value": "Valor de configuração ausente: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Exibe os usuários mais ativos na plataforma com base nas Visualizações de Página.",
|
||||
"most-expensive-queries-widget-description": "Top 5 consultas mais caras para os ativos de dados no serviço. <0>saiba mais.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Confirme o bom estado dos seus conjuntos de dados com as métricas.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Minuto",
|
||||
"missing-config-value": "Valor de configuração em falta: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Exibe os Utilizadores mais ativos na plataforma com base nas Visualizações de Página.",
|
||||
"most-expensive-queries-widget-description": "Top 5 consultas mais dispendiosas para os ativos de dados no serviço. <0>saber mais.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Минута",
|
||||
"missing-config-value": "Отсутствует значение конфигурации: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Отображает самых активных пользователей на платформе на основе просмотров страниц.",
|
||||
"most-expensive-queries-widget-description": "Топ-5 самых дорогих запросов для объектов данных в сервисе. <0>узнать больше.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "The minimum value should be smaller than the maximum value.",
|
||||
"minute": "Minute",
|
||||
"missing-config-value": "ค่าการกำหนดค่าที่หายไป: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Modify the hierarchy by changing the Parent {{entity}}.",
|
||||
"most-active-users": "Displays the most active users on the platform based on Page Views.",
|
||||
"most-expensive-queries-widget-description": "5 อันดับคิวรีที่ใช้ทรัพยากรมากที่สุดสำหรับสินทรัพย์ข้อมูลในบริการ <0>เรียนรู้เพิ่มเติม</0>",
|
||||
|
@ -593,6 +593,7 @@
|
||||
"foreign": "Yabancı",
|
||||
"foreign-key": "Yabancı Anahtar",
|
||||
"forgot-password": "Şifremi Unuttum",
|
||||
"forgot-your-password": "Forgot your password?",
|
||||
"format": "Biçim",
|
||||
"fqn-uppercase": "FQN",
|
||||
"frequently-joined-column-plural": "Sık Birleştirilen Sütunlar",
|
||||
@ -1837,6 +1838,7 @@
|
||||
"metric-description": "Metriklerle veri varlıklarınızın sağlığını izleyin.",
|
||||
"minimum-value-error": "Minimum değer maksimum değerden küçük olmalıdır.",
|
||||
"minute": "Dakika",
|
||||
"missing-config-value": "Eksik yapılandırma değeri: {{field}}",
|
||||
"modify-hierarchy-entity-description": "Üst {{entity}} değiştirerek hiyerarşiyi değiştirin.",
|
||||
"most-active-users": "Sayfa Görüntülemelerine göre platformdaki en aktif kullanıcıları görüntüler.",
|
||||
"most-expensive-queries-widget-description": "Servisteki veri varlıkları için en maliyetli ilk 5 sorgu. <0>daha fazla bilgi edinin.</0>",
|
||||
|
@ -1838,6 +1838,7 @@
|
||||
"metric-description": "Track the health of your data assets with metrics.",
|
||||
"minimum-value-error": "最小值应小于最大值",
|
||||
"minute": "分钟",
|
||||
"missing-config-value": "缺少配置值:{{field}}",
|
||||
"modify-hierarchy-entity-description": "通过更改父{{entity}}来修改层级结构.",
|
||||
"most-active-users": "显示平台上最活跃的用户(基于页面浏览量)",
|
||||
"most-expensive-queries-widget-description": "服务中数据资产的前 5 个最昂贵查询。<0>了解更多。</0>",
|
||||
|
@ -440,3 +440,24 @@ export const parseMSALResponse = (response: AuthenticationResult): OidcUser => {
|
||||
|
||||
return user;
|
||||
};
|
||||
|
||||
export const requiredAuthFields = [
|
||||
'authority',
|
||||
'clientId',
|
||||
'callbackUrl',
|
||||
'provider',
|
||||
];
|
||||
|
||||
export const validateAuthFields = (
|
||||
configJson: AuthenticationConfigurationWithScope,
|
||||
t: (key: string, options?: any) => string
|
||||
) => {
|
||||
requiredAuthFields.forEach((field) => {
|
||||
const value =
|
||||
configJson[field as keyof AuthenticationConfigurationWithScope];
|
||||
if (isEmpty(value)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(t('message.missing-config-value', { field }));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user