Issue #168: Done.
This commit is contained in:
@@ -122,7 +122,7 @@ export default defineStore('allMapDataStore', {
|
||||
async getAllTrace() {
|
||||
let logId = this.logId;
|
||||
let tempFilterId = this.tempFilterId;
|
||||
let createfilterId = this.createFilterId
|
||||
let createfilterId = this.createFilterId;
|
||||
let api = '';
|
||||
|
||||
// 先判斷暫存 再判斷 filter 最後 log
|
||||
@@ -151,7 +151,14 @@ export default defineStore('allMapDataStore', {
|
||||
async getTraceDetail() {
|
||||
let logId = this.logId;
|
||||
let traceId = this.traceId;
|
||||
const api = `/api/logs/${logId}/traces/${traceId}`;
|
||||
let tempFilterId = this.tempFilterId;
|
||||
let createfilterId = this.createFilterId;
|
||||
let api = '';
|
||||
|
||||
// 先判斷暫存 再判斷 filter 最後 log
|
||||
if(tempFilterId != null) api = `/api/temp-filters/${tempFilterId}/traces/${traceId}`;
|
||||
else if(createfilterId!= null) api = `/api/filters/${createfilterId}/traces/${traceId}`;
|
||||
else api = `/api/logs/${logId}/traces/${traceId}`;
|
||||
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
|
||||
@@ -310,6 +310,7 @@ export default {
|
||||
// 取得 logId 後才 call api
|
||||
await this.allMapDataStore.getAllMapData();
|
||||
await this.allMapDataStore.getAllTrace();
|
||||
this.traceId = await this.traces[0]?.id; // log、filter 檔切換過程中, trace id 不同,將初始 trace id 設定為該檔案的 trace 幣一筆資料的 id。
|
||||
await this.allMapDataStore.getTraceDetail();
|
||||
this.createCy(this.mapType);
|
||||
await this.allMapDataStore.getFilterParams();
|
||||
|
||||
Reference in New Issue
Block a user