mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 14:55:25 +00:00
fix config
This commit is contained in:
parent
a34e636389
commit
7c3c55fe12
@ -349,6 +349,9 @@ async function queryMetrics() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { metricConfig, metricTypes, metrics } = dashboardStore.selectedGrid;
|
const { metricConfig, metricTypes, metrics } = dashboardStore.selectedGrid;
|
||||||
|
if (!(metrics && metrics[0] && metricTypes && metricTypes[0])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const catalog = await useGetMetricEntity(metrics[0], metricTypes[0]);
|
const catalog = await useGetMetricEntity(metrics[0], metricTypes[0]);
|
||||||
const params = useQueryProcessor({ ...states, metricConfig, catalog });
|
const params = useQueryProcessor({ ...states, metricConfig, catalog });
|
||||||
if (!params) {
|
if (!params) {
|
||||||
|
@ -36,8 +36,11 @@ const props = defineProps({
|
|||||||
const option = computed(() => getOption());
|
const option = computed(() => getOption());
|
||||||
|
|
||||||
function getOption() {
|
function getOption() {
|
||||||
const metric = props.config.metrics[0];
|
const metric = props.config.metrics && props.config.metrics[0];
|
||||||
const nodes = (props.data[metric] && props.data[metric].nodes) || [];
|
let nodes: any = [];
|
||||||
|
if (metric) {
|
||||||
|
nodes = (props.data[metric] && props.data[metric].nodes) || [];
|
||||||
|
}
|
||||||
const source = (nodes || []).map((d: number[]) => d[2]);
|
const source = (nodes || []).map((d: number[]) => d[2]);
|
||||||
const maxItem = Math.max(...source);
|
const maxItem = Math.max(...source);
|
||||||
const minItem = Math.min(...source);
|
const minItem = Math.min(...source);
|
||||||
|
Loading…
Reference in New Issue
Block a user