Commit ad2086ff authored by xinglei's avatar xinglei

增加当前告警数红色

parent 68c289c2
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
width: calc(100% - 300px); width: calc(100% - 300px);
height: 100%; height: 100%;
.paslogy-content { .paslogy-content {
// display: flex; // display: flex;
...@@ -211,20 +211,19 @@ ...@@ -211,20 +211,19 @@
opacity: 1; opacity: 1;
margin-right: 42px; margin-right: 42px;
opacity:1; opacity:1;
} }
} }
.net-topo-content { .net-topo-content {
height: calc(100% - 42px); height: calc(100% - 42px);
.topology-net { .topology-net {
canvas { canvas {
outline: none; outline: none;
} }
.tooltip-content { .tooltip-content {
width: 200px; width: 200px;
background: #345fa6; background: #345fa6;
...@@ -232,22 +231,29 @@ ...@@ -232,22 +231,29 @@
opacity: 1; opacity: 1;
border-radius: 7px; border-radius: 7px;
padding: 22px 24px; padding: 22px 24px;
.tooltip-item { .tooltip-item {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
color: white; color: white;
.item-name { .item-name {
display: inline-block; display: inline-block;
} }
.item-value { .item-value {
display: inline-block; display: inline-block;
padding-left: 10px; padding-left: 10px;
} }
.item-value-alarm {
display: inline-block;
padding-left: 10px;
text-decoration: underline;
color: #ff0000;
}
} }
} }
} }
...@@ -303,9 +309,9 @@ ...@@ -303,9 +309,9 @@
} }
} }
} }
...@@ -118,15 +118,17 @@ class TopologyComponent extends Component { ...@@ -118,15 +118,17 @@ class TopologyComponent extends Component {
return width; return width;
} }
//设置标题高度
setTitleHeight = (v) => { setTitleHeight = (v) => {
let titleHeight = (v.indexOf('DMZ') !== -1) ? 40 : 25; let titleHeight = (v.indexOf('DMZ') !== -1) ? 40 : 25;
return titleHeight; return titleHeight;
} }
//设置第一行高度
setLine1Height = (v) => { setLine1Height = (v) => {
let str = this.getLine1Text(v); let str = this.getLine1Text(v);
if (str){ if (str){
return str; return;
} }
return 0; return 0;
} }
...@@ -188,10 +190,17 @@ class TopologyComponent extends Component { ...@@ -188,10 +190,17 @@ class TopologyComponent extends Component {
const { detailData } = this.state; const { detailData } = this.state;
return (<div id="toolTipDIV" className="tooltip-content" style={{ position: 'absolute', zIndex: 1000, display: 'none' }}> return (<div id="toolTipDIV" className="tooltip-content" style={{ position: 'absolute', zIndex: 1000, display: 'none' }}>
{detailData.map(item => { {detailData.map(item => {
return (<div key={item.name} className="tooltip-item"> if (item.name === '当前告警数'){
<div className="item-name">{item.name}: </div> return (<div key={item.name} className="tooltip-item">
<div className="item-value">{item.value}</div> <div className="item-name">{item.name}: </div>
</div>); <div className="item-value-alarm">{item.value}</div>
</div>);
} else {
return (<div key={item.name} className="tooltip-item">
<div className="item-name">{item.name}: </div>
<div className="item-value">{item.value}</div>
</div>);
}
})} })}
</div>); </div>);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment