Discover: sidebarFilter toggle button done.

This commit is contained in:
chiayin
2023-04-24 12:30:29 +08:00
parent 3d5dba4c42
commit 0cff786e9a
8 changed files with 165 additions and 145 deletions

View File

@@ -29,7 +29,8 @@ export default defineStore('allMapDataStore', {
allFilterTrace: [],
httpStatus: 200,
hasResultRule: null, // click Apply 後檢查是否有 Data
postRuleData: [],
temporaryData: [], // 沒被 apply 的 Data
postRuleData: [], // has-result API & temp-filters API 的 Data
}),
getters: {
processMap: state => {
@@ -79,10 +80,7 @@ export default defineStore('allMapDataStore', {
async getAllMapData() {
let logId = this.logId;
let tempFilterId = this.tempFilterId;
let api = tempFilterId !== null ? `/api/temp-filters/${tempFilterId}/discover` : `/api/logs/${logId}/discover`;
console.log(tempFilterId);
// console.log(logId);
// const api = `/api/logs/${logId}/discover`;
let api = tempFilterId != null ? `/api/temp-filters/${tempFilterId}/discover` : `/api/logs/${logId}/discover`;
try {
const response = await this.$axios.get(api);