Skip to content

Commit

Permalink
chore(ui): add validation messages for custom dashboard crud actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic committed Feb 12, 2025
1 parent b7e7f58 commit 757ef3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/components/filter/segments/Dashboards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"});
});
});
Expand Down
1 change: 1 addition & 0 deletions ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@
"create_dashboard": "Create Dashboard",
"edit_custom_dashboard": "Edit Dashboard",
"custom_dashboard_validate_editing": "Changes in dashboard <code>{title}</code> are saved.",
"custom_dashboard_confirm_deletion": "Are you sure you want to delete <code>{title}</code> dashboard?",
"custom_dashboard_empty": "There are no results to be shown.",
"filters": {
"label": "Choose filters",
Expand Down

0 comments on commit 757ef3f

Please sign in to comment.