diff --git a/nezha-fronted/src/assets/css/common/rightBoxCommon.scss b/nezha-fronted/src/assets/css/common/rightBoxCommon.scss index ff493c21a..e6182c1bb 100644 --- a/nezha-fronted/src/assets/css/common/rightBoxCommon.scss +++ b/nezha-fronted/src/assets/css/common/rightBoxCommon.scss @@ -221,7 +221,7 @@ align-items: center; justify-content: center; height: 70px; - box-shadow: -3px 0 8px -3px rgba(205,205,205,0.77); + box-shadow: $--right-box-shadow; } .footer__btn { margin: 0 15px; diff --git a/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss b/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss index 69bdd4ef9..d600cde99 100644 --- a/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss +++ b/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss @@ -59,6 +59,10 @@ width: calc(100% - 120px); display: flex; align-items: center; + div.active-icon.green-bg{ + width: 8px !important; + margin-top: 0 !important; + } >div{ width: calc(100% - 30px); } diff --git a/nezha-fronted/src/assets/css/components/common/project/L5/popData/common.scss b/nezha-fronted/src/assets/css/components/common/project/L5/popData/common.scss index e8251c934..92260b40b 100644 --- a/nezha-fronted/src/assets/css/components/common/project/L5/popData/common.scss +++ b/nezha-fronted/src/assets/css/components/common/project/L5/popData/common.scss @@ -4,17 +4,22 @@ } .right-box-project-endpoint,.right-box-project-asset { padding-right: 10px; + padding-left: 10px; } .right-box-project-alert { width: 850px; padding-right: 10px; + padding-left: 10px; } .right-box-title { font-weight: bold; padding-left: 20px; + padding-top: 20px; position: absolute; z-index: 1; + display: flex; + align-items: center; } .mc { diff --git a/nezha-fronted/src/assets/css/components/page/config/about.scss b/nezha-fronted/src/assets/css/components/page/config/about.scss index bca32d062..c89f0704a 100644 --- a/nezha-fronted/src/assets/css/components/page/config/about.scss +++ b/nezha-fronted/src/assets/css/components/page/config/about.scss @@ -1,20 +1,30 @@ .about { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; height: 100%; + width: 100%; + padding: 20px 20px 10px 20px; background-color: $--background-color-empty; - //border: 10px solid $--background-color-base; box-sizing: border-box; + .app{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 140px; + background-color: $--background-color-2; + } .about-label { color: $--color-text-secondary; } .app-header { display: flex; - min-width: 360px; + justify-content: center; + align-items: center; + border-right: 2px solid $--border-color-light; + padding-right: 20px; + margin-right: 20px; + // min-width: 360px; .header-logo { font-size: 0; @@ -22,19 +32,20 @@ } .header-title { - padding-left: 20px; + padding-left: 10px; display: flex; flex-direction: column; - justify-content: space-between; + justify-content: center; .app-name { font-weight: bold; - line-height: 50px; + line-height: 30px; font-size: 20px; color: $--color-text-primary; } .app-version { + padding-left: 1px; font-size: 14px; color: $--color-text-primary; font-weight: 400; @@ -43,28 +54,107 @@ } .app-component { - width: 360px; - margin-top: 35px; - - .component-title { - color: $--color-text-secondary; - height: 30px; - font-size: 14px; - line-height: 30px; - border-bottom: 1px solid $--color-text-secondary; - } - + display: flex; + justify-content: space-between; + align-items: center; .component-content { - padding-top: 8px; - } - - .app-component-row { - line-height: 28px; - display: flex; - color: $--color-text-primary; - font-size: 16px; - font-weight: 400; - justify-content: space-between; + // padding-top: 8px; + .app-component-row { + line-height: 28px; + display: flex; + color: $--color-text-primary; + font-size: 14px; + font-weight: 400; + justify-content: space-between; + } + .component-name{ + color: $--color-text-regular; + margin-right: 20px; + } } } + + .time-line{ + width: 100%; + height: calc(100% - 160px); + .time-line-title{ + margin-top: 20px; + width: 100%; + padding-bottom: 10px; + color: $--color-text-regular; + font-size: 14px; + font-weight: 700; + } + .time-line-body{ + width: 100%; + height: 96%; + padding: 30px 30px 0 35px; + border: 1px solid $--border-color-light; + box-sizing: border-box; + overflow-y: auto; + .el-timeline-item{ + padding-bottom: 0; + } + .about-summary{ + display: flex; + justify-content: start; + align-items: center; + padding-top: 6px; + line-height: 21px; + .dot{ + width: 6px; + height: 6px; + border-radius: 50%; + background-color: $--color-info; + margin-right: 5px; + } + .about-summary-text{ + font-size: 14px; + color: $--color-text-regular; + } + } + } + } + + .el-timeline-item__node.el-timeline-item__node--normal.el-timeline-item__node--{ + position: relative; + box-sizing: border-box; + width: 18px; + height: 18px; + border: 1px solid $--color-primary; + background-color: $--background-color-empty; + z-index: 3; + } + .el-timeline-item__node.el-timeline-item__node--normal.el-timeline-item__node--::before{ + content: ""; + width: 12px; + height: 12px; + border-radius: 50%; + background-color: $--color-primary; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + z-index: 3; + } + .el-timeline-item__tail{ + border-left: 1px solid rgba(250,144,28,0.12); + left: 8px; + } + .el-timeline-item__wrapper{ + top:-21px; + padding-left: 38px; + .el-timeline-item__timestamp.is-top{ + font-size: 16px; + color: $--color-text-primary; + margin-bottom: 5px; + } + } + + + + + } diff --git a/nezha-fronted/src/assets/css/components/page/monitor/project/project.scss b/nezha-fronted/src/assets/css/components/page/monitor/project/project.scss index eed14888d..983c41fe2 100644 --- a/nezha-fronted/src/assets/css/components/page/monitor/project/project.scss +++ b/nezha-fronted/src/assets/css/components/page/monitor/project/project.scss @@ -139,3 +139,27 @@ .el-collapse-item__header { border-bottom: 1px solid $--border-color-light; } + +.main-list--project.main-list{ + .project.projectTopo{ + .project-box.list-page{ + .mc{ + .right-box{ + td{ + .cell{ + padding-right: 11px !important; + } + } + .cell{ + padding: 0 10px !important; + .el-checkbox__inner{ + box-sizing: border-box; + width: 15px; + height: 15px; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 9ea56f579..b1d9b1b4a 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -176,7 +176,8 @@ export default { scrollTop: 0, scrollTopTimer: null, // 变量比较结果 图表是否显示/隐藏 - showHidden: {} + showHidden: {}, + tempList: [] } }, methods: { @@ -440,6 +441,7 @@ export default { }, // 比较变量 图表是否显示/隐藏 compareVariables () { + console.log(123123123123) if (!this.panelLock) { return false } @@ -507,6 +509,24 @@ export default { }) } }) + // this.copyDataList.forEach((item, index) => { + // if (!this.showHidden[item.id] && item.id !== -2) { + // delete this.copyDataList[index] + // } + // }) + for (let i = 0; i < this.copyDataList.length; i++) { + const item = this.copyDataList[i] + if ((this.showHidden[item.id] && this.showHidden[item.id] === 'hidden') && item.id !== -2) { + this.copyDataList.splice(i, 1) + i-- + } + } + this.tempList.forEach(item => { + if ((!this.showHidden[item.id] || this.showHidden[item.id] === 'show') && item.id !== -2 && !this.copyDataList.find(chart => chart.id === item.id)) { + this.copyDataList.push(item) + } + }) + this.onScroll(this.scrollTop) } }, created () { @@ -549,6 +569,12 @@ export default { handler (flag) { if (!flag) { this.showHidden = {} + this.tempList.forEach(item => { + if (!this.copyDataList.find(chart => chart.id === item.id)) { + this.copyDataList.push(item) + } + }) + this.onScroll(this.scrollTop) } else { // 比较变量 图表是否显示/隐藏 this.compareVariables() @@ -618,6 +644,7 @@ export default { }) } this.$nextTick(() => { + this.tempList = JSON.parse(JSON.stringify(tempList)) this.copyDataList = JSON.parse(JSON.stringify(tempList)) // 比较变量 图表是否显示/隐藏 this.compareVariables() diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index c3eafd1ac..2dae84488 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -546,12 +546,23 @@ export default { }, variablesReplace (expression) { let str = expression + let confirmReg = '' + let confirmRegItem = '' this.variablesArr.forEach(item => { - const reg = new RegExp('\\$' + item.name, 'g') // 后续需要考虑 item,name 使用特殊字符的问题 - if (reg.test(expression)) { - str = str.replace(reg, item.checked.map(label => label.replace(/\"/g, '\\"').replace(/\'/g, "\\'")).join('|')) + const reg = '$' + item.name // 后续需要考虑 item,name 使用特殊字符的问题 + const index = expression.indexOf(reg) + if (index !== -1) { + if (reg.length > confirmReg.length) { + confirmReg = reg + confirmRegItem = item + } } }) + if (confirmReg) { + const index = expression.indexOf(confirmReg) + const replaceStr = confirmRegItem.checked.map(label => label.replace(/\"/g, '\\"').replace(/\'/g, "\\'")).join('|') + str = str.substring(0, index) + replaceStr + str.substring(index + confirmReg.length) + } return str }, getHexagonFigureData () { diff --git a/nezha-fronted/src/components/common/@topology/core/src/core.js b/nezha-fronted/src/components/common/@topology/core/src/core.js index ee4997280..88157997f 100644 --- a/nezha-fronted/src/components/common/@topology/core/src/core.js +++ b/nezha-fronted/src/components/common/@topology/core/src/core.js @@ -823,9 +823,11 @@ const Topology = /** @class */ (function () { this.setupMouseEvent() // Wait for parent dom load setTimeout(function () { + if (!_this.divLayer) return _this.canvasPos = _this.divLayer.canvas.getBoundingClientRect() }, 500) setTimeout(function () { + if (!_this.divLayer) return _this.canvasPos = _this.divLayer.canvas.getBoundingClientRect() }, 1000) this.cache() @@ -1300,6 +1302,9 @@ const Topology = /** @class */ (function () { return this } this.rendering = true + if (!this.offscreen ) { + return + } // 获取 ctx 对象 const ctx = this.offscreen.canvas.getContext('2d') ctx.clearRect(0, 0, this.offscreen.canvas.width, this.offscreen.canvas.height) @@ -2510,6 +2515,7 @@ const Topology = /** @class */ (function () { } this.cacheTimer = setTimeout(function () { let _a + if (!this.animateLayer) return _this.animateLayer.readyPlay(undefined, true) _this.animateLayer.animate(); (_a = _this.cache) === null || _a === void 0 ? void 0 : _a.call(_this) diff --git a/nezha-fronted/src/components/common/alert/nzTooltip.vue b/nezha-fronted/src/components/common/alert/nzTooltip.vue index bfa0eaf86..a43899c97 100644 --- a/nezha-fronted/src/components/common/alert/nzTooltip.vue +++ b/nezha-fronted/src/components/common/alert/nzTooltip.vue @@ -1,5 +1,5 @@