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 --- .../maintenanceApp/src/services/maintenenceService.ts | 8 ++++---- sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js | 18 +++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'sdnr/wt/odlux/apps/maintenanceApp') diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts b/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts index daa6082d7..613b4786d 100644 --- a/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts +++ b/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts @@ -34,7 +34,7 @@ class MaintenenceService { * Adds or updates one maintenence entry to the backend. */ public async writeMaintenenceEntry(maintenenceEntry: MaintenenceEntry): Promise { - const path = `/restconf/operations/data-provider:create-maintenance`; + const path = `/rests/operations/data-provider:create-maintenance`; const query = { "id": maintenenceEntry._id, @@ -45,7 +45,7 @@ class MaintenenceService { "start": convertToISODateString(maintenenceEntry.start) }; - const result = await requestRest(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ input: query }, replaceUpperCase)) }); + const result = await requestRest(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ "data-provider:input": query }, replaceUpperCase)) }); return result || null; } @@ -53,7 +53,7 @@ class MaintenenceService { * Deletes one maintenence entry by its mountId from the backend. */ public async deleteMaintenenceEntry(maintenenceEntry: MaintenenceEntry): Promise<(DeleteResponse) | null> { - const path = `/restconf/operations/data-provider:delete-maintenance`; + const path = `/rests/operations/data-provider:delete-maintenance`; const query = { "id": maintenenceEntry._id, @@ -63,7 +63,7 @@ class MaintenenceService { "end": convertToISODateString(maintenenceEntry.end), "start": convertToISODateString(maintenenceEntry.start) }; - const result = await requestRest(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ input: query }, replaceUpperCase)) }); + const result = await requestRest(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ "data-provider:input": query }, replaceUpperCase)) }); return result || null; } } diff --git a/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js b/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js index 33a3bed73..eb6f785f3 100644 --- a/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js +++ b/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js @@ -125,25 +125,29 @@ module.exports = (env) => { stats: { colors: true }, - proxy: { + proxy: { "/oauth2/": { - target: "http://localhost:48181", + target: "http://10.20.6.29:48181", secure: false }, "/database/": { - target: "http://localhost:48181", + target: "http://10.20.6.29:48181", secure: false }, "/restconf/": { - target: "http://localhost:48181", + target: "http://10.20.6.29:48181", + secure: false + }, + "/rests/": { + target: "http://10.20.6.29:48181", secure: false }, "/help/": { - target: "http://localhost:48181", + target: "http://10.20.6.29:48181", secure: false }, - "/websocket/": { - target: "http://localhost:48181", + "/websocket": { + target: "http://10.20.6.29:48181", ws: true, changeOrigin: true, secure: false -- cgit 1.2.3-korg