summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/components/details/details.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/components/details/details.component.ts')
-rw-r--r--usecaseui-portal/src/app/components/details/details.component.ts39
1 files changed, 29 insertions, 10 deletions
diff --git a/usecaseui-portal/src/app/components/details/details.component.ts b/usecaseui-portal/src/app/components/details/details.component.ts
index f9e6474b..4965ed70 100644
--- a/usecaseui-portal/src/app/components/details/details.component.ts
+++ b/usecaseui-portal/src/app/components/details/details.component.ts
@@ -1,5 +1,21 @@
+/*
+ Copyright (C) 2018 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
import { Component, OnInit, Input } from '@angular/core';
import { slideUpDown } from '../../animates';
+import { MyhttpService } from '../../myhttp.service';
@Component({
selector: 'app-details',
@@ -9,25 +25,28 @@ import { slideUpDown } from '../../animates';
})
export class DetailsComponent implements OnInit {
- constructor() { }
+ constructor(private myhttp:MyhttpService) { }
ngOnInit() {
}
ngOnChanges(changes){
- console.log(changes);
+ this.getAlarmDetailData(this.detailId);
+ }
+
+ datailheaderdata: any = {};
+ dataillistdata: any = [];
+ getAlarmDetailData(id){
+ this.myhttp.getAlarmDetailData(id).subscribe((data)=>{
+ // console.log(data)
+ this.datailheaderdata = data.alarmsHeader;
+ this.dataillistdata = data.list;
+ })
}
// 详情显示
moredetailShow = false;
@Input() detailId;
- detailData = [
- {name:"DNS.AttDnsQuery",value:"0"},
- {name:"DNS.SuccDnsQuery",value:"0"},
- {name:"DNS.SuccDnsQuery",value:"0"},
- {name:"DNS.SuccDnsQuery",value:"0"},
- {name:"DNS.SuccDnsQuery",value:"0"},
- {name:"sssssss",value:"1111"},
- ]
+
state = 'up'
slideUpDown(){
this.moredetailShow = !this.moredetailShow;