mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
fix: optimize widgets (#110)
This commit is contained in:
@@ -43,6 +43,7 @@ limitations under the License. -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<ColumnGraph
|
||||
v-if="colMetrics.length"
|
||||
:intervalTime="intervalTime"
|
||||
:colMetrics="colMetrics"
|
||||
:config="config"
|
||||
@@ -126,7 +127,9 @@ const chartLoading = ref<boolean>(false);
|
||||
const instances = ref<Instance[]>([]); // current instances
|
||||
const pageSize = 10;
|
||||
const searchText = ref<string>("");
|
||||
const colMetrics = computed(() => props.config.metrics.map((d: string) => d));
|
||||
const colMetrics = computed(() =>
|
||||
(props.config.metrics || []).filter((d: string) => d)
|
||||
);
|
||||
if (props.needQuery) {
|
||||
queryInstance();
|
||||
}
|
||||
@@ -151,7 +154,8 @@ async function queryInstanceMetrics(currentInstances: Instance[]) {
|
||||
if (!currentInstances.length) {
|
||||
return;
|
||||
}
|
||||
const { metrics, metricTypes } = props.config;
|
||||
const metrics = props.config.metrics || [];
|
||||
const metricTypes = props.config.metricTypes || [];
|
||||
|
||||
if (metrics.length && metrics[0] && metricTypes.length && metricTypes[0]) {
|
||||
const params = await useQueryPodsMetrics(
|
||||
|
Reference in New Issue
Block a user