Commit d3ab3bcc authored by wangqinghua's avatar wangqinghua

删除关联业务

parent 52cfeae6
......@@ -164,7 +164,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
} else if (size / kbps > 1) {
res += '<br/>流量:' + (size / kbps).toFixed(2) + 'kbps';
} else {
res += '<br/>流量:' + (size) + 'bbps';
res += '<br/>流量:' + (size) + 'bps';
}
return res;
}
......@@ -286,7 +286,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
} else if (size / kbps > 1) {
res += '<br/>流量:' + (size / kbps).toFixed(2) + 'kbps';
} else {
res += '<br/>流量:' + (size) + 'bbps';
res += '<br/>流量:' + (size) + 'bps';
}
return res;
}
......@@ -439,7 +439,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
} else if (size / kbps > 1) {
res += '<br/>流量:' + (size / kbps).toFixed(2) + 'kbps';
} else {
res += '<br/>流量:' + (size) + 'bbps';
res += '<br/>流量:' + (size) + 'bps';
}
return res;
......
......@@ -63,26 +63,28 @@
<div class="container">
<div class="layui-row">
<div class="layui-col-md12">
<!--<nz-spin [nzSpinning]="isLoading">-->
<div #topologyBody id="topology-body" class="topology-context">
<!-- 鼠标悬浮显示节点信息 -->
<div class="node-infobox" style="display: none;">
<span>节点名称:<label name="node_name"></label></span>
<span>当前时间:<label name="current_time"></label></span>
</div>
<canvas class="topology-context" id="topology-canvas" #topologyCanvas style="height: 580px;">
<canvas class="topology-context" id="topology-canvas" #topologyCanvas style="height: 580px;width: 100%">
您的浏览器不支持HTML5!
</canvas>
<div class="lineList">
{{editType}}
</div>
<div class="loading">
<nz-spin nzTip='获取拓扑图...' [nzSpinning]="isLoading">
</nz-spin>
</div>
<div class="checkList">
<p *ngFor="let item of checkJson;let i = index;">
<span [style.fontSize]="item.fontSize +'px'">{{item.name}}</span><i (click)="deleteCheck(i)" class="minus anticon anticon-minus-circle-o"></i>
</p>
</div>
</div>
<!--</nz-spin>-->
</div>
</div>
</div>
......
......@@ -64,7 +64,11 @@ declare var layui: any;
.layui-form-label {
width: 110px;
}
.loading{
position: absolute;
top: 30%;
left: 49%;
}
.minus {
vertical-align: middle;
color: red;
......@@ -272,7 +276,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
(res) => {
if (res.errCode == 10000) {
this.message.success('编辑成功');
editor.utils.editTopology();
this.getList();
} else {
this.message.error(res.errMsg);
......@@ -311,10 +314,12 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
this.viewTopology(JSON.parse(json.topology));
this.checkJson = json.check;
}else{
this.isLoading = false;
editor.utils.clearTopology();
this.checkJson = [];
}
} else {
this.isLoading = false;
editor.utils.clearTopology();
this.checkJson = [];
}
......@@ -323,7 +328,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
this.topoId = res.data.id;
this.findItemStatus();
}
editor.utils.editTopology();
}
);
}
......@@ -364,7 +368,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
resData.forEach(e1=>{
arr.forEach(e2=>{
if(e1.elementId == e2.hostId){
console.log("e1.status="+e1.status)
if(e1.status == -2){
e2.alarm = "主机被删除,请及时清理";
e2.fontColor='0,0,0';
......@@ -388,11 +391,9 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
})
});
editor.loadTopologyByJson(topologyJson, 'img/backimg.png');
this.isLoading = false;
}
)
// this.interval(wlist,"危险");
// this.interval(glist,"故障");
// this.interval(dlist,"已删除");
}
//流量数据
......@@ -410,13 +411,14 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
}
})
});
this.isLoading = false;
editor.loadTopologyByJson(topologyJson, 'img/backimg.png');
}
)
}else{ //无流量监控
this.isLoading = false;
editor.loadTopologyByJson(topologyJson, 'img/backimg.png');
}
this.isLoading = false;
}
//查询监控点状态
......
......@@ -201,7 +201,7 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
} else if (size / kbps > 1) {
res += '<br/>流量:' + (size / kbps).toFixed(2) + 'kbps';
} else {
res += '<br/>流量:' + (size) + 'bbps';
res += '<br/>流量:' + (size) + 'bps';
}
return res;
}
......
......@@ -18,7 +18,7 @@ export class ToUtilPipe implements PipeTransform {
const k = size / kbps;
res = k.toFixed(2) + 'kbps';
} else {
res = (size) + 'bbps';
res = (size) + 'bps';
}
return res;
}else{
......
......@@ -94,7 +94,7 @@ TopologyPanel.prototype.loadTopologyByJson = function (topologyJson, backImg) {
}else if(alarmList[i].alarm == ''){
alarmList[i].alarm = '危险'
}
}, 600);
}, 2000);
})(i);
}
......
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