mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 00:37:33 +00:00
update
This commit is contained in:
parent
cd1d765fae
commit
212625862a
@ -161,6 +161,7 @@ const msg = {
|
|||||||
relatedTraceOptions: "Related Trace Options",
|
relatedTraceOptions: "Related Trace Options",
|
||||||
setLatencyDuration: "Set Latency Range",
|
setLatencyDuration: "Set Latency Range",
|
||||||
queryOrder: "Query Order",
|
queryOrder: "Query Order",
|
||||||
|
latency: "Latency",
|
||||||
seconds: "Seconds",
|
seconds: "Seconds",
|
||||||
hourTip: "Select Hour",
|
hourTip: "Select Hour",
|
||||||
minuteTip: "Select Minute",
|
minuteTip: "Select Minute",
|
||||||
|
@ -158,6 +158,7 @@ const msg = {
|
|||||||
endpointTips: "Aquí, la tabla muestra hasta 20 punto final.",
|
endpointTips: "Aquí, la tabla muestra hasta 20 punto final.",
|
||||||
apisix: "APISIX",
|
apisix: "APISIX",
|
||||||
queryOrder: "Orden de consulta",
|
queryOrder: "Orden de consulta",
|
||||||
|
latency: "Retraso",
|
||||||
seconds: "Segundos",
|
seconds: "Segundos",
|
||||||
hourTip: "Seleccione Hora",
|
hourTip: "Seleccione Hora",
|
||||||
minuteTip: "Seleccione Minuto",
|
minuteTip: "Seleccione Minuto",
|
||||||
|
@ -158,6 +158,7 @@ const msg = {
|
|||||||
relatedTraceOptions: "相关的Trace选项",
|
relatedTraceOptions: "相关的Trace选项",
|
||||||
setLatencyDuration: "设置延时范围",
|
setLatencyDuration: "设置延时范围",
|
||||||
queryOrder: "查询顺序",
|
queryOrder: "查询顺序",
|
||||||
|
latency: "延迟",
|
||||||
seconds: "秒",
|
seconds: "秒",
|
||||||
hourTip: "选择小时",
|
hourTip: "选择小时",
|
||||||
minuteTip: "选择分钟",
|
minuteTip: "选择分钟",
|
||||||
|
@ -302,14 +302,6 @@ watch(
|
|||||||
}
|
}
|
||||||
traceId.value = props.data.filters.traceId || "";
|
traceId.value = props.data.filters.traceId || "";
|
||||||
duration.value = props.data.filters.duration || appStore.durationTime;
|
duration.value = props.data.filters.duration || appStore.durationTime;
|
||||||
// if (props.data.filters.queryOrder) {
|
|
||||||
// traceStore.setTraceCondition({
|
|
||||||
// queryOrder: props.data.filters.queryOrder,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// if (props.data.filters.status) {
|
|
||||||
// state.status = filters.status === "ERROR" ? Status[2] : Status[0];
|
|
||||||
// }
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -17,11 +17,11 @@ limitations under the License. -->
|
|||||||
<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"
|
||||||
:label="item.key"
|
:label="item.label"
|
||||||
:key="item.key + index"
|
:key="item.label + index"
|
||||||
border
|
border
|
||||||
>
|
>
|
||||||
{{ item.key }}
|
{{ t(item.label) }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<Selector
|
<Selector
|
||||||
@ -46,7 +46,7 @@ limitations under the License. -->
|
|||||||
import { ref, reactive, onUnmounted } from "vue";
|
import { ref, reactive, onUnmounted } from "vue";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { Option } from "@/types/app";
|
import { Option, DurationTime } from "@/types/app";
|
||||||
import { useTraceStore } from "@/store/modules/trace";
|
import { useTraceStore } from "@/store/modules/trace";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
@ -79,13 +79,14 @@ 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 duration = ref<DurationTime>(filters.duration || appStore.durationTime);
|
||||||
const state = reactive<Recordable>({
|
const state = reactive<Recordable>({
|
||||||
instance: "",
|
instance: "",
|
||||||
endpoint: "",
|
endpoint: "",
|
||||||
service: "",
|
service: "",
|
||||||
});
|
});
|
||||||
const conditions = ref<string>("");
|
const conditions = ref<string>("");
|
||||||
const items = ref<{ key: string; value: string }[]>([]);
|
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 : []
|
||||||
);
|
);
|
||||||
@ -97,10 +98,10 @@ async function init() {
|
|||||||
if (!filters.id) {
|
if (!filters.id) {
|
||||||
for (const d of Object.keys(filters)) {
|
for (const d of Object.keys(filters)) {
|
||||||
if (filters[d] && d !== "duration") {
|
if (filters[d] && d !== "duration") {
|
||||||
items.value.push({ key: d, value: FiltersKeys[d] });
|
items.value.push({ label: d, value: FiltersKeys[d] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conditions.value = (items.value[0] && items.value[0].key) || "";
|
conditions.value = (items.value[0] && items.value[0].label) || "";
|
||||||
state.service = selectorStore.currentService.id;
|
state.service = selectorStore.currentService.id;
|
||||||
if (dashboardStore.entity === EntityType[2].value) {
|
if (dashboardStore.entity === EntityType[2].value) {
|
||||||
state.instance = selectorStore.currentPod.id;
|
state.instance = selectorStore.currentPod.id;
|
||||||
@ -132,6 +133,7 @@ function changeCondition() {
|
|||||||
|
|
||||||
function changeLatency(options: any[]) {
|
function changeLatency(options: any[]) {
|
||||||
currentLatency.value = options[0].data;
|
currentLatency.value = options[0].data;
|
||||||
|
console.log(options);
|
||||||
queryTraces();
|
queryTraces();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,13 +165,16 @@ function setCondition() {
|
|||||||
let params: any = {
|
let params: any = {
|
||||||
traceState: Status[0].value,
|
traceState: Status[0].value,
|
||||||
queryOrder: QueryOrders[0].value,
|
queryOrder: QueryOrders[0].value,
|
||||||
queryDuration: appStore.durationTime,
|
queryDuration: duration.value,
|
||||||
minTraceDuration: isNaN(currentLatency.value[0])
|
minTraceDuration: isNaN(currentLatency.value[0])
|
||||||
? undefined
|
? undefined
|
||||||
|
: currentLatency.value[0] === currentLatency.value[1]
|
||||||
|
? currentLatency.value[0] - 10
|
||||||
: currentLatency.value[0],
|
: currentLatency.value[0],
|
||||||
maxTraceDuration: isNaN(currentLatency.value[1])
|
maxTraceDuration:
|
||||||
? undefined
|
isNaN(currentLatency.value[1]) || currentLatency.value[1] === Infinity
|
||||||
: currentLatency.value[0],
|
? 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,
|
||||||
@ -179,8 +184,8 @@ function setCondition() {
|
|||||||
// echarts
|
// echarts
|
||||||
if (!filters.id) {
|
if (!filters.id) {
|
||||||
for (const k of items.value) {
|
for (const k of items.value) {
|
||||||
if (k.key === conditions.value && FiltersKeys[k.key]) {
|
if (k.label === conditions.value && FiltersKeys[k.label]) {
|
||||||
params[k.value] = filters[k.key];
|
params[k.value] = filters[k.label];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user