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