mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: clean up
This commit is contained in:
parent
3b3df49722
commit
070157d271
@ -225,9 +225,6 @@ export const topologyStore = defineStore({
|
|||||||
setNodeMetricValue(m: MetricVal) {
|
setNodeMetricValue(m: MetricVal) {
|
||||||
this.nodeMetricValue = m;
|
this.nodeMetricValue = m;
|
||||||
},
|
},
|
||||||
setNodeValue(m: MetricVal) {
|
|
||||||
this.nodeMetricValue = m;
|
|
||||||
},
|
|
||||||
setLegendValues(expressions: string, data: { [key: string]: any }) {
|
setLegendValues(expressions: string, data: { [key: string]: any }) {
|
||||||
for (let idx = 0; idx < this.nodes.length; idx++) {
|
for (let idx = 0; idx < this.nodes.length; idx++) {
|
||||||
for (let index = 0; index < expressions.length; index++) {
|
for (let index = 0; index < expressions.length; index++) {
|
||||||
|
@ -304,6 +304,7 @@ limitations under the License. -->
|
|||||||
|
|
||||||
async function importTemplates(event: any) {
|
async function importTemplates(event: any) {
|
||||||
const arr: any = await readFile(event);
|
const arr: any = await readFile(event);
|
||||||
|
|
||||||
for (const item of arr) {
|
for (const item of arr) {
|
||||||
const { layer, name, entity } = item.configuration;
|
const { layer, name, entity } = item.configuration;
|
||||||
const index = dashboardStore.dashboards.findIndex(
|
const index = dashboardStore.dashboards.findIndex(
|
||||||
@ -390,17 +391,8 @@ limitations under the License. -->
|
|||||||
if (isEmptyObject(child.widget)) {
|
if (isEmptyObject(child.widget)) {
|
||||||
delete child.widget;
|
delete child.widget;
|
||||||
}
|
}
|
||||||
if (!(child.metrics && child.metrics.length && child.metrics[0])) {
|
|
||||||
delete child.metrics;
|
|
||||||
}
|
|
||||||
if (!(child.metricTypes && child.metricTypes.length && child.metricTypes[0])) {
|
|
||||||
delete child.metricTypes;
|
|
||||||
}
|
|
||||||
if (child.metricConfig && child.metricConfig.length) {
|
if (child.metricConfig && child.metricConfig.length) {
|
||||||
child.metricConfig.forEach((c, index) => {
|
child.metricConfig.forEach((c, index) => {
|
||||||
if (!c.calculation) {
|
|
||||||
delete c.calculation;
|
|
||||||
}
|
|
||||||
if (!c.unit) {
|
if (!c.unit) {
|
||||||
delete c.unit;
|
delete c.unit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user