mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-06 17:55:25 +00:00
update
This commit is contained in:
parent
dcb01c97cf
commit
986d047285
@ -44,12 +44,18 @@ limitations under the License. -->
|
|||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div class="title">{{ t("queryConditions") }}</div>
|
<div class="title">{{ t("queryConditions") }}</div>
|
||||||
<div
|
<div v-for="key in Object.keys(FiltersKeys)" :key="key">
|
||||||
v-for="key in Object.keys(FiltersKeys)"
|
<span
|
||||||
:key="key"
|
v-if="
|
||||||
v-show="traceStore.conditions[FiltersKeys[key]]"
|
[
|
||||||
>
|
FiltersKeys.minTraceDuration,
|
||||||
<span v-if="key !== 'duration'">
|
FiltersKeys.maxTraceDuration,
|
||||||
|
].includes(key) && !isNaN(traceStore.conditions[FiltersKeys[key]])
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ t(key) }}: {{ traceStore.conditions[FiltersKeys[key]] }}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="key !== 'duration'">
|
||||||
{{ t(key) }}: {{ traceStore.conditions[FiltersKeys[key]] }}
|
{{ t(key) }}: {{ traceStore.conditions[FiltersKeys[key]] }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -127,13 +133,13 @@ const items = ref<{ label: string; value: string }[]>([]);
|
|||||||
const currentLatency = ref<number[]>(
|
const currentLatency = ref<number[]>(
|
||||||
filters.latency ? filters.latency[0].data : []
|
filters.latency ? filters.latency[0].data : []
|
||||||
);
|
);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
for (const d of Object.keys(filters)) {
|
for (const d of Object.keys(filters)) {
|
||||||
if (
|
if (
|
||||||
["status", "queryOrder"].includes(d) ||
|
["queryOrder"].includes(d) ||
|
||||||
|
(d === "status" && filters[d] && filters[d] !== "ALL") ||
|
||||||
(filters[d] && d === "latency")
|
(filters[d] && d === "latency")
|
||||||
) {
|
) {
|
||||||
items.value.push({ label: d, value: FiltersKeys[d] });
|
items.value.push({ label: d, value: FiltersKeys[d] });
|
||||||
@ -204,15 +210,8 @@ function setCondition() {
|
|||||||
traceState: Status[0].value,
|
traceState: Status[0].value,
|
||||||
queryOrder: QueryOrders[0].value,
|
queryOrder: QueryOrders[0].value,
|
||||||
queryDuration: duration.value,
|
queryDuration: duration.value,
|
||||||
minTraceDuration: isNaN(currentLatency.value[0])
|
minTraceDuration: currentLatency.value[0],
|
||||||
? undefined
|
maxTraceDuration: currentLatency.value[1],
|
||||||
: currentLatency.value[0] === currentLatency.value[1]
|
|
||||||
? currentLatency.value[0] - 10
|
|
||||||
: currentLatency.value[0],
|
|
||||||
maxTraceDuration:
|
|
||||||
isNaN(currentLatency.value[1]) || currentLatency.value[1] === Infinity
|
|
||||||
? undefined
|
|
||||||
: currentLatency.value[1],
|
|
||||||
tags: tagsMap.value.length ? tagsMap.value : undefined,
|
tags: tagsMap.value.length ? tagsMap.value : undefined,
|
||||||
paging: { pageNum: 1, pageSize: 20 },
|
paging: { pageNum: 1, pageSize: 20 },
|
||||||
serviceId: state.service || undefined,
|
serviceId: state.service || undefined,
|
||||||
|
Loading…
Reference in New Issue
Block a user