Show new cell name in new cell notification

pull/10616/head
Alex P 2018-04-19 10:22:50 -07:00
parent 0695904075
commit 334e8dfa27
2 changed files with 6 additions and 6 deletions

View File

@ -299,7 +299,7 @@ export const addDashboardCellAsync = (
getNewDashboardCell(dashboard, cellType) getNewDashboardCell(dashboard, cellType)
) )
dispatch(addDashboardCell(dashboard, data)) dispatch(addDashboardCell(dashboard, data))
dispatch(notify(notifyCellAdded())) dispatch(notify(notifyCellAdded(data.name)))
} catch (error) { } catch (error) {
console.error(error) console.error(error)
dispatch(errorThrown(error)) dispatch(errorThrown(error))

View File

@ -412,24 +412,24 @@ export const notifyDashboardDeleted = name => ({
export const notifyDashboardDeleteFailed = (name, errorMessage) => export const notifyDashboardDeleteFailed = (name, errorMessage) =>
`Failed to delete Dashboard ${name}: ${errorMessage}.` `Failed to delete Dashboard ${name}: ${errorMessage}.`
export const notifyCellAdded = () => ({ export const notifyCellAdded = name => ({
...defaultSuccessNotification, ...defaultSuccessNotification,
icon: 'dash-h', icon: 'dash-h',
duration: 2200, duration: 1900,
message: 'Added "Untitled Cell" to dashboard.', message: `Added "${name}" to dashboard.`,
}) })
export const notifyCellCloned = name => ({ export const notifyCellCloned = name => ({
...defaultSuccessNotification, ...defaultSuccessNotification,
icon: 'duplicate', icon: 'duplicate',
duration: 2200, duration: 1900,
message: `Added "${name}" to dashboard.`, message: `Added "${name}" to dashboard.`,
}) })
export const notifyCellDeleted = name => ({ export const notifyCellDeleted = name => ({
...defaultDeletionNotification, ...defaultDeletionNotification,
icon: 'dash-h', icon: 'dash-h',
duration: 2200, duration: 1900,
message: `Deleted "${name}" from dashboard.`, message: `Deleted "${name}" from dashboard.`,
}) })