Issue #168: Done.

This commit is contained in:
chiayin
2023-10-06 15:39:16 +08:00
parent 6ffd676182
commit 6e0d5b15fe
4 changed files with 12 additions and 44 deletions

View File

@@ -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);