Merge branch 'dev-3.3' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.4

This commit is contained in:
zhangyu
2022-07-15 17:30:08 +08:00
6 changed files with 7 additions and 88 deletions

View File

@@ -316,7 +316,7 @@ export default {
this.logChartDataFormat()
}
}).catch(res => {
console.info(res)
// console.info(res)
}).finally(() => {
this.loading = false
})

View File

@@ -10,7 +10,7 @@ const Socket = /** @class */ (function () {
this.socket = new WebSocket(this.url)
this.socket.onmessage = this.cb
this.socket.onclose = function () {
console.info('Canvas websocket closed and reconneting...')
// console.info('Canvas websocket closed and reconneting...')
_this.init()
}
}

View File

@@ -292,7 +292,7 @@ export default {
}, 500)
})
}).catch((res) => {
console.info(res)
// console.info(res)
})
},
getLayout () {

View File

@@ -40,6 +40,9 @@ export function getTopology (key) {
export function setTopology (key, value) {
topologyCache[`topology${key}`] = value
if (!value) {
delete topologyCache[`topology${key}`]
}
}
export function clearTopologyCache () {

View File

@@ -2295,9 +2295,6 @@ export default {
this.timer4 = null
}
if (getTopology(this.topologyIndex)) {
// <<<<<<< HEAD
getTopology(this.topologyIndex).open({ pens: [] })
getTopology(this.topologyIndex).off('contextmenu', this.onContextMenu)
getTopology(this.topologyIndex).destroy()
const StoreData = le5leStore.get()
const arr = []
@@ -2311,88 +2308,7 @@ export default {
})
Object.keys(getTopology(this.topologyIndex)).forEach(key => {
getTopology(this.topologyIndex)[key] = null
// =======
// console.log(getTopology(this.topologyIndex))
// // getTopology(this.topologyIndex).open({ pens: [] })
// // getTopology(this.topologyIndex).off('contextmenu', this.onContextMenu)
// // getTopology(this.topologyIndex).data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // getTopology(this.topologyIndex).activeLayer.data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // getTopology(this.topologyIndex).animateLayer.data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // getTopology(this.topologyIndex).caches.list.forEach((cache) => {
// // cache.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // })
// // getTopology(this.topologyIndex).animateLayer.data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // getTopology(this.topologyIndex).canvas.data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // getTopology(this.topologyIndex).divLayer.data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// // getTopology(this.topologyIndex).hoverLayer.data.pens.forEach(item => {
// // item.img = null
// // item.image = null
// // item.lastImage = null
// // })
// getTopology(this.topologyIndex).destroy()
// const StoreData = le5leStore.get()
// // const arr = []
// Object.keys(StoreData).forEach(key => {
// const id = key.split('-')[0]
// // arr.push(id)
// if (getTopology(this.topologyIndex).id == id) {
// if (StoreData[key][0] && StoreData[key][0].img) {
// StoreData[key].forEach(item => {
// item.img = null
// item.image = null
// item.lastImage = null
// })
// }
// if (StoreData[key] && StoreData[key].pens) {
// StoreData[key].pens.forEach(item => {
// item.img = null
// item.image = null
// item.lastImage = null
// })
// }
// if (StoreData[key] && StoreData[key].data && StoreData[key].data.pens) {
// StoreData[key].data.pens.forEach(item => {
// item.img = null
// item.image = null
// item.lastImage = null
// })
// }
// le5leStore.set(key, null)
// delete StoreData[key]
// }
// >>>>>>> 73b71d578f55a77256af95f635a651575e8cebf9
})
// Object.keys(getTopology(this.topologyIndex)).forEach(key => {
// getTopology(this.topologyIndex)[key] = null
// })
setTopology(this.topologyIndex, null)
}
if (document.getElementById('topology-canvas' + this.topologyIndexF)) {

View File

@@ -321,7 +321,7 @@ export default {
}
}).catch(res => {
this.$refs['childrenFrom' + this.editChart.datasource].showError()
console.info(res)
// console.info(res)
})
},
selectPanel (panel) {