diff --git a/nezha-fronted/src/components/common/project/addNode.vue b/nezha-fronted/src/components/common/project/addNode.vue index a5efaebb4..0f41c0050 100644 --- a/nezha-fronted/src/components/common/project/addNode.vue +++ b/nezha-fronted/src/components/common/project/addNode.vue @@ -20,7 +20,7 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {{$t('alert.config.expr')}} + + + + + + + Name + + + + + + + + + + Unit + + + + + + + + + + {{$t('dashboard.panel.chartForm.legend')}} + + + + + + + + + + - @@ -93,6 +117,7 @@ diff --git a/nezha-fronted/src/components/common/project/topology.vue b/nezha-fronted/src/components/common/project/topology.vue index bbeabb196..e988e9153 100644 --- a/nezha-fronted/src/components/common/project/topology.vue +++ b/nezha-fronted/src/components/common/project/topology.vue @@ -12,7 +12,7 @@ Remove - save + save Please select two nodes Cancel @@ -287,7 +287,7 @@ interaction:{ dragNodes: true, //是否能拖动节点 - dragView: true, //是否能拖动画布 + dragView: false, //是否能拖动画布 hover: true, //鼠标移过后加粗该节点和连接线 multiselect: false, //按 ctrl 多选 selectable: true, //是否可以点击选择 @@ -826,4 +826,11 @@ right: 0; top: 0; } + .saveTopology{ + background: #FA901C; + border-radius: 4px; + font-size: 14px; + color: #FFFFFF; + padding: 4px 14px; + } diff --git a/nezha-fronted/src/components/common/project/visNetwork.vue b/nezha-fronted/src/components/common/project/visNetwork.vue index 9e7c6c4f8..ad3dc2072 100644 --- a/nezha-fronted/src/components/common/project/visNetwork.vue +++ b/nezha-fronted/src/components/common/project/visNetwork.vue @@ -20,7 +20,7 @@ - {{chartData.title}} + @@ -31,6 +31,71 @@ + + + + + {{projectInfo.title}} + + + Id :{{projectInfo.id}} + Name :{{projectInfo.name}} + + + Description :{{projectInfo.remark?projectInfo.remark:'--'}} + + + + Alert state : + {{projectInfo.alertStat[0]}} + {{projectInfo.alertStat[1]}} + {{projectInfo.alertStat[2]}} + + + + Module Mum :{{projectInfo.moduleMum}} + + + + + {{alertData.title}} + {{alertData.sssObj.total}} + + + + + {{alertData.sssObj.pending}} + + + + {{alertData.sssObj.stop}} + + + + {{alertData.sssObj.other}} + + + + + - @@ -70,7 +134,9 @@ chartData: { type: Object }, - allModuleInfo:{} + allModuleInfo:{}, + projectInfo:{}, + alertData:{} }, watch:{ allModuleInfo:{ @@ -79,7 +145,21 @@ handler(n){ this.getNetworkData(n); }, - } + }, + projectInfo:{ + immediate: true, + deep: true, + handler(n){ + this.getNetworkData(n); + }, + }, + alertData:{ + immediate: true, + deep: true, + handler(n){ + this.getNetworkData(n); + }, + }, }, data () { return { @@ -144,4 +224,57 @@ .vis-network-content{ height: 100%; } + .facade-top{ + min-height: 138px; + display: flex; + margin: 12px 0; + height: calc(16% - 40px); + font-size: 12px; + position: absolute; + top: 15px; + left: 15px; + z-index: 10; + } + .facade-top > div{ + height: calc(100% - 40px); + width: 18%; + min-width: 315px; + background: #FFFFFF; + margin-right: 9px; + padding: 20px; + border: 1px solid #FFFFFF; + box-shadow: 1px 2px 4px 0 rgba(0,0,0,0.12), -1px 1px 9px -1px rgba(205,205,205,0.77); + } + .facade-top-title{ + font-size: 16px; + color: #333333; + font-weight: bold; + padding: 5px 0; + } + .facade-top-left{ + display: flex; + flex-direction: column; + justify-content: space-around; + } + .special.label{ + margin-left: 30px; + } + .facade-top .facade-top-right{ + width: 12%; + min-width: 280px; + } + .facade-top-right-content{ + display: flex; + justify-content: space-around; + justify-items: center; + height: calc(100% - 30px); + align-items:center; + } + .align--center{ + text-align: center; + } + .label{ + padding: 0 15px; + } + diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue index e66392c7a..ea124e857 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue @@ -46,7 +46,7 @@ - + @@ -65,7 +65,8 @@ expressionList:{}, plugins: {type: Array}, styleType: Number, - historyParam:{type:Object} + historyParam:{type:Object}, + showRemove:{type:Boolean,default:true} }, data(){ return {