From 3d02271058d2e59a71e49afdd866462f7b6ab1c6 Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Wed, 12 Aug 2020 12:28:06 +0200 Subject: Switch odlux from Biermann-RestConf to RFC8040 interface Switched rest-calls in odlux to use RFC8040 interface Issue-ID: CCSDK-2565 Signed-off-by: Aijana Schumann Change-Id: Ia59dd02bc6456bad648083146c0256f204e134d1 --- .../src/services/performanceHistoryService.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src') diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts b/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts index 685859850..70a8771b7 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts @@ -47,13 +47,13 @@ class PerformanceService { if (selectedTimePeriod === "15min") { - path = '/restconf/operations/data-provider:read-pmdata-15m-ltp-list'; + path = '/rests/operations/data-provider:read-pmdata-15m-ltp-list'; } else { - path = '/restconf/operations/data-provider:read-pmdata-24h-ltp-list'; + path = '/rests/operations/data-provider:read-pmdata-24h-ltp-list'; } const result = await requestRest>(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ input: query }, replaceUpperCase)) }); - return result && result.output && result.output.data && result.output.data.map(ne => ({ key: ne })) || null; + return result && result["data-provider:output"] && result["data-provider:output"].data && result["data-provider:output"].data.map(ne => ({ key: ne })) || null; } @@ -62,9 +62,9 @@ class PerformanceService { * Gets all devices from the performanceHistory 15min backend. */ public async getDeviceListfromPerf15minHistory(): Promise<(DeviceListType)[] | null> { - const path = '/restconf/operations/data-provider:read-pmdata-15m-device-list'; + const path = '/rests/operations/data-provider:read-pmdata-15m-device-list'; const query = { - "input": { + "data-provider:input": { "filter": [], "sortorder": [], "pagination": { @@ -75,7 +75,7 @@ class PerformanceService { }; const result = await requestRest>(path, { method: "POST", body: JSON.stringify(query) }); - return result && result.output && result.output.data && result.output.data.map(ne => ({ + return result && result["data-provider:output"] && result["data-provider:output"].data && result["data-provider:output"].data.map(ne => ({ nodeId: ne })) || null; } @@ -84,9 +84,9 @@ class PerformanceService { * Gets all devices from the performanceHistory 24h backend. */ public async getDeviceListfromPerf24hHistory(): Promise<(DeviceListType)[] | null> { - const path = '/restconf/operations/data-provider:read-pmdata-24h-device-list'; + const path = '/rests/operations/data-provider:read-pmdata-24h-device-list'; const query = { - "input": { + "data-provider:input": { "filter": [], "sortorder": [], "pagination": { @@ -97,7 +97,7 @@ class PerformanceService { }; const result = await requestRest>(path, { method: "POST", body: JSON.stringify(query) }); - return result && result.output && result.output.data && result.output.data.map(ne => ({ + return result && result["data-provider:output"] && result["data-provider:output"].data && result["data-provider:output"].data.map(ne => ({ nodeId: ne })) || null; } -- cgit 1.2.3-korg