feat: Download SLA reports (#9201)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as MutationHelpers from 'shared/helpers/vuex/mutationHelpers';
|
||||
import types from '../mutation-types';
|
||||
import SLAReportsAPI from '../../api/slaReports';
|
||||
|
||||
import { downloadCsvFile } from 'dashboard/helper/downloadHelper';
|
||||
export const state = {
|
||||
records: [],
|
||||
metrics: {
|
||||
@@ -60,6 +60,11 @@ export const actions = {
|
||||
commit(types.SET_SLA_REPORTS_UI_FLAG, { isFetchingMetrics: false });
|
||||
}
|
||||
},
|
||||
download(_, params) {
|
||||
return SLAReportsAPI.download(params).then(response => {
|
||||
downloadCsvFile(params.fileName, response.data);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export const mutations = {
|
||||
|
||||
Reference in New Issue
Block a user