diff options
author | 2020-08-12 14:57:21 +0000 | |
---|---|---|
committer | 2020-08-12 14:57:21 +0000 | |
commit | 057a0db19bacdd7d963cad39be1163139e7128e2 (patch) | |
tree | 09174e29404680aaf07784695f151224bdeedcda /sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts | |
parent | 55d8703366e8e02d97e71b2e1350cb746cee8ff6 (diff) | |
parent | 3d02271058d2e59a71e49afdd866462f7b6ab1c6 (diff) |
Merge "Switch odlux from Biermann-RestConf to RFC8040 interface"
Diffstat (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts | 18 |
1 files changed, 9 insertions, 9 deletions
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<Result<string>>(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<Result<string>>(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<Result<string>>(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; } |