From 16ea8b7de7d7a51d05c1890144f1799c7e41f8c7 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Wed, 4 Sep 2019 17:54:23 +0800 Subject: feat:optimize the mock api of the home page Change-Id: Ie569f729e23e232446fd3b8db05c41189c088d24 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber --- usecaseui-portal/src/app/core/models/dataInterface.ts | 1 - usecaseui-portal/src/app/core/services/homes.service.ts | 16 +++------------- usecaseui-portal/src/app/mock/routes.js | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) (limited to 'usecaseui-portal/src/app') diff --git a/usecaseui-portal/src/app/core/models/dataInterface.ts b/usecaseui-portal/src/app/core/models/dataInterface.ts index e092bd03..012b23e6 100644 --- a/usecaseui-portal/src/app/core/models/dataInterface.ts +++ b/usecaseui-portal/src/app/core/models/dataInterface.ts @@ -1,6 +1,5 @@ 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 { diff --git a/usecaseui-portal/src/app/core/services/homes.service.ts b/usecaseui-portal/src/app/core/services/homes.service.ts index 218756d4..321642db 100644 --- a/usecaseui-portal/src/app/core/services/homes.service.ts +++ b/usecaseui-portal/src/app/core/services/homes.service.ts @@ -23,16 +23,13 @@ export class HomesService { constructor(private http: HttpClient) { } baseUrl = baseUrl.baseUrl; - baseUrlbar = baseUrl.baseUrl + "/uui-lcm/"; url = { home_serviceData: this.baseUrl + "/uui-lcm/serviceNumByCustomer", - home_performanceData: this.baseUrl + "/performance/queryAllSourceNames", home_alarmData: this.baseUrl + "/alarm/statusCount", home_alarmChartData: this.baseUrl + "/alarm/diagram", - home_servicebarData: this.baseUrl + "", - home_servicebarnsData: this.baseUrlbar + "ns-packages", - home_servicebarvnfData: this.baseUrlbar + "vnf-packages", - home_servicebarpnfData: this.baseUrlbar + "pnf-packages", + home_servicebarnsData: this.baseUrl + "/uui-lcm/ns-packages", + home_servicebarvnfData: this.baseUrl + "/uui-lcm/vnf-packages", + home_servicebarpnfData: this.baseUrl + "/uui-lcm/pnf-packages", sourceNames: this.baseUrl + "/alarm/getSourceNames", listSortMasters: this.baseUrl + "/listSortMasters", currentLanguage: "/api/portal-auxapi/languageSetting/user/", @@ -42,9 +39,6 @@ export class HomesService { getHomeServiceData() { return this.http.get(this.url.home_serviceData); } - getHomePerformanceData() { - return this.http.get(this.url.home_performanceData); - } getHomeAlarmData() { return this.http.get(this.url.home_alarmData); } @@ -52,10 +46,6 @@ export class HomesService { let params = new HttpParams({ fromObject: paramsObj }); return this.http.get(this.url.home_alarmChartData, { params }); } - - getHomeServiceBarData() { - return this.http.get(this.url.home_servicebarData); - } getHomeServiceBarNsData() { return this.http.get(this.url.home_servicebarnsData); } diff --git a/usecaseui-portal/src/app/mock/routes.js b/usecaseui-portal/src/app/mock/routes.js index 8d4485b8..9561436e 100644 --- a/usecaseui-portal/src/app/mock/routes.js +++ b/usecaseui-portal/src/app/mock/routes.js @@ -26,7 +26,7 @@ module.exports = /////////////// ///////<-------------home services--------->///// - "/usecaseui-server/v1/alarm/getSourceNames/": "/alarm_getSourceNames", + "/usecaseui-server/v1/alarm/getSourceNames": "/alarm_getSourceNames", "/portal-auxapi/languageSetting/user/:currentloginId": "/language", ///////////////////////// -- cgit 1.2.3-korg