fix: clear trace ID on the Log and Trace widgets after using association (#225)

This commit is contained in:
Fine0830 2023-02-07 21:23:13 +08:00 committed by GitHub
parent 4486684183
commit c73322a504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 0 deletions

View File

@ -115,5 +115,6 @@ export default function associateProcessor(props: any) {
item.metricValue = value; item.metricValue = value;
return item; return item;
} }
return { eventAssociate, traceFilters }; return { eventAssociate, traceFilters };
} }

View File

@ -319,6 +319,9 @@ limitations under the License. -->
} }
onUnmounted(() => { onUnmounted(() => {
logStore.resetState(); logStore.resetState();
const config = props.data;
delete config.filters;
dashboardStore.setWidget(config);
}); });
watch( watch(
() => selectorStore.currentService, () => selectorStore.currentService,

View File

@ -245,6 +245,9 @@ limitations under the License. -->
} }
onUnmounted(() => { onUnmounted(() => {
traceStore.resetState(); traceStore.resetState();
const config = props.data;
delete config.filters;
dashboardStore.setWidget(config);
}); });
watch( watch(
() => [selectorStore.currentPod], () => [selectorStore.currentPod],

View File

@ -229,6 +229,9 @@ limitations under the License. -->
} }
onUnmounted(() => { onUnmounted(() => {
traceStore.resetState(); traceStore.resetState();
const config = props.data;
delete config.filters;
dashboardStore.setWidget(config);
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>