Merge branch 'dev-3.2' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.3
# Conflicts: # nezha-fronted/src/components/common/project/topologyL5.vue
This commit is contained in:
@@ -283,7 +283,7 @@ export default {
|
|||||||
this.logChartDataFormat()
|
this.logChartDataFormat()
|
||||||
}
|
}
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
console.info(res)
|
// console.info(res)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const Socket = /** @class */ (function () {
|
|||||||
this.socket = new WebSocket(this.url)
|
this.socket = new WebSocket(this.url)
|
||||||
this.socket.onmessage = this.cb
|
this.socket.onmessage = this.cb
|
||||||
this.socket.onclose = function () {
|
this.socket.onclose = function () {
|
||||||
console.info('Canvas websocket closed and reconneting...')
|
// console.info('Canvas websocket closed and reconneting...')
|
||||||
_this.init()
|
_this.init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ export default {
|
|||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
}).catch((res) => {
|
}).catch((res) => {
|
||||||
console.info(res)
|
// console.info(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getLayout () {
|
getLayout () {
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ export function getTopology (key) {
|
|||||||
|
|
||||||
export function setTopology (key, value) {
|
export function setTopology (key, value) {
|
||||||
topologyCache[`topology${key}`] = value
|
topologyCache[`topology${key}`] = value
|
||||||
|
if (!value) {
|
||||||
|
delete topologyCache[`topology${key}`]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearTopologyCache () {
|
export function clearTopologyCache () {
|
||||||
|
|||||||
@@ -641,7 +641,6 @@ export default {
|
|||||||
canvasRegister()
|
canvasRegister()
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
console.log('mounted')
|
|
||||||
if (!this.fromOverView) { // 从overview来的 加载相应图片 优化首页加载速度
|
if (!this.fromOverView) { // 从overview来的 加载相应图片 优化首页加载速度
|
||||||
this.addNodeInit()
|
this.addNodeInit()
|
||||||
}
|
}
|
||||||
@@ -2285,9 +2284,6 @@ export default {
|
|||||||
this.timer4 = null
|
this.timer4 = null
|
||||||
}
|
}
|
||||||
if (getTopology(this.topologyIndex)) {
|
if (getTopology(this.topologyIndex)) {
|
||||||
// <<<<<<< HEAD
|
|
||||||
getTopology(this.topologyIndex).open({ pens: [] })
|
|
||||||
getTopology(this.topologyIndex).off('contextmenu', this.onContextMenu)
|
|
||||||
getTopology(this.topologyIndex).destroy()
|
getTopology(this.topologyIndex).destroy()
|
||||||
const StoreData = le5leStore.get()
|
const StoreData = le5leStore.get()
|
||||||
const arr = []
|
const arr = []
|
||||||
@@ -2303,89 +2299,7 @@ export default {
|
|||||||
console.log(le5leStore.get())
|
console.log(le5leStore.get())
|
||||||
Object.keys(getTopology(this.topologyIndex)).forEach(key => {
|
Object.keys(getTopology(this.topologyIndex)).forEach(key => {
|
||||||
getTopology(this.topologyIndex)[key] = null
|
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
|
|
||||||
})
|
})
|
||||||
console.log(le5leStore.get())
|
|
||||||
// Object.keys(getTopology(this.topologyIndex)).forEach(key => {
|
|
||||||
// getTopology(this.topologyIndex)[key] = null
|
|
||||||
// })
|
|
||||||
setTopology(this.topologyIndex, null)
|
setTopology(this.topologyIndex, null)
|
||||||
}
|
}
|
||||||
if (document.getElementById('topology-canvas' + this.topologyIndexF)) {
|
if (document.getElementById('topology-canvas' + this.topologyIndexF)) {
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
this.$refs['childrenFrom' + this.editChart.datasource].showError()
|
this.$refs['childrenFrom' + this.editChart.datasource].showError()
|
||||||
console.info(res)
|
// console.info(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectPanel (panel) {
|
selectPanel (panel) {
|
||||||
|
|||||||
Reference in New Issue
Block a user