From 334e8dfa2719a2c6f8ee9a83c42e93a9fe36be89 Mon Sep 17 00:00:00 2001 From: Alex P Date: Thu, 19 Apr 2018 10:22:50 -0700 Subject: [PATCH] Show new cell name in new cell notification --- ui/src/dashboards/actions/index.js | 2 +- ui/src/shared/copy/notifications.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/dashboards/actions/index.js b/ui/src/dashboards/actions/index.js index 9830fad34e..2c861a276e 100644 --- a/ui/src/dashboards/actions/index.js +++ b/ui/src/dashboards/actions/index.js @@ -299,7 +299,7 @@ export const addDashboardCellAsync = ( getNewDashboardCell(dashboard, cellType) ) dispatch(addDashboardCell(dashboard, data)) - dispatch(notify(notifyCellAdded())) + dispatch(notify(notifyCellAdded(data.name))) } catch (error) { console.error(error) dispatch(errorThrown(error)) diff --git a/ui/src/shared/copy/notifications.js b/ui/src/shared/copy/notifications.js index 01445c99a1..61298459d4 100644 --- a/ui/src/shared/copy/notifications.js +++ b/ui/src/shared/copy/notifications.js @@ -412,24 +412,24 @@ export const notifyDashboardDeleted = name => ({ export const notifyDashboardDeleteFailed = (name, errorMessage) => `Failed to delete Dashboard ${name}: ${errorMessage}.` -export const notifyCellAdded = () => ({ +export const notifyCellAdded = name => ({ ...defaultSuccessNotification, icon: 'dash-h', - duration: 2200, - message: 'Added "Untitled Cell" to dashboard.', + duration: 1900, + message: `Added "${name}" to dashboard.`, }) export const notifyCellCloned = name => ({ ...defaultSuccessNotification, icon: 'duplicate', - duration: 2200, + duration: 1900, message: `Added "${name}" to dashboard.`, }) export const notifyCellDeleted = name => ({ ...defaultDeletionNotification, icon: 'dash-h', - duration: 2200, + duration: 1900, message: `Deleted "${name}" from dashboard.`, })