summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/performanceHistoryApp
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-08-12 12:28:06 +0200
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-08-12 12:29:48 +0200
commit3d02271058d2e59a71e49afdd866462f7b6ab1c6 (patch)
treebb42b3428055136a4a8f5def9c63e412390d40ef /sdnr/wt/odlux/apps/performanceHistoryApp
parentcd29d2dd98b7c40bd4efb6a8705787ca35e99fe9 (diff)
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 <aijana.schumann@highstreet-technologies.com> Change-Id: Ia59dd02bc6456bad648083146c0256f204e134d1
Diffstat (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp')
-rw-r--r--sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.ts18
-rw-r--r--sdnr/wt/odlux/apps/performanceHistoryApp/webpack.config.js24
2 files changed, 28 insertions, 14 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;
}
diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/webpack.config.js b/sdnr/wt/odlux/apps/performanceHistoryApp/webpack.config.js
index 6579db3ec..5faf69e83 100644
--- a/sdnr/wt/odlux/apps/performanceHistoryApp/webpack.config.js
+++ b/sdnr/wt/odlux/apps/performanceHistoryApp/webpack.config.js
@@ -126,15 +126,29 @@ module.exports = (env) => {
},
proxy: {
"/oauth2/": {
- target: "http://10.20.6.29:28181",
+ target: "http://10.20.6.29:48181",
secure: false
},
- "/restconf": {
- target: "http://10.20.6.29:28181",
+ "/database/": {
+ target: "http://10.20.6.29:48181",
secure: false
},
- "/database": {
- target: "http://10.20.6.29:28181",
+ "/restconf/": {
+ target: "http://10.20.6.29:48181",
+ secure: false
+ },
+ "/rests/": {
+ target: "http://10.20.6.29:48181",
+ secure: false
+ },
+ "/help/": {
+ target: "http://10.20.6.29:48181",
+ secure: false
+ },
+ "/websocket": {
+ target: "http://10.20.6.29:48181",
+ ws: true,
+ changeOrigin: true,
secure: false
}
}