From ee80382f7574fa459808da8e7f9ad410b5e8de22 Mon Sep 17 00:00:00 2001 From: zhangab Date: Mon, 5 Nov 2018 16:29:07 +0800 Subject: Fix VNF Alarm Query Bugs Change-Id: I70c8d6761bd940b1e07983ef123b98a1cd79dccd Issue-ID: USECASEUI-166 Signed-off-by: zhangab --- .../app/components/details/details.component.html | 48 +++++++++++----------- .../app/components/details/details.component.ts | 39 +++++++++++++----- 2 files changed, 53 insertions(+), 34 deletions(-) (limited to 'usecaseui-portal/src/app/components') diff --git a/usecaseui-portal/src/app/components/details/details.component.html b/usecaseui-portal/src/app/components/details/details.component.html index b5c576c7..1f431760 100644 --- a/usecaseui-portal/src/app/components/details/details.component.html +++ b/usecaseui-portal/src/app/components/details/details.component.html @@ -19,30 +19,30 @@
-

Version :

-

Domain :

-

Event Name : Fault_IMSSBC_Backup MPU is down

-

Event Id : 15105642034

-

EventType :

-

NfcNamingCode :

-

NfNamingCode :

-

SourceName :

-

SourceId :

-

ReportingEntityName :

-

ReportingEntityId :

+

Version :{{datailheaderdata.version}}

+

Domain :{{datailheaderdata.domain}}

+

Event Name :{{datailheaderdata.eventName}}

+

Event Id :{{datailheaderdata.eventId}}

+

EventType :{{datailheaderdata.eventType}}

+

NfcNamingCode :{{datailheaderdata.nfcNamingCode}}

+

NfNamingCode :{{datailheaderdata.nfNamingCode}}

+

SourceName :{{datailheaderdata.sourceName}}

+

SourceId :{{datailheaderdata.sourceId}}

+

ReportingEntityName :{{datailheaderdata.reportingEntityName}}

+

ReportingEntityId :{{datailheaderdata.reportingEntityId}}

-

Priority : Normal

-

ReportTime :

-

ClearTime :

-

FaultFieldsVersion :

-

Event Servrity :

-

EventSourceType :

-

EventCategory :

-

AlarmCondition :

-

SpecificProblem :

-

Status :

-

AlarmInterfaceA :

+

Priority :{{datailheaderdata.priority}}

+

ReportTime :{{datailheaderdata.reportTime}}

+

ClearTime :{{datailheaderdata.clearTime}}

+

FaultFieldsVersion :{{datailheaderdata.faultFieldsVersion}}

+

Event Servrity :{{datailheaderdata.eventServrity}}

+

EventSourceType :{{datailheaderdata.eventSourceType}}

+

EventCategory :{{datailheaderdata.eventCategory}}

+

AlarmCondition :{{datailheaderdata.alarmCondition}}

+

SpecificProblem :{{datailheaderdata.specificProblem}}

+

Status : {{datailheaderdata.status}}

+

AlarmInterfaceA :{{datailheaderdata.alarmInterfaceA}}

@@ -50,7 +50,7 @@

DETAIL INFORMATION

- + Item Name @@ -58,7 +58,7 @@ - + {{data.name}} {{data.value}} 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; -- cgit 1.2.3-korg