From bd4942df4f188a4ec273a5ec95c99acb1ce6bb75 Mon Sep 17 00:00:00 2001 From: zhangab Date: Wed, 9 Jan 2019 11:41:18 +0800 Subject: Support NS Package Upload for VF-C Change-Id: Ie41e32ad556719b64b5ab66d0c488cbd65e9c83f Issue-ID: USECASEUI-156 Signed-off-by: zhangab --- usecaseui-portal/src/app/dataInterface.ts | 8 ++++++-- usecaseui-portal/src/app/homes.service.ts | 21 ++++++++++----------- usecaseui-portal/src/app/myhttp.service.ts | 8 ++------ .../src/app/networkHttpservice.service.ts | 3 ++- usecaseui-portal/src/app/onboard.service.ts | 4 ++-- 5 files changed, 22 insertions(+), 22 deletions(-) (limited to 'usecaseui-portal/src') diff --git a/usecaseui-portal/src/app/dataInterface.ts b/usecaseui-portal/src/app/dataInterface.ts index 954d6804..e092bd03 100644 --- a/usecaseui-portal/src/app/dataInterface.ts +++ b/usecaseui-portal/src/app/dataInterface.ts @@ -1,4 +1,8 @@ - +enum baseUrl{ + baseUrl = '/api/usecaseui-server/v1' //online + // baseUrl = 'http://172.19.44.223/api/usecaseui-server/v1' //local one + // baseUrl = 'http://10.73.191.100:8082' //local two +} interface homeData { services:{ number:number, @@ -50,4 +54,4 @@ interface onboardDataPNF { total:number, tableList:string[] } -export {homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF} +export {homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF , baseUrl} diff --git a/usecaseui-portal/src/app/homes.service.ts b/usecaseui-portal/src/app/homes.service.ts index cf47fd73..625c20fc 100644 --- a/usecaseui-portal/src/app/homes.service.ts +++ b/usecaseui-portal/src/app/homes.service.ts @@ -16,14 +16,13 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; -import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF } from './dataInterface'; +import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF , baseUrl} from './dataInterface'; @Injectable() export class HomesService { constructor(private http: HttpClient) { } - // baseUrl = 'http://172.19.44.223/api/usecaseui-server/v1'; - baseUrl = '/api/usecaseui-server/v1'; + baseUrl = baseUrl.baseUrl url = { home_serviceData: this.baseUrl + "/uui-lcm/serviceNumByCustomer", home_performanceData: this.baseUrl + "/performance/queryAllSourceNames", @@ -69,36 +68,36 @@ export class HomesService { // alarm data getAlarmFormData(currentPage: number, pageSize: number, sourceName?: string, priority?: string, startTime?: string, endTime?: string, vfStatus?: string) { - return this.http.get('/api/usecaseui-server/v1/alarm/' + '/' + currentPage + '/' + pageSize + '?sourceName=' + sourceName + '&priority=' + priority + '&startTime=' + startTime + '&endTime=' + endTime + '&vfStatus=' + vfStatus); + return this.http.get(this.baseUrl + '/alarm/' + '/' + currentPage + '/' + pageSize + '?sourceName=' + sourceName + '&priority=' + priority + '&startTime=' + startTime + '&endTime=' + endTime + '&vfStatus=' + vfStatus); } getSourceNames() { - return this.http.get('/api/usecaseui-server/v1/alarm/getSourceNames/'); + return this.http.get(this.baseUrl + '/alarm/getSourceNames/'); } getstatuscount() { - let httpurl = '/api/usecaseui-server/v1/alarm/statusCount'; + let httpurl = this.baseUrl + '/alarm/statusCount'; return this.http.get(httpurl); } getAlarmDetailData(id) { - let httpurl = '/api/usecaseui-server/v1/alarm/getAlarmsHeaderDetail/' + id; + let httpurl = this.baseUrl + '/alarm/getAlarmsHeaderDetail/' + id; return this.http.get(httpurl); } // performance data getqueryAllSourceNames() { - let httpurl = this.baseUrl + "/api/usecaseui-server/v1/performance/queryAllSourceNames"; + let httpurl = this.baseUrl + "/performance/queryAllSourceNames"; return this.http.get(httpurl); } getperformanceSourceNames(currentPage: number, pageSize: number, sourceName: string) { - let httpurl = this.baseUrl + "/api/usecaseui-server/v1/performanceSsourceNames" + "/" + currentPage + "/" + pageSize + "?sourceName=" + sourceName; + let httpurl = this.baseUrl + "/performanceSsourceNames" + "/" + currentPage + "/" + pageSize + "?sourceName=" + sourceName; return this.http.get(httpurl); } getPerformanceFormData(currentPage: number, pageSize: number, sourceName?: string, startTime?: string, endTime?: string) { - return this.http.get('/api/usecaseui-server/v1/performance' + '/' + currentPage + '/' + pageSize + '?sourceName=' + sourceName + '&startTime=' + startTime + '&endTime=' + endTime); + return this.http.get(this.baseUrl + '/performance' + '/' + currentPage + '/' + pageSize + '?sourceName=' + sourceName + '&startTime=' + startTime + '&endTime=' + endTime); } getPerformanceHeaderDetail(id) { - let httpurl = '/api/usecaseui-server/v1/performance/getPerformanceHeaderDetail/' + id; + let httpurl = this.baseUrl + '/performance/getPerformanceHeaderDetail/' + id; return this.http.get(httpurl); } diff --git a/usecaseui-portal/src/app/myhttp.service.ts b/usecaseui-portal/src/app/myhttp.service.ts index 59b9530d..ee6ffaca 100644 --- a/usecaseui-portal/src/app/myhttp.service.ts +++ b/usecaseui-portal/src/app/myhttp.service.ts @@ -16,17 +16,13 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; -import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF } from './dataInterface'; - - +import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF , baseUrl} from './dataInterface'; @Injectable() export class MyhttpService { constructor(private http: HttpClient) { } - // baseUrl = 'http://172.19.44.223/api/usecaseui-server/v1'; - // baseUrl = 'http://10.73.191.100:8082'; - baseUrl = '/api/usecaseui-server/v1'; + baseUrl = baseUrl.baseUrl url = { listSortMasters:this.baseUrl+"/listSortMasters", customers: this.baseUrl + "/uui-lcm/customers", diff --git a/usecaseui-portal/src/app/networkHttpservice.service.ts b/usecaseui-portal/src/app/networkHttpservice.service.ts index 652172fa..4ce04d38 100644 --- a/usecaseui-portal/src/app/networkHttpservice.service.ts +++ b/usecaseui-portal/src/app/networkHttpservice.service.ts @@ -15,6 +15,7 @@ */ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; +import { baseUrl} from './dataInterface'; @Injectable() @@ -40,7 +41,7 @@ export class networkHttpservice { // }; // baseUrl = "http://10.73.242.244:8082/uui-sotn/";//Online environment // baseUrl = "http://172.19.44.223/api/usecaseui-server/v1/uui-sotn/";//Online environment - baseUrl = "/api/usecaseui-server/v1/uui-sotn/";//Online environment + baseUrl = baseUrl.baseUrl + "/uui-sotn/";//Online environment url={ "getNetworkD3Data":this.baseUrl + "getNetWorkResources", "getLogicalLinksData":this.baseUrl + "getLogicalLinks", diff --git a/usecaseui-portal/src/app/onboard.service.ts b/usecaseui-portal/src/app/onboard.service.ts index 6ab1e282..a248f531 100644 --- a/usecaseui-portal/src/app/onboard.service.ts +++ b/usecaseui-portal/src/app/onboard.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; -import { onboardTableData, onboardDataVNF, onboardDataPNF } from './dataInterface'; +import { onboardTableData, onboardDataVNF, onboardDataPNF , baseUrl} from './dataInterface'; @Injectable() export class onboardService { @@ -49,7 +49,7 @@ export class onboardService { //--------------------------------------------------------------------------------------- /* line up 线上*/ - baseUrl = "/api/usecaseui-server/v1/uui-lcm/"; + baseUrl = baseUrl.baseUrl + "/uui-lcm/"; url = { // 数据列表Data onboardTableData: this.baseUrl + "ns-packages", -- cgit 1.2.3-korg