Commit 27feef6b authored by wangqinghua's avatar wangqinghua

update

parent bed93c58
...@@ -148,17 +148,13 @@ export class AlarmLogComponent implements OnInit { ...@@ -148,17 +148,13 @@ export class AlarmLogComponent implements OnInit {
break; break;
} }
case'3':{ case'3':{
day1 = nowDate - 3*24*60*60*1000; this.obj.time_from = nowDate - 3*24*60*60*1000;
day2 = nowDate - 1*24*60*60*1000; this.obj.time_till = nowDate;
this.obj.time_from = this.datePipe.transform(day1,'yyyy-MM-dd') + ' 00:00:00';
this.obj.time_till = this.datePipe.transform(day2,'yyyy-MM-dd') + ' 23:59:59';
break; break;
} }
case'4':{ case'4':{
day1 = nowDate - 7*24*60*60*1000; this.obj.time_from = nowDate - 7*24*60*60*1000;
day2 = nowDate - 1*24*60*60*1000; this.obj.time_till = nowDate;
this.obj.time_from = this.datePipe.transform(day1,'yyyy-MM-dd') + ' 00:00:00';
this.obj.time_till = this.datePipe.transform(day2,'yyyy-MM-dd') + ' 23:59:59';
break; break;
} }
case'5':{ case'5':{
......
...@@ -66,7 +66,9 @@ ...@@ -66,7 +66,9 @@
{{item.receiver}} {{item.receiver}}
</p> </p>
</td> </td>
<td>{{data.event.title}}</td> <td><ng-container *ngIf="data.event">
{{data.event.title}}
</ng-container></td>
<td class="handle text-center main-color"> <td class="handle text-center main-color">
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteAlarm(data)">删除</span> <span (click)="deleteAlarm(data)">删除</span>
......
...@@ -108,7 +108,7 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -108,7 +108,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
} }
//查看详情 //查看详情
goDetail(item) { goToDetail(item) {
this.router.navigate(['app/main/basic-detail'], { this.router.navigate(['app/main/basic-detail'], {
queryParams: { queryParams: {
hostId: item.hostid, hostId: item.hostid,
......
...@@ -343,12 +343,15 @@ export class AlarmModalComponent implements OnInit { ...@@ -343,12 +343,15 @@ export class AlarmModalComponent implements OnInit {
r_longdata: this.validateForm.r_longdata, r_longdata: this.validateForm.r_longdata,
r_shortdata: this.validateForm.r_shortdata, r_shortdata: this.validateForm.r_shortdata,
hostIds: this.selectTreeList, hostIds: this.selectTreeList,
event: { event: null
};
if(this.isEvent == "1"){
data.event = {
eventTypeId: this.validateForm.event.eventTypeId, //事件分类id eventTypeId: this.validateForm.event.eventTypeId, //事件分类id
operators: this.operatorList, //事件负责人 operators: this.operatorList, //事件负责人
title: this.validateForm.event.title, //事件标题 title: this.validateForm.event.title, //事件标题
} }
}; }
if (this.title == '添加告警') { if (this.title == '添加告警') {
this.create(data); this.create(data);
......
...@@ -369,20 +369,20 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -369,20 +369,20 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
e2.alarm = "主机被删除,请及时清理"; e2.alarm = "主机被删除,请及时清理";
e2.fontColor='0,0,0'; e2.fontColor='0,0,0';
e2.alarmAlpha=0.9; e2.alarmAlpha=0.9;
dlist.push(e2) // dlist.push(e2)
} }
if(e1.status == 1){ if(e1.status == 1){
e2.alarm = "危险"; e2.alarm = "危险";
e2.fontColor='0,0,0'; e2.fontColor='0,0,0';
e2.alarmColor='255,153,18'; e2.alarmColor='255,153,18';
e2.alarmAlpha=0.9; e2.alarmAlpha=0.9;
wlist.push(e2); // wlist.push(e2);
} }
if(e1.status == 2){ if(e1.status == 2){
e2.alarm = "故障"; e2.alarm = "故障";
e2.fontColor='255,97,0'; e2.fontColor='255,97,0';
e2.alarmAlpha=0.9; e2.alarmAlpha=0.9;
glist.push(e2); // glist.push(e2);
} }
} }
}) })
...@@ -390,9 +390,9 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -390,9 +390,9 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
editor.loadTopologyByJson(topologyJson, 'img/backimg.png'); editor.loadTopologyByJson(topologyJson, 'img/backimg.png');
} }
) )
this.interval(wlist,"危险"); // this.interval(wlist,"危险");
this.interval(glist,"故障"); // this.interval(glist,"故障");
this.interval(dlist,"已删除"); // this.interval(dlist,"已删除");
} }
//流量数据 //流量数据
......
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
<!--临时暂停--> <!--临时暂停-->
<smart-pause #smartPause (done)="handleOk($event)"></smart-pause> <smart-pause #smartPause (done)="handleOk($event)"></smart-pause>
<!--添加告警--> <!--添加告警-->
<smart-alarm-modal #smartAlarmModal></smart-alarm-modal> <smart-alarm-modal #smartAlarmModal (done)="handleOk($event)"></smart-alarm-modal>
<!--自动发现--> <!--自动发现-->
<smart-discovery #smartDiscovery></smart-discovery> <smart-discovery #smartDiscovery (done)="handleOk($event)"></smart-discovery>
<!--监控策略--> <!--监控策略-->
<smart-strategy #smartStrategy></smart-strategy> <smart-strategy #smartStrategy (done)="handleOk($event)"></smart-strategy>
\ No newline at end of file \ No newline at end of file
...@@ -330,4 +330,8 @@ ui bootstrap tweaks ...@@ -330,4 +330,8 @@ ui bootstrap tweaks
.ant-tooltip-placement-bottom .ant-tooltip-arrow{ .ant-tooltip-placement-bottom .ant-tooltip-arrow{
border-bottom-color:#dddddd; border-bottom-color:#dddddd;
} }
.table-dropdown a,
.ant-dropdown-menu-item > a{
font-weight: 400 !important;
color:#6097b7;
}
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