fix: set filter ID when ReadRecords metric associates with trace (#247)

This commit is contained in:
Fine0830 2023-03-23 21:40:38 +08:00 committed by GitHub
parent 2491ab7176
commit 1d189e82a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -64,7 +64,7 @@ limitations under the License. -->
import copy from "@/utils/copy";
import { TextColors } from "@/views/dashboard/data";
import Trace from "@/views/dashboard/related/trace/Index.vue";
import { QueryOrders, Status, RefIdTypes } from "../data";
import { QueryOrders, Status, RefIdTypes, ProtocolTypes } from "../data";
/*global defineProps */
const props = defineProps({
data: {
@ -77,6 +77,7 @@ limitations under the License. -->
type: Object as PropType<{
color: string;
metrics: string[];
metricTypes: string[];
relatedTrace: any;
}>,
default: () => ({ color: "purple" }),
@ -112,6 +113,7 @@ limitations under the License. -->
status: Status[2].value,
id: item.id || item.name,
metricValue: [{ label: props.config.metrics[0], data: item.value, value: item.name }],
isReadRecords: props.config.metricTypes.includes(ProtocolTypes.ReadRecords) || undefined,
};
traceOptions.value = {
...traceOptions.value,

View File

@ -144,6 +144,10 @@ limitations under the License. -->
await queryTraces();
return;
}
if (filters.isReadRecords) {
await queryTraces();
return;
}
if (dashboardStore.entity === EntityType[1].value) {
await getService();
}