diff --git a/ui/src/shared/components/LayoutCell.js b/ui/src/shared/components/LayoutCell.js index 0949390fa3..125aa3f280 100644 --- a/ui/src/shared/components/LayoutCell.js +++ b/ui/src/shared/components/LayoutCell.js @@ -6,7 +6,8 @@ import Authorized, {EDITOR_ROLE} from 'src/auth/Authorized' import LayoutCellMenu from 'shared/components/LayoutCellMenu' import LayoutCellHeader from 'shared/components/LayoutCellHeader' -import {errorThrown} from 'shared/actions/errors' +import {notify} from 'src/shared/actions/notifications' +import {notifyCSVDownloadFailed} from 'src/shared/copy/notifications' import {dashboardtoCSV} from 'shared/parsing/resultsToCSV' import download from 'src/external/download.js' @@ -25,7 +26,7 @@ class LayoutCell extends Component { try { download(dashboardtoCSV(celldata), `${joinedName}.csv`, 'text/plain') } catch (error) { - errorThrown(error, 'Unable to download .csv file') + notify(notifyCSVDownloadFailed()) console.error(error) } } diff --git a/ui/src/shared/copy/notifications.js b/ui/src/shared/copy/notifications.js index 2fa7ddb5ac..bb3409555c 100644 --- a/ui/src/shared/copy/notifications.js +++ b/ui/src/shared/copy/notifications.js @@ -72,6 +72,11 @@ export const notifyCouldNotDeleteKapacitor = () => ({ message: 'Internal Server Error. Could not delete Kapacitor Connection.', }) +export const notifyCSVDownloadFailed = () => ({ + ...defaultErrorNotification, + message: 'Unable to download .CSV file', +}) + // Hosts Page Notifications // ---------------------------------------------------------------------------- export const notifyUnableToGetHosts = () => ({