Discover: Save button done.
This commit is contained in:
@@ -15,6 +15,7 @@ export default defineStore('allMapDataStore', {
|
||||
logId: null,
|
||||
traceId: 1,
|
||||
tempFilterId: null,
|
||||
createFilterId: null,
|
||||
allProcessMap: {},
|
||||
allBpmn: {},
|
||||
allStats: {},
|
||||
@@ -216,6 +217,28 @@ export default defineStore('allMapDataStore', {
|
||||
await delay(500);
|
||||
$toast.default('Failed to add the Temporary Filters.',{position: 'bottom'});
|
||||
};
|
||||
},
|
||||
async addFilterId(value) {
|
||||
let logId = this.logId;
|
||||
const api = `/api/filters?log_id=${logId}`;
|
||||
let createFilterObj = {
|
||||
name: value,
|
||||
rules: this.postRuleData
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await this.$axios.post(api, createFilterObj)
|
||||
this.createFilterId = response.data.id;
|
||||
this.tempFilterId = null;
|
||||
}catch(error) {
|
||||
this.httpStatus = error.request.status;
|
||||
await delay();
|
||||
loading.isLoading = true;
|
||||
await delay(1000);
|
||||
loading.isLoading = false;
|
||||
await delay(500);
|
||||
$toast.default('Failed to load the Filters.',{position: 'bottom'});
|
||||
};
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user