summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src
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
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')
-rw-r--r--usecaseui-portal/src/app/alarm/alarm.component.html28
-rw-r--r--usecaseui-portal/src/app/alarm/alarm.component.ts331
-rw-r--r--usecaseui-portal/src/app/components/details/details.component.html48
-rw-r--r--usecaseui-portal/src/app/components/details/details.component.ts39
-rw-r--r--usecaseui-portal/src/app/myhttp.service.ts59
5 files changed, 282 insertions, 223 deletions
diff --git a/usecaseui-portal/src/app/alarm/alarm.component.html b/usecaseui-portal/src/app/alarm/alarm.component.html
index 378cebc2..7fbbc039 100644
--- a/usecaseui-portal/src/app/alarm/alarm.component.html
+++ b/usecaseui-portal/src/app/alarm/alarm.component.html
@@ -51,24 +51,32 @@
<span>Report Time: </span>
<nz-range-picker [(ngModel)]="dateRange" (ngModelChange)="onChange($event)" nzShowTime></nz-range-picker>
- <!-- <button class="search" nz-button [nzType]="'primary'" (click)="getAlarmFormData()"><i class="anticon anticon-search"></i><span>Search</span></button> -->
- <button class="search" nz-button [nzType]="'primary'"><i class="anticon anticon-search"></i><span>Search</span></button>
+ <button class="search" nz-button [nzType]="'primary'" (click)="getAlarmFormData()"><i class="anticon anticon-search"></i><span>Search</span></button>
</div>
</div>
<div class="content" [@showHideAnimate]="state">
<div class="title">
<ul>
- <li><h5>All</h5> <p>{{alarmList.all }}</p></li>
- <li><h5>Closed</h5> <p>{{alarmList.closed }}</p></li>
- <li><h5>Active</h5> <p>{{alarmList.activeNum }}</p></li>
+ <li>
+ <h5>All</h5>
+ <p>{{alarmList.all }}</p>
+ </li>
+ <li>
+ <h5>Closed</h5>
+ <p>{{alarmList.closed }}</p>
+ </li>
+ <li>
+ <h5>Active</h5>
+ <p>{{alarmList.activeNum }}</p>
+ </li>
</ul>
</div>
<div class="chart">
<h3>Alarm Chart</h3>
<nz-radio-group [(ngModel)]="size">
- <label nz-radio-button nzValue="day"> day </label>
- <label nz-radio-button nzValue="month">month</label>
- </nz-radio-group>
+ <label nz-radio-button nzValue="day" (click)="day()"> day </label>
+ <label nz-radio-button nzValue="month" (click)="month()">month</label>
+ </nz-radio-group>
<div class="AlarmChart" [ngClass]="{'alarmChart-active':alarmShow}">
<app-line [initData]="alarmChartInit" [chartData]="alarmChartData"></app-line>
</div>
@@ -96,12 +104,12 @@
<td>{{item.specificProblem}}</td>
<td>{{item.sequence}}</td>
<td>{{item.status}}</td>
- <td class="action"><a (click)="detailShow()"><i class="details"></i></a></td>
+ <td class="action"><a (click)="detailShow(item)"><i class="details"></i></a></td>
</tr>
</tbody>
</nz-table>
</div>
</div>
<div [@showHideAnimate]="state2">
-<app-details></app-details>
+<app-details [detailId]="detailId"></app-details>
</div> \ No newline at end of file
diff --git a/usecaseui-portal/src/app/alarm/alarm.component.ts b/usecaseui-portal/src/app/alarm/alarm.component.ts
index d4372113..3f563b6e 100644
--- a/usecaseui-portal/src/app/alarm/alarm.component.ts
+++ b/usecaseui-portal/src/app/alarm/alarm.component.ts
@@ -13,108 +13,188 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Component, OnInit, Input, Output, EventEmitter, HostBinding } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter, HostBinding, Pipe, PipeTransform } from '@angular/core';
import { MyhttpService } from '../myhttp.service';
-import * as addDays from 'date-fns/add_days';
import { showHideAnimate, slideToRight } from '../animates';
-
+import { DatePipe } from "@angular/common"
@Component({
selector: 'app-alarm',
templateUrl: './alarm.component.html',
styleUrls: ['./alarm.component.less'],
animations: [
showHideAnimate, slideToRight
- ]
+ ],
+ providers: [DatePipe]
})
export class AlarmComponent implements OnInit {
size = 'day';
@HostBinding('@routerAnimate') routerAnimateState; //Routing animation
- public currentPage:number=1;
- public pageSize:number=5;
- public sourceName:string='';
- public priority:string ='';
- public startTime:string ='';
- public endTime:string ='';
- public vfStatus:string ='';
+ public currentPage: number = 1;
+ public pageSize: number = 5;
+ public sourceName: string = '';
+ public priority: string = '';
+ public startTime: string = '';
+ public endTime: string = '';
+ public vfStatus: string = '';
+ public sourceNameList:Array<any> =['---auto---'];
list: any;
- sourcenames:any;
+ sourcenames: any;
constructor(
- private myhttp:MyhttpService) { }
- ngOnInit() {
- // this.getAlarmFormData();
- // this. getSourceNames();
- // this.getstatuscount();
- }
+ private datePipe: DatePipe,
+ private myhttp: MyhttpService) { }
+ ngOnInit() {
+ this.getAlarmFormData();
+ this.getSourceNames();
+ // this.getstatuscount();
+ }
// Filter box
- sourceNameList = [];
- sourceNameSelected = this.sourceNameList;
+ sourceNameSelected = this.sourceNameList[0];
- priorityList = ['---auto---','Critical','Major','Minor','Warning'];
+ priorityList = ['---auto---', 'Critical', 'Major', 'Minor', 'Warning'];
prioritySelected = this.priorityList[0];
-
- statusList = ['---auto---','active','Close'];
+
+ statusList = ['---auto---', 'active', 'Close'];
statusSelected = this.statusList[0];
-
- choseSourceName(item){
- console.log(item,'item1');
+
+ choseSourceName(item) {
+ if(item == "---auto---"){
+ this.sourceName = '';
+ }else{
+ this.sourceName = item;
+ }
this.sourceNameSelected = item;
- return this.sourceName = item;
+
}
- chosePriority(item){
- console.log(item);
+ chosePriority(item) {
this.prioritySelected = item;
- return this.priority = item;
+ if(item == "---auto---"){
+ this.priority = '';
+ }else{
+ this.priority = item;
+ }
}
- choseStatus(item){
- console.log(item);
+ choseStatus(item) {
this.statusSelected = item;
- return this.vfStatus = item;
+ if(item == "---auto---"){
+ this.vfStatus = '';
+ }else{
+ this.vfStatus = item;
+ }
+ }
+ getSourceNames() {
+ this.myhttp.getSourceNames().subscribe((data) => {
+ for(let i=0;i<data.length;i++){
+ this.sourceNameList.push(data[i]);
+ }
+ this.sourceNameSelected = this.sourceNameList[0];
+ })
}
- // getSourceNames(){
- // this.myhttp.getSourceNames().subscribe((data)=>{
- // this.sourceNameList=data;
- // console.log(data,'datass');
- // })
- // }
// Date screening
- dateRange = [ addDays(new Date(), -30), new Date() ];
+ dateRange = [(new Date(), -30), new Date()];
onChange(result: Date): void {
- console.log('onChange: ', result);
+ this.startTime = this.datePipe.transform(result[0], 'yyyy-MM-dd-HH:mm:ss');
+ this.endTime = this.datePipe.transform(result[1], 'yyyy-MM-dd-HH:mm:ss');
}
- sort(e){
+
+ sort(e) {
}
// total
alarmList = {
- all:200,
- closed:0,
- activeNum:0
+ all: 200,
+ closed: 0,
+ activeNum: 0
}
// total data
- // getstatuscount(){
- // this.myhttp.getstatuscount().subscribe((data)=>{
- // this.alarmList.activeNum = data[0];
- // this.alarmList.closed = data[1];
-
- // })
- // }
+ getstatuscount(){
+ this.myhttp.getstatuscount().subscribe((data)=>{
+ this.alarmList.activeNum = data[0];
+ this.alarmList.closed = data[1];
+ })
+ }
+ getAlarmFormData() {
+
+ this.myhttp.getAlarmFormData(this.currentPage, this.pageSize, this.sourceName, this.priority, this.startTime, this.endTime, this.vfStatus).subscribe((data) => {
+ this.list = data.alarms;
+ })
+ this.getAlarmChartData(event);
+ }
+ getAlarmChartData(event) {
+ let paramsObj = {
+ alarmSourceName: this.sourceName,
+ startTime: this.startTime,
+ endTime: this.endTime
+ }
+ this.myhttp.getHomePerformanceChartData(paramsObj)
+ .subscribe((data) => {
+ this.alarmChartData = {
+ series: [
+ { data: data.CPU },
+ { data: data.CPU },
+ { data: data.Memory }
+ ]
+ }
+ }, (err) => {
+ console.log(err);
+ })
+ }
+ // day alarmchartdata
+ day() {
+ let paramsObj = {
+ alarmSourceName: this.sourceName,
+ day:"day"
+ }
+ this.myhttp.getHomePerformanceChartData(paramsObj)
+ .subscribe((data) => {
+ this.alarmChartData = {
+ series: [
+ { data: data.CPU },
+ { data: data.CPU },
+ { data: data.Memory }
+ ]
+ }
+ }, (err) => {
+ console.log(err);
+ })
+ }
+ month() {
+ let paramsObj = {
+ alarmSourceName: this.sourceName,
+ day:"month"
+ }
+ this.myhttp.getHomePerformanceChartData(paramsObj)
+ .subscribe((data) => {
+ this.alarmChartData = {
+ series: [
+ { data: data.CPU },
+ { data: data.CPU },
+ { data: data.Memory }
+ ]
+ }
+ }, (err) => {
+ console.log(err);
+ })
+ }
//Line chart
alarmShow = false;
- alarmChartData:Object;
- alarmChartInit:Object = {
- height:380,
- option:{
+ alarmChartData: Object;
+ alarmChartInit: Object = {
+ height: 380,
+ option: {
legend: {
bottom: '0px',
data: ['All', 'Active', 'Closed']
},
+ tooltip: {
+ trigger: 'axis',
+ },
dataZoom: [
{
type: 'slider',
@@ -124,91 +204,78 @@ export class AlarmComponent implements OnInit {
height: 10,
end: 40
}
- ],
+ ],
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,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"
- },
- lineStyle: {
- width: 1,
- opacity: 0.5
- }
+ 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, 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"
+ },
+ 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,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"
- },
- 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, 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"
+ },
+ 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,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"
- },
- 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, 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"
+ },
+ lineStyle: {
+ width: 1,
+ opacity: 0.5
+ }
}
]
}
};
- getAlarmChartData(){
- let paramsObj = {
- alarmSourceName:this.sourceNameSelected
- }
- this.myhttp.getHomePerformanceChartData(paramsObj)
- .subscribe((data)=>{
- this.alarmChartData = {
- series:[
- {data:data.CPU},
- {data:data.CPU},
- {data:data.Memory}
- ]
- }
- },(err)=>{
- console.log(err);
- })
- }
+
//Detail page title display
detailshow = false;
// Show hidden animation
state = "show";
state2 = "hide";
- detailShow() {
+ detailId: number;
+ detailShow(item) {
this.state = 'hide';
this.state2 = 'show';
this.detailshow = true;
+ // console.log(item);
+ this.detailId = item.eventId;
}
detailHide() {
this.state = 'show';
@@ -216,22 +283,4 @@ export class AlarmComponent implements OnInit {
this.detailshow = false;
}
-
-
- getSelects:Object = {
- countAll:0,
- countClose:0,
- countActive:0,
- eventNameList:[],
- sourceIdList:[],
- reportingEntityNameList:[],
- sourceNameList:[],
-};
- // 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');
- // })
- // }
-
}
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;
diff --git a/usecaseui-portal/src/app/myhttp.service.ts b/usecaseui-portal/src/app/myhttp.service.ts
index 5cdc67f6..53a25cec 100644
--- a/usecaseui-portal/src/app/myhttp.service.ts
+++ b/usecaseui-portal/src/app/myhttp.service.ts
@@ -1,3 +1,18 @@
+/*
+ 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 { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
@@ -84,9 +99,6 @@ export class MyhttpService {
pnfDetail:this.baseUrl + "/uui-sotn/getPnfInfo/",
connectivity:this.baseUrl + "/uui-sotn/getConnectivityInfo/",
vpnBinding:this.baseUrl + "/uui-sotn/getPinterfaceByVpnId/",
- alarmFormData:this.baseUrl + "/alarm/{currentPage}/{pageSize}/{sourceName}/{priority}/{startTime}/{endTime}/{vfStatus}",
- alarmFormDetailData:this.baseUrl + "/alarm/getAlarmsHeaderDetail/{id}",
- alarmsourcename:'/alarm/getSourceNames/'
}
// home
@@ -280,49 +292,20 @@ export class MyhttpService {
return formattime;
}
- // Alarm table data
- // getAlarmFormData(currentPage:number,pageSize:number,sourceName?:string,priority?:string,startTime?:string,endTime?:string,vfStatus?:string){
- // return this.http.post<any>(this.url.alarmFormData,{
- // currentPage:currentPage,
- // pageSize:pageSize,
- // sourceName:sourceName,
- // priority:priority,
- // startTime:startTime,
- // endTime:endTime ,
- // vfStatus:vfStatus
- // });
- // }
+ getAlarmFormData(currentPage:number,pageSize:number,sourceName?:string,priority?:string,startTime?:string,endTime?:string,vfStatus?:string){
+ return this.http.get<any>('/api/usecaseui-server/v1/alarm/'+'/'+currentPage+'/'+pageSize+'/'+sourceName+'/'+priority+'/'+startTime+'/'+endTime+'/'+vfStatus);
+ }
getSourceNames(){
- return this.http.get<any>('http://192.168.43.12:8082/alarm/getSourceNames/');
+ return this.http.get<any>('/api/usecaseui-server/v1/alarm/getSourceNames/');
}
getstatuscount(){
- let httpurl = 'http://192.168.43.12:8082/alarm/statusCount';
+ let httpurl = '/api/usecaseui-server/v1/alarm/statusCount';
return this.http.get<any>(httpurl);
}
- // getSourceNames(){
- // let httpurl = this.baseUrl + "/SourceName.json?";
- // console.log(httpurl);
- // return this.http.get<any>(httpurl);
- // }
-
- // getAlarmFormData(currentPage:number,pageSize:number,sourceName?:string,priority?:string,startTime?:string,endTime?:string,vfStatus?:string){
- // return this.http.get<any>(this.url.alarmFormData+'?currentPage='+currentPage+'?pageSize='+pageSize+'?sourceName='+sourceName+'?priority='+priority+'?startTime='+startTime+'?endTime='+endTime+'?vfStatus='+vfStatus);
- // }
-
- getAlarmFormData(currentPage:number,pageSize:number,sourceName?:string,priority?:string,startTime?:string,endTime?:string,vfStatus?:string){
- return this.http.get<any>('http://192.168.43.12:8082/alarm/'+'/'+currentPage+'/'+pageSize+'/'+sourceName+'/'+priority+'/'+startTime+'/'+endTime+'/'+vfStatus);
- }
-
- // Alarm Detail page data
- // getAlarmDetailData(id){
- // let httpurl = this.baseUrl + "/alarmFormDetailData.json?id/" +id;
- // console.log(httpurl)
- // return this.http.get<any>(httpurl);
- // }
getAlarmDetailData(id){
- let httpurl = 'http://192.168.43.12:8082/alarm/getAlarmsHeaderDetail/'+id;
+ let httpurl = '/api/usecaseui-server/v1/alarm/getAlarmsHeaderDetail/'+id;
console.log(httpurl)
return this.http.get<any>(httpurl);
}