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