This commit is contained in:
Fine 2022-11-25 11:16:23 +08:00
parent fd0adaa1c9
commit dcb01c97cf

View File

@ -13,7 +13,11 @@ 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" v-show="!filters.id"> <div v-if="filters.id" class="conditions flex-h">
<div class="label grey">TraceId ( refId ):</div>
<el-input size="small" v-model="traceId" class="trace-id" />
</div>
<div class="conditions flex-h" v-else>
<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"
@ -111,6 +115,7 @@ const dashboardStore = useDashboardStore();
const traceStore = useTraceStore(); const traceStore = useTraceStore();
const tagsList = ref<string[]>([]); const tagsList = ref<string[]>([]);
const tagsMap = ref<Option[]>([]); const tagsMap = ref<Option[]>([]);
const traceId = ref<string>(filters.refId || "");
const duration = ref<DurationTime>(filters.duration || appStore.durationTime); const duration = ref<DurationTime>(filters.duration || appStore.durationTime);
const state = reactive<Recordable>({ const state = reactive<Recordable>({
instance: "", instance: "",
@ -213,7 +218,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, traceId: traceId.value || undefined,
}; };
for (const k of items.value) { for (const k of items.value) {
if ( if (
@ -272,4 +277,13 @@ onUnmounted(() => {
margin-bottom: 10px; margin-bottom: 10px;
font-weight: bold; font-weight: bold;
} }
.trace-id {
width: 300px;
margin-left: 10px;
}
.label {
line-height: 22px;
}
</style> </style>