summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/components
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-11-05 16:29:07 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-11-05 16:30:02 +0800
commitee80382f7574fa459808da8e7f9ad410b5e8de22 (patch)
tree113b36733000eb379417a4b50c0369313ef7981e /usecaseui-portal/src/app/components
parenta9c61e99f395e091b8f16ac5861a50b5148e9033 (diff)
Fix VNF Alarm Query Bugs
Change-Id: I70c8d6761bd940b1e07983ef123b98a1cd79dccd Issue-ID: USECASEUI-166 Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/components')
-rw-r--r--usecaseui-portal/src/app/components/details/details.component.html48
-rw-r--r--usecaseui-portal/src/app/components/details/details.component.ts39
2 files changed, 53 insertions, 34 deletions
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 @@
<hr> <span class="tildeimg"></span>
<div class="headerlist">
<div class="leftlist">
- <p> <span>Version :</span> </p>
- <p> <span>Domain :</span> </p>
- <p> <span>Event Name :</span> Fault_IMSSBC_Backup MPU is down </p>
- <p> <span>Event Id :</span> 15105642034 </p>
- <p> <span>EventType :</span> </p>
- <p> <span>NfcNamingCode :</span> </p>
- <p> <span>NfNamingCode :</span> </p>
- <p> <span>SourceName :</span> </p>
- <p> <span>SourceId :</span> </p>
- <p> <span>ReportingEntityName :</span> </p>
- <p> <span>ReportingEntityId :</span> </p>
+ <p> <span>Version :</span>{{datailheaderdata.version}}</p>
+ <p> <span>Domain :</span>{{datailheaderdata.domain}}</p>
+ <p> <span>Event Name :</span>{{datailheaderdata.eventName}}</p>
+ <p> <span>Event Id :</span>{{datailheaderdata.eventId}}</p>
+ <p> <span>EventType :</span>{{datailheaderdata.eventType}}</p>
+ <p> <span>NfcNamingCode :</span>{{datailheaderdata.nfcNamingCode}}</p>
+ <p> <span>NfNamingCode :</span>{{datailheaderdata.nfNamingCode}}</p>
+ <p> <span>SourceName :</span>{{datailheaderdata.sourceName}}</p>
+ <p> <span>SourceId :</span>{{datailheaderdata.sourceId}}</p>
+ <p> <span>ReportingEntityName :</span>{{datailheaderdata.reportingEntityName}}</p>
+ <p> <span>ReportingEntityId :</span>{{datailheaderdata.reportingEntityId}}</p>
</div>
<div class="rightlist">
- <p> <span>Priority :</span> Normal </p>
- <p> <span>ReportTime :</span> </p>
- <p> <span>ClearTime :</span> </p>
- <p> <span>FaultFieldsVersion :</span> </p>
- <p> <span>Event Servrity :</span> </p>
- <p> <span>EventSourceType :</span> </p>
- <p> <span>EventCategory :</span> </p>
- <p> <span>AlarmCondition :</span> </p>
- <p> <span>SpecificProblem :</span> </p>
- <p> <span>Status :</span> </p>
- <p> <span>AlarmInterfaceA :</span> </p>
+ <p> <span>Priority :</span>{{datailheaderdata.priority}}</p>
+ <p> <span>ReportTime :</span>{{datailheaderdata.reportTime}}</p>
+ <p> <span>ClearTime :</span>{{datailheaderdata.clearTime}}</p>
+ <p> <span>FaultFieldsVersion :</span>{{datailheaderdata.faultFieldsVersion}}</p>
+ <p> <span>Event Servrity :</span>{{datailheaderdata.eventServrity}}</p>
+ <p> <span>EventSourceType :</span>{{datailheaderdata.eventSourceType}}</p>
+ <p> <span>EventCategory :</span>{{datailheaderdata.eventCategory}}</p>
+ <p> <span>AlarmCondition :</span>{{datailheaderdata.alarmCondition}}</p>
+ <p> <span>SpecificProblem :</span>{{datailheaderdata.specificProblem}}</p>
+ <p> <span>Status :</span> {{datailheaderdata.status}}</p>
+ <p> <span>AlarmInterfaceA :</span>{{datailheaderdata.alarmInterfaceA}}</p>
</div>
</div>
</div>
@@ -50,7 +50,7 @@
<button [ngClass]="{'buttonActive':moredetailShow}" (click)="slideUpDown()"></button>
<h2 class="detailtitle">DETAIL INFORMATION</h2>
<div class="detailInformatioin" [@slideUpDown]='state'>
- <nz-table #detailTable [nzData]="detailData" [nzShowPagination]="false" nzSize="small" [nzBordered]="true">
+ <nz-table #detailTable [nzData]="dataillistdata" [nzShowPagination]="false" nzSize="small" [nzBordered]="true">
<thead>
<tr>
<th nzWidth="18%">Item Name</th>
@@ -58,7 +58,7 @@
</tr>
</thead>
<tbody>
- <tr *ngFor="let data of detailTable.data">
+ <tr *ngFor="let data of dataillistdata">
<td>{{data.name}}</td>
<td>{{data.value}}</td>
</tr>
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;