fix filter ID

This commit is contained in:
Fine 2022-11-24 19:27:32 +08:00
parent 385e63603b
commit bcf2a4f129
2 changed files with 4 additions and 2 deletions

View File

@ -105,6 +105,7 @@ function viewTrace(item: { name: string; id: string; value: unknown }) {
...item, ...item,
queryOrder: QueryOrders[1].value, queryOrder: QueryOrders[1].value,
status: Status[2].value, status: Status[2].value,
id: item.id || item.name,
metricValue: [ metricValue: [
{ label: props.config.metrics[0], data: item.value, value: item.name }, { label: props.config.metrics[0], data: item.value, value: item.name },
], ],

View File

@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<div class="conditions flex-h"> <div class="conditions flex-h" v-show="!filters.id">
<el-radio-group v-model="conditions" @change="changeCondition"> <el-radio-group v-model="conditions" @change="changeCondition">
<el-radio-button <el-radio-button
v-for="(item, index) in items" v-for="(item, index) in items"
@ -135,7 +135,7 @@ async function init() {
} }
} }
conditions.value = (items.value[0] && items.value[0].label) || ""; conditions.value = (items.value[0] && items.value[0].label) || "";
if (filters.id) { if (!filters.id) {
state.service = selectorStore.currentService.id; state.service = selectorStore.currentService.id;
if (dashboardStore.entity === EntityType[2].value) { if (dashboardStore.entity === EntityType[2].value) {
state.endpoint = selectorStore.currentPod.id; state.endpoint = selectorStore.currentPod.id;
@ -213,6 +213,7 @@ function setCondition() {
serviceId: state.service || undefined, serviceId: state.service || undefined,
endpointId: state.endpoint || undefined, endpointId: state.endpoint || undefined,
serviceInstanceId: state.instance || undefined, serviceInstanceId: state.instance || undefined,
traceId: filters.refId || undefined,
}; };
for (const k of items.value) { for (const k of items.value) {
if ( if (