Commit ad2086ff authored by xinglei's avatar xinglei

增加当前告警数红色

parent 68c289c2
...@@ -216,7 +216,6 @@ ...@@ -216,7 +216,6 @@
} }
.net-topo-content { .net-topo-content {
height: calc(100% - 42px); height: calc(100% - 42px);
...@@ -248,6 +247,13 @@ ...@@ -248,6 +247,13 @@
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;
}
} }
} }
} }
......
...@@ -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 => {
if (item.name === '当前告警数'){
return (<div key={item.name} className="tooltip-item">
<div className="item-name">{item.name}: </div>
<div className="item-value-alarm">{item.value}</div>
</div>);
} else {
return (<div key={item.name} className="tooltip-item"> return (<div key={item.name} className="tooltip-item">
<div className="item-name">{item.name}: </div> <div className="item-name">{item.name}: </div>
<div className="item-value">{item.value}</div> <div className="item-value">{item.value}</div>
</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