Replace errorThrown with notify for csv download fail notification
Also moving to copypull/10616/head
parent
240e31d823
commit
2155217a60
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 = () => ({
|
||||
|
|
Loading…
Reference in New Issue