Commit d3ab3bcc authored by wangqinghua's avatar wangqinghua

删除关联业务

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