summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/alarm/alarm.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/alarm/alarm.component.ts')
-rw-r--r--usecaseui-portal/src/app/alarm/alarm.component.ts195
1 files changed, 73 insertions, 122 deletions
diff --git a/usecaseui-portal/src/app/alarm/alarm.component.ts b/usecaseui-portal/src/app/alarm/alarm.component.ts
index 42b05b16..d4372113 100644
--- a/usecaseui-portal/src/app/alarm/alarm.component.ts
+++ b/usecaseui-portal/src/app/alarm/alarm.component.ts
@@ -27,55 +27,61 @@ import { showHideAnimate, slideToRight } from '../animates';
]
})
export class AlarmComponent implements OnInit {
- @HostBinding('@routerAnimate') routerAnimateState; //路由动画
- public pageNumber:number=1;
+ size = 'day';
+ @HostBinding('@routerAnimate') routerAnimateState; //Routing animation
+ public currentPage:number=1;
public pageSize:number=5;
- public name:string='';
- public Priority:string ='';
- public Status:string ='';
- public Report:string ='';
+ public sourceName:string='';
+ public priority:string ='';
+ public startTime:string ='';
+ public endTime:string ='';
+ public vfStatus:string ='';
list: any;
+ sourcenames:any;
constructor(
private myhttp:MyhttpService) { }
- isVisibleMiddle = false;
+ ngOnInit() {
+ // this.getAlarmFormData();
+ // this. getSourceNames();
+ // this.getstatuscount();
+ }
- showModalMiddle(): void {
- this.isVisibleMiddle = true;
- }
- handleOkMiddle(): void {
- console.log('click ok');
- this.isVisibleMiddle = false;
- }
- handleCancelMiddle(): void {
- this.isVisibleMiddle = false;
- }
- ngOnInit() {
- this.getAlarmFormData();
- }
+ // Filter box
+ sourceNameList = [];
+ sourceNameSelected = this.sourceNameList;
- // 筛选框(下拉框)
- sourceNameList = ['---auto---','shentao-test-1001','vnf_a_1','cccc','dddddDDDDDDD'];
- sourceNameSelected = this.sourceNameList[0];
priorityList = ['---auto---','Critical','Major','Minor','Warning'];
prioritySelected = this.priorityList[0];
+
+
statusList = ['---auto---','active','Close'];
statusSelected = this.statusList[0];
+
choseSourceName(item){
console.log(item,'item1');
this.sourceNameSelected = item;
+ return this.sourceName = item;
}
chosePriority(item){
console.log(item);
this.prioritySelected = item;
+ return this.priority = item;
}
choseStatus(item){
console.log(item);
this.statusSelected = item;
+ return this.vfStatus = item;
}
+ // getSourceNames(){
+ // this.myhttp.getSourceNames().subscribe((data)=>{
+ // this.sourceNameList=data;
+ // console.log(data,'datass');
+ // })
+ // }
- // 日期筛选
+ // Date screening
dateRange = [ addDays(new Date(), -30), new Date() ];
onChange(result: Date): void {
@@ -84,38 +90,52 @@ export class AlarmComponent implements OnInit {
sort(e){
}
- // 数量统计
+ // total
alarmList = {
- closed:37923,
- Action: 12342
+ all:200,
+ closed:0,
+ activeNum:0
}
+ // total data
+ // getstatuscount(){
+ // this.myhttp.getstatuscount().subscribe((data)=>{
+ // this.alarmList.activeNum = data[0];
+ // this.alarmList.closed = data[1];
+
+ // })
+ // }
- //折线图縮略圖
+ //Line chart
+ alarmShow = false;
alarmChartData:Object;
alarmChartInit:Object = {
- height:100,
- width:290,
+ height:380,
option:{
- tooltip : {
- show : false,
- trigger: 'axis',
- },
legend: {
- show :false,
bottom: '0px',
data: ['All', 'Active', 'Closed']
},
+ dataZoom: [
+ {
+ type: 'slider',
+ show: true,
+ // xAxisIndex: [0],
+ start: 1,
+ height: 10,
+ end: 40
+ }
+ ],
series: [
{
name: 'All',
type: 'line',
- smooth: true,//将图变得平缓
+ smooth: true,
showSymbol: false,
areaStyle: {
opacity: 0.8
},
//timeframe_one
- data: [40, 45, 38, 52, 64, 58, 69, 87, 76, 33, 64, 87, 45, 76, 88, 56, 33, 76, 45, 65],
+ data: [40, 45, 38, 52, 64, 58, 69, 87, 76, 33, 64, 87, 45, 76, 88, 56, 33, 76, 45, 65,38, 52, 64, 58, 69, 87, 76, 33, 64, 87,40, 45, 38, 52, 64, 58, 69, 87, 76,40, 45, 38, 52, 64, 58, 69, 87, 76],
itemStyle: {
color: "#526b75"
},
@@ -127,13 +147,13 @@ export class AlarmComponent implements OnInit {
{
name: 'Active',
type: 'line',
- smooth: true,//将图变得平缓
+ smooth: true,
showSymbol: false,
areaStyle: {
opacity: 0.8
},
//timeframe_two
- data: [32, 43, 23, 45, 63, 24, 54, 22, 32, 42, 42, 22, 23, 43, 32, 34, 42, 33, 42, 12],
+ data: [32, 43, 23, 45, 63, 24, 54, 22, 32, 42, 42, 22, 23, 43, 32, 34, 42, 33, 42, 12,32, 43, 23, 45, 63, 24, 54, 22, 32, 42, 42, 22, 23, 43, 32, 34, 42, 33, 42, 12,32, 43, 23, 45, 63, 24, 54, 22],
itemStyle: {
color: "#fb6e6e"
},
@@ -145,13 +165,13 @@ export class AlarmComponent implements OnInit {
{
name: 'Closed',
type: 'line',
- smooth: true,//将图变得平缓
+ smooth: true,//
showSymbol: false,
areaStyle: {
opacity: 0.8
},
//timeframe_two
- data: [12, 23, 13, 25, 33, 14, 34, 12, 12, 22, 12, 12, 13, 23, 12, 24, 22, 13, 22, 5],
+ data: [12, 23, 13, 25, 33, 14, 34, 12, 12, 22, 12, 12, 13, 23, 12, 24, 22, 13, 22, 5,12, 23, 13, 25, 33, 14, 34, 12, 12, 22, 12, 12, 13, 23, 12, 24, 22, 13, 22, 5,12, 23, 13, 25, 33, 14, 34, 12, 125],
itemStyle: {
color: "#3fa8eb"
},
@@ -180,82 +200,9 @@ export class AlarmComponent implements OnInit {
console.log(err);
})
}
- //折线图放大圖
- alarmChartDataBig:Object;
- alarmChartInitBig:Object = {
- height:240,
- width:500,
- option:{
- tooltip : {
- show : true,
- trigger: 'axis',
- },
- legend: {
- show :true,
- bottom: '0px',
- data: ['All', 'Active', 'Closed']
- },
- series: [
- {
- name: 'All',
- type: 'line',
- smooth: true,//将图变得平缓
- showSymbol: false,
- areaStyle: {
- opacity: 0.8
- },
- //timeframe_one
- data: [40, 45, 38, 52, 64, 58, 69, 87, 76, 33, 64, 87, 45, 76, 88, 56, 33, 76, 45, 65],
- itemStyle: {
- color: "#526b75"
- },
- lineStyle: {
- width: 1,
- opacity: 0.5
- }
- },
- {
- name: 'Active',
- type: 'line',
- smooth: true,//将图变得平缓
- showSymbol: false,
- areaStyle: {
- opacity: 0.8
- },
- //timeframe_two
- data: [32, 43, 23, 45, 63, 24, 54, 22, 32, 42, 42, 22, 23, 43, 32, 34, 42, 33, 42, 12],
- itemStyle: {
- color: "#fb6e6e"
- },
- lineStyle: {
- width: 1,
- opacity: 0.5
- }
- },
- {
- name: 'Closed',
- type: 'line',
- smooth: true,//将图变得平缓
- showSymbol: false,
- areaStyle: {
- opacity: 0.8
- },
- //timeframe_two
- data: [12, 23, 13, 25, 33, 14, 34, 12, 12, 22, 12, 12, 13, 23, 12, 24, 22, 13, 22, 5],
- itemStyle: {
- color: "#3fa8eb"
- },
- lineStyle: {
- width: 1,
- opacity: 0.5
- }
- }
- ]
- }
- };
- //详情页标题显示
+ //Detail page title display
detailshow = false;
- // 显示隐藏动画
+ // Show hidden animation
state = "show";
state2 = "hide";
detailShow() {
@@ -268,6 +215,9 @@ export class AlarmComponent implements OnInit {
this.state2 = 'hide';
this.detailshow = false;
}
+
+
+
getSelects:Object = {
countAll:0,
countClose:0,
@@ -277,10 +227,11 @@ export class AlarmComponent implements OnInit {
reportingEntityNameList:[],
sourceNameList:[],
};
- getAlarmFormData(){
- this.myhttp.getAlarmFormData(this.pageNumber,this.pageSize,this.name,this.Priority,this.Status,this.Report).subscribe((data)=>{
- this.list = data.list;
- console.log(data,'data');
- })
- }
+ // getAlarmFormData(){
+ // this.myhttp.getAlarmFormData(this.currentPage,this.pageSize,this.sourceName,this.priority,this.startTime,this.endTime,this.vfStatus).subscribe((data)=>{
+ // this.list = data.alarms;
+ // // console.log(data,'data');
+ // })
+ // }
+
}