Issue #104: Done.

This commit is contained in:
chiayin
2023-10-03 16:57:21 +08:00
parent 112c4d1cdf
commit bee668a3f7
2 changed files with 9 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ export default {
this.isLoading = true; this.isLoading = true;
await this.allMapDataStore.addTempFilterId(); await this.allMapDataStore.addTempFilterId();
await this.allMapDataStore.getAllMapData(); await this.allMapDataStore.getAllMapData();
await this.allMapDataStore.getAllTrace(); // SidebarTrace 要連動
await this.$emit('submit-all'); await this.$emit('submit-all');
this.isLoading = false; this.isLoading = false;
this.$toast.success('Filter Success. View the Map.'); this.$toast.success('Filter Success. View the Map.');

View File

@@ -121,7 +121,14 @@ export default defineStore('allMapDataStore', {
*/ */
async getAllTrace() { async getAllTrace() {
let logId = this.logId; let logId = this.logId;
const api = `/api/logs/${logId}/traces`; let tempFilterId = this.tempFilterId;
let createfilterId = this.createFilterId
let api = '';
// 先判斷暫存 再判斷 filter 最後 log
if(tempFilterId != null) api = `/api/temp-filters/${tempFilterId}/traces`;
else if(createfilterId!= null) api = `/api/filters/${createfilterId}/traces`;
else api = `/api/logs/${logId}/traces`;
try { try {
const response = await this.$axios.get(api); const response = await this.$axios.get(api);