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
f9cf862cb7
commit
582e43bbee
@ -167,6 +167,7 @@ function viewTrace() {
|
|||||||
filters: item,
|
filters: item,
|
||||||
};
|
};
|
||||||
showTrace.value = true;
|
showTrace.value = true;
|
||||||
|
visMenus.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -18,8 +18,8 @@ import { Option } from "@/types/app";
|
|||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
import dateFormatStep from "@/utils/dateFormat";
|
import dateFormatStep from "@/utils/dateFormat";
|
||||||
import getLocalTime from "@/utils/localtime";
|
import getLocalTime from "@/utils/localtime";
|
||||||
import { QueryOrders } from "@/views/dashboard/data";
|
|
||||||
import { EventParams } from "@/types/app";
|
import { EventParams } from "@/types/app";
|
||||||
|
import { QueryOrders, Status } from "@/views/dashboard/data";
|
||||||
|
|
||||||
export default function associateProcessor(props: any) {
|
export default function associateProcessor(props: any) {
|
||||||
function eventAssociate() {
|
function eventAssociate() {
|
||||||
@ -92,18 +92,13 @@ export default function associateProcessor(props: any) {
|
|||||||
step,
|
step,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
let queryOrder = QueryOrders[1].value;
|
const relatedTrace = props.relatedTrace || {};
|
||||||
let status = undefined;
|
const status = relatedTrace.status;
|
||||||
let latency = undefined;
|
const queryOrder = relatedTrace.queryOrder;
|
||||||
if (currentParams.seriesName.includes("_sla")) {
|
const { latency } = relatedTrace;
|
||||||
queryOrder = QueryOrders[0].value;
|
let latencyList = undefined;
|
||||||
status = "ERROR";
|
if (latency && props.option.series) {
|
||||||
}
|
latencyList = props.option.series.map(
|
||||||
if (currentParams.seriesName.includes("_apdex")) {
|
|
||||||
status = "ERROR";
|
|
||||||
}
|
|
||||||
if (props.option.series) {
|
|
||||||
latency = props.option.series.map(
|
|
||||||
(d: { name: string; data: number[][] }) => {
|
(d: { name: string; data: number[][] }) => {
|
||||||
return { [d.name]: d.data[currentParams.dataIndex] };
|
return { [d.name]: d.data[currentParams.dataIndex] };
|
||||||
}
|
}
|
||||||
@ -113,7 +108,7 @@ export default function associateProcessor(props: any) {
|
|||||||
duration,
|
duration,
|
||||||
queryOrder,
|
queryOrder,
|
||||||
status,
|
status,
|
||||||
latency,
|
latency: latencyList,
|
||||||
};
|
};
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,7 @@ const msg = {
|
|||||||
viewTrace: "View related trace",
|
viewTrace: "View related trace",
|
||||||
relatedTraceOptions: "Related Trace Options",
|
relatedTraceOptions: "Related Trace Options",
|
||||||
setLatencyDuration: "Set Latency Range",
|
setLatencyDuration: "Set Latency Range",
|
||||||
|
queryOrder: "Query Order",
|
||||||
seconds: "Seconds",
|
seconds: "Seconds",
|
||||||
hourTip: "Select Hour",
|
hourTip: "Select Hour",
|
||||||
minuteTip: "Select Minute",
|
minuteTip: "Select Minute",
|
||||||
|
@ -157,6 +157,7 @@ const msg = {
|
|||||||
postgreSQL: "PostgreSQL",
|
postgreSQL: "PostgreSQL",
|
||||||
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",
|
||||||
seconds: "Segundos",
|
seconds: "Segundos",
|
||||||
hourTip: "Seleccione Hora",
|
hourTip: "Seleccione Hora",
|
||||||
minuteTip: "Seleccione Minuto",
|
minuteTip: "Seleccione Minuto",
|
||||||
|
@ -157,6 +157,7 @@ const msg = {
|
|||||||
viewTrace: "查看相关Trace",
|
viewTrace: "查看相关Trace",
|
||||||
relatedTraceOptions: "相关的Trace选项",
|
relatedTraceOptions: "相关的Trace选项",
|
||||||
setLatencyDuration: "设置延时范围",
|
setLatencyDuration: "设置延时范围",
|
||||||
|
queryOrder: "查询顺序",
|
||||||
seconds: "秒",
|
seconds: "秒",
|
||||||
hourTip: "选择小时",
|
hourTip: "选择小时",
|
||||||
minuteTip: "选择分钟",
|
minuteTip: "选择分钟",
|
||||||
|
@ -65,7 +65,11 @@ limitations under the License. -->
|
|||||||
>
|
>
|
||||||
<AssociateOptions />
|
<AssociateOptions />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item :title="t('relatedTraceOptions')" name="5">
|
<el-collapse-item
|
||||||
|
:title="t('relatedTraceOptions')"
|
||||||
|
name="5"
|
||||||
|
v-if="hasAssociate"
|
||||||
|
>
|
||||||
<RelatedTraceOptions />
|
<RelatedTraceOptions />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
|
@ -20,7 +20,7 @@ limitations under the License. -->
|
|||||||
:value="status"
|
:value="status"
|
||||||
:options="Status"
|
:options="Status"
|
||||||
placeholder="Select a status"
|
placeholder="Select a status"
|
||||||
@change="updateConfig({ status })"
|
@change="updateConfig({ status: $event[0].value })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@ -30,25 +30,16 @@ limitations under the License. -->
|
|||||||
:value="queryOrder"
|
:value="queryOrder"
|
||||||
:options="QueryOrders"
|
:options="QueryOrders"
|
||||||
placeholder="Select a option"
|
placeholder="Select a option"
|
||||||
@change="updateConfig({ queryOrder })"
|
@change="updateConfig({ queryOrder: $event[0].value })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="item">
|
|
||||||
<span class="label">{{ t("setDuration") }}</span>
|
|
||||||
<el-switch
|
|
||||||
v-model="setDuration"
|
|
||||||
active-text="Yes"
|
|
||||||
inactive-text="No"
|
|
||||||
@change="updateConfig({ setDuration })"
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="label">{{ t("setLatencyDuration") }}</span>
|
<span class="label">{{ t("setLatencyDuration") }}</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="setLatencyDuration"
|
v-model="latency"
|
||||||
active-text="Yes"
|
active-text="Yes"
|
||||||
inactive-text="No"
|
inactive-text="No"
|
||||||
@change="updateConfig({ setLatencyDuration })"
|
@change="updateConfig({ latency })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -56,16 +47,14 @@ limitations under the License. -->
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { Status } from "../../data";
|
import { Status, QueryOrders } from "../../data";
|
||||||
import { QueryOrders } from "../../data";
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const traceOpt = dashboardStore.selectedGrid.relatedTrace;
|
const traceOpt = dashboardStore.selectedGrid.relatedTrace || {};
|
||||||
const status = ref<string>(traceOpt.status || Status[0].value);
|
const status = ref<string>(traceOpt.status || Status[0].value);
|
||||||
const queryOrder = ref<string>(traceOpt.queryOrder || QueryOrders[0].value);
|
const queryOrder = ref<string>(traceOpt.queryOrder || QueryOrders[0].value);
|
||||||
// const setDuration = ref<boolean>(traceOpt.setDuration || false);
|
const latency = ref<boolean>(traceOpt.setLatencyDuration || false);
|
||||||
const setLatencyDuration = ref<boolean>(traceOpt.setLatencyDuration || false);
|
|
||||||
|
|
||||||
function updateConfig(param: { [key: string]: unknown }) {
|
function updateConfig(param: { [key: string]: unknown }) {
|
||||||
const relatedTrace = {
|
const relatedTrace = {
|
||||||
@ -83,10 +72,6 @@ function updateConfig(param: { [key: string]: unknown }) {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
|
||||||
width: 500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
@ -81,15 +81,19 @@ const state = reactive<Recordable>({
|
|||||||
endpoint: "",
|
endpoint: "",
|
||||||
service: "",
|
service: "",
|
||||||
});
|
});
|
||||||
const items = Object.keys(filters).map((d: string) => {
|
const conditions = ref<string>("");
|
||||||
return { key: d, value: filtersKeys[d] };
|
const items = ref<{ key: string; value: string }[]>([]);
|
||||||
});
|
|
||||||
const conditions = ref(items[0].key);
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
if (!filters.id) {
|
if (!filters.id) {
|
||||||
|
for (const d of Object.keys(filters)) {
|
||||||
|
if (filters[d]) {
|
||||||
|
items.value.push({ key: d, value: filtersKeys[d] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
conditions.value = (items.value[0] && items.value[0].key) || "";
|
||||||
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;
|
||||||
@ -154,8 +158,8 @@ function setCondition() {
|
|||||||
};
|
};
|
||||||
// echarts
|
// echarts
|
||||||
if (!filters.id) {
|
if (!filters.id) {
|
||||||
for (const k of items) {
|
for (const k of items.value) {
|
||||||
if (k.key === conditions.value) {
|
if (k.key === conditions.value && filters[k.key]) {
|
||||||
params[k.value] = filters[k.key];
|
params[k.value] = filters[k.key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user