From b0b2ff56e95ee0451541991f879d4c41c4a13586 Mon Sep 17 00:00:00 2001 From: MilosPaunovic Date: Wed, 12 Feb 2025 14:22:18 +0100 Subject: [PATCH 1/4] chore(ui): add validation messages for custom dashboard crud actions --- ui/src/components/dashboard/components/DashboardCreate.vue | 2 +- ui/src/translations/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/components/dashboard/components/DashboardCreate.vue b/ui/src/components/dashboard/components/DashboardCreate.vue index c8db9cd399b..c91f33f3045 100644 --- a/ui/src/components/dashboard/components/DashboardCreate.vue +++ b/ui/src/components/dashboard/components/DashboardCreate.vue @@ -154,7 +154,7 @@ charts: async save(input) { const dashboard = await this.$store.dispatch("dashboard/create", input); - this.$toast().saved(dashboard.title); + this.$toast().success(this.$t("custom_dashboard_validate_creation", {title: dashboard.title})); this.$store.dispatch("core/isUnsaved", false); this.$router.push({name: "home", params: {id: dashboard.id}}); diff --git a/ui/src/translations/en.json b/ui/src/translations/en.json index 28a66713943..948dd3c6561 100644 --- a/ui/src/translations/en.json +++ b/ui/src/translations/en.json @@ -1055,6 +1055,7 @@ "default_dashboard": "Default Dashboard", "custom_dashboard": "Custom Dashboards", "create_custom_dashboard": "Create new dashboard", + "custom_dashboard_validate_creation": "Dashboard {title} is created.", "create_dashboard": "Create Dashboard", "edit_custom_dashboard": "Edit Dashboard", "custom_dashboard_empty": "There are no results to be shown.", From b7e7f58bf298ac4cb2a0bafaabfb2c67735560e9 Mon Sep 17 00:00:00 2001 From: MilosPaunovic Date: Wed, 12 Feb 2025 14:27:02 +0100 Subject: [PATCH 2/4] chore(ui): add validation messages for custom dashboard crud actions --- .../override/components/dashboard/components/DashboardEdit.vue | 2 +- ui/src/translations/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/override/components/dashboard/components/DashboardEdit.vue b/ui/src/override/components/dashboard/components/DashboardEdit.vue index a783a0e2e18..d2e63b1f1d8 100644 --- a/ui/src/override/components/dashboard/components/DashboardEdit.vue +++ b/ui/src/override/components/dashboard/components/DashboardEdit.vue @@ -27,7 +27,7 @@ source: input, }); - this.$toast().saved(response.title); + this.$toast().success(this.$t("custom_dashboard_validate_editing", {title: response.title})); this.$store.dispatch("core/isUnsaved", false); }, diff --git a/ui/src/translations/en.json b/ui/src/translations/en.json index 948dd3c6561..63e59a85ee4 100644 --- a/ui/src/translations/en.json +++ b/ui/src/translations/en.json @@ -1058,6 +1058,7 @@ "custom_dashboard_validate_creation": "Dashboard {title} is created.", "create_dashboard": "Create Dashboard", "edit_custom_dashboard": "Edit Dashboard", + "custom_dashboard_validate_editing": "Changes in dashboard {title} are saved.", "custom_dashboard_empty": "There are no results to be shown.", "filters": { "label": "Choose filters", From 757ef3f25fb04dc1d93cc0753fcaff8608450c55 Mon Sep 17 00:00:00 2001 From: MilosPaunovic Date: Wed, 12 Feb 2025 14:36:00 +0100 Subject: [PATCH 3/4] chore(ui): add validation messages for custom dashboard crud actions --- ui/src/components/filter/segments/Dashboards.vue | 6 +++--- ui/src/translations/en.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/components/filter/segments/Dashboards.vue b/ui/src/components/filter/segments/Dashboards.vue index 13586060b74..ad72446b03b 100644 --- a/ui/src/components/filter/segments/Dashboards.vue +++ b/ui/src/components/filter/segments/Dashboards.vue @@ -86,10 +86,10 @@ const toast = getCurrentInstance().appContext.config.globalProperties.$toast(); const remove = (dashboard: any) => { - toast.confirm(t("delete confirm", {name: dashboard.title}), () => { - store.dispatch("dashboard/delete", dashboard.id).then((item) => { + toast.confirm(t("custom_dashboard_confirm_deletion", {title: dashboard.title}), () => { + store.dispatch("dashboard/delete", dashboard.id).then(() => { dashboards.value = dashboards.value.filter((d) => d.id !== dashboard.id); - toast.deleted(item.title); + toast.deleted(dashboard.title); router.push({name: "home"}); }); }); diff --git a/ui/src/translations/en.json b/ui/src/translations/en.json index 63e59a85ee4..9005f19abb9 100644 --- a/ui/src/translations/en.json +++ b/ui/src/translations/en.json @@ -1059,6 +1059,7 @@ "create_dashboard": "Create Dashboard", "edit_custom_dashboard": "Edit Dashboard", "custom_dashboard_validate_editing": "Changes in dashboard {title} are saved.", + "custom_dashboard_confirm_deletion": "Are you sure you want to delete {title} dashboard?", "custom_dashboard_empty": "There are no results to be shown.", "filters": { "label": "Choose filters", From 768fc1ecef4401340fe685beb2cd72ba1e689e6a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 12 Feb 2025 13:37:44 +0000 Subject: [PATCH 4/4] chore(translations): auto generate values for languages other than english --- ui/src/translations/de.json | 5 ++++- ui/src/translations/es.json | 5 ++++- ui/src/translations/fr.json | 5 ++++- ui/src/translations/hi.json | 5 ++++- ui/src/translations/it.json | 5 ++++- ui/src/translations/ja.json | 5 ++++- ui/src/translations/ko.json | 5 ++++- ui/src/translations/pl.json | 5 ++++- ui/src/translations/pt.json | 5 ++++- ui/src/translations/ru.json | 5 ++++- ui/src/translations/zh_CN.json | 5 ++++- 11 files changed, 44 insertions(+), 11 deletions(-) diff --git a/ui/src/translations/de.json b/ui/src/translations/de.json index 6df24ce746c..5e580ae5bb7 100644 --- a/ui/src/translations/de.json +++ b/ui/src/translations/de.json @@ -1175,6 +1175,9 @@ "label": "Eigenschaften" }, "debug": "Debuggen", - "default": "Standard" + "default": "Standard", + "custom_dashboard_confirm_deletion": "Möchten Sie das Dashboard {title} wirklich löschen?", + "custom_dashboard_validate_editing": "Änderungen im Dashboard {title} sind gespeichert.", + "custom_dashboard_validate_creation": "Dashboard {title} wurde erstellt." } } \ No newline at end of file diff --git a/ui/src/translations/es.json b/ui/src/translations/es.json index 1f0accb5f2e..73b5ee32a51 100644 --- a/ui/src/translations/es.json +++ b/ui/src/translations/es.json @@ -1175,6 +1175,9 @@ "label": "Propiedades" }, "debug": "Depuración", - "default": "Predeterminado" + "default": "Predeterminado", + "custom_dashboard_confirm_deletion": "¿Está seguro de que desea eliminar el dashboard {title}?", + "custom_dashboard_validate_editing": "Los cambios en el dashboard {title} se han guardado.", + "custom_dashboard_validate_creation": "El Dashboard {title} ha sido creado." } } \ No newline at end of file diff --git a/ui/src/translations/fr.json b/ui/src/translations/fr.json index 7d6c1a2194c..936af0d744d 100644 --- a/ui/src/translations/fr.json +++ b/ui/src/translations/fr.json @@ -1175,6 +1175,9 @@ "label": "Propriétés" }, "debug": "Déboguer", - "default": "Par défaut" + "default": "Par défaut", + "custom_dashboard_confirm_deletion": "Êtes-vous sûr de vouloir supprimer le tableau de bord {title} ?", + "custom_dashboard_validate_editing": "Les modifications dans le tableau de bord {title} sont enregistrées.", + "custom_dashboard_validate_creation": "Tableau de bord {title} est créé." } } \ No newline at end of file diff --git a/ui/src/translations/hi.json b/ui/src/translations/hi.json index 693bd7088fc..6ad220ac1e5 100644 --- a/ui/src/translations/hi.json +++ b/ui/src/translations/hi.json @@ -1175,6 +1175,9 @@ "label": "गुणधर्म" }, "debug": "डिबग", - "default": "डिफ़ॉल्ट" + "default": "डिफ़ॉल्ट", + "custom_dashboard_confirm_deletion": "क्या आप वाकई {title} डैशबोर्ड को हटाना चाहते हैं?", + "custom_dashboard_validate_editing": "डैशबोर्ड {title} में परिवर्तन सहेजे गए हैं।", + "custom_dashboard_validate_creation": "डैशबोर्ड {title} बनाया गया है।" } } \ No newline at end of file diff --git a/ui/src/translations/it.json b/ui/src/translations/it.json index 0bb2b10f00d..f6d7c2f6612 100644 --- a/ui/src/translations/it.json +++ b/ui/src/translations/it.json @@ -1175,6 +1175,9 @@ "label": "Proprietà" }, "debug": "Debug", - "default": "Predefinito" + "default": "Predefinito", + "custom_dashboard_confirm_deletion": "Sei sicuro di voler eliminare la dashboard {title}?", + "custom_dashboard_validate_editing": "Le modifiche nel dashboard {title} sono state salvate.", + "custom_dashboard_validate_creation": "Dashboard {title} è stato creato." } } \ No newline at end of file diff --git a/ui/src/translations/ja.json b/ui/src/translations/ja.json index 5a8361e914f..06f608ec6e7 100644 --- a/ui/src/translations/ja.json +++ b/ui/src/translations/ja.json @@ -1175,6 +1175,9 @@ "label": "プロパティ" }, "debug": "デバッグ", - "default": "デフォルト" + "default": "デフォルト", + "custom_dashboard_confirm_deletion": "{title} ダッシュボードを削除してもよろしいですか?", + "custom_dashboard_validate_editing": "ダッシュボード{title}の変更が保存されました。", + "custom_dashboard_validate_creation": "ダッシュボード {title} が作成されました。" } } \ No newline at end of file diff --git a/ui/src/translations/ko.json b/ui/src/translations/ko.json index 88ff09d3d1e..d1c4500e32f 100644 --- a/ui/src/translations/ko.json +++ b/ui/src/translations/ko.json @@ -1175,6 +1175,9 @@ "label": "속성" }, "debug": "디버그", - "default": "기본값" + "default": "기본값", + "custom_dashboard_confirm_deletion": "{title} 대시보드를 삭제하시겠습니까?", + "custom_dashboard_validate_editing": "대시보드 {title}의 변경 사항이 저장되었습니다.", + "custom_dashboard_validate_creation": "대시보드 {title}가 생성되었습니다." } } \ No newline at end of file diff --git a/ui/src/translations/pl.json b/ui/src/translations/pl.json index dfc0c07d66e..f51745db480 100644 --- a/ui/src/translations/pl.json +++ b/ui/src/translations/pl.json @@ -1175,6 +1175,9 @@ "label": "Właściwości" }, "debug": "Debugowanie", - "default": "Domyślny" + "default": "Domyślny", + "custom_dashboard_confirm_deletion": "Czy na pewno chcesz usunąć dashboard {title}?", + "custom_dashboard_validate_editing": "Zmiany w dashboardzie {title} zostały zapisane.", + "custom_dashboard_validate_creation": "Dashboard {title} został utworzony." } } \ No newline at end of file diff --git a/ui/src/translations/pt.json b/ui/src/translations/pt.json index e838c327689..720debd0054 100644 --- a/ui/src/translations/pt.json +++ b/ui/src/translations/pt.json @@ -1175,6 +1175,9 @@ "label": "Propriedades" }, "debug": "Depurar", - "default": "Padrão" + "default": "Padrão", + "custom_dashboard_confirm_deletion": "Tem certeza de que deseja excluir o dashboard {title}?", + "custom_dashboard_validate_editing": "Alterações no dashboard {title} foram salvas.", + "custom_dashboard_validate_creation": "Painel {title} foi criado." } } \ No newline at end of file diff --git a/ui/src/translations/ru.json b/ui/src/translations/ru.json index 58ed55829ce..619578c81c3 100644 --- a/ui/src/translations/ru.json +++ b/ui/src/translations/ru.json @@ -1175,6 +1175,9 @@ "label": "Свойства" }, "debug": "Отладка", - "default": "По умолчанию" + "default": "По умолчанию", + "custom_dashboard_confirm_deletion": "Вы уверены, что хотите удалить панель {title}?", + "custom_dashboard_validate_editing": "Изменения в панели {title} сохранены.", + "custom_dashboard_validate_creation": "Панель управления {title} создана." } } \ No newline at end of file diff --git a/ui/src/translations/zh_CN.json b/ui/src/translations/zh_CN.json index 6e55ab52b9a..2e1b39306c7 100644 --- a/ui/src/translations/zh_CN.json +++ b/ui/src/translations/zh_CN.json @@ -1175,6 +1175,9 @@ "label": "属性" }, "debug": "调试", - "default": "默认值" + "default": "默认值", + "custom_dashboard_confirm_deletion": "您确定要删除{title}仪表板吗?", + "custom_dashboard_validate_editing": "仪表板{title}中的更改已保存。", + "custom_dashboard_validate_creation": "仪表板 {title} 已创建。" } } \ No newline at end of file