From 15e2d3a29b0d1a304965e34f114a911e5a7abdb3 Mon Sep 17 00:00:00 2001 From: sai-neetha Date: Mon, 20 Mar 2023 08:05:47 +0100 Subject: Odlux Update Add eslint and custom icons update Issue-ID: CCSDK-3871 Signed-off-by: sai-neetha Change-Id: If6b676128cc9cff0437a5dc54f85eaafd3b8c586 Signed-off-by: highstreetherbert --- .../src/services/maintenenceService.ts | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'sdnr/wt/odlux/apps/maintenanceApp/src/services') diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts b/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts index 613b4786d..5fdccc349 100644 --- a/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts +++ b/sdnr/wt/odlux/apps/maintenanceApp/src/services/maintenenceService.ts @@ -15,15 +15,15 @@ * the License. * ============LICENSE_END========================================================================== */ +import { DeleteResponse, PostResponse } from '../../../../framework/src/models/elasticSearch'; import { requestRest } from '../../../../framework/src/services/restService'; -import { Result, HitEntry, PostResponse, DeleteResponse } from '../../../../framework/src/models/elasticSearch'; - -import { MaintenenceEntry } from '../models/maintenenceEntryType'; -import { convertToLocaleString, convertToGMTString, convertToISODateString } from '../utils/timeUtils'; import { convertPropertyNames, replaceUpperCase } from '../../../../framework/src/utilities/yangHelper'; +import { MaintenanceEntry } from '../models/maintenanceEntryType'; + +import { convertToISODateString } from '../utils/timeUtils'; -export const maintenenceEntryDatabasePath = "mwtn/maintenancemode"; +export const maintenenceEntryDatabasePath = 'mwtn/maintenancemode'; /** * Represents a web api accessor service for all maintenence entries related actions. @@ -33,37 +33,37 @@ class MaintenenceService { /** * Adds or updates one maintenence entry to the backend. */ - public async writeMaintenenceEntry(maintenenceEntry: MaintenenceEntry): Promise { - const path = `/rests/operations/data-provider:create-maintenance`; + public async writeMaintenenceEntry(maintenenceEntry: MaintenanceEntry): Promise { + const path = '/rests/operations/data-provider:create-maintenance'; const query = { - "id": maintenenceEntry._id, - "node-id": maintenenceEntry.nodeId, - "active": maintenenceEntry.active, - "description": maintenenceEntry.description, - "end": convertToISODateString(maintenenceEntry.end), - "start": convertToISODateString(maintenenceEntry.start) + 'id': maintenenceEntry.mId, + 'node-id': maintenenceEntry.nodeId, + 'active': maintenenceEntry.active, + 'description': maintenenceEntry.description, + 'end': convertToISODateString(maintenenceEntry.end), + 'start': convertToISODateString(maintenenceEntry.start), }; - const result = await requestRest(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ "data-provider:input": query }, replaceUpperCase)) }); + const result = await requestRest(path, { method: 'POST', body: JSON.stringify(convertPropertyNames({ 'data-provider:input': query }, replaceUpperCase)) }); return result || null; } /** * Deletes one maintenence entry by its mountId from the backend. */ - public async deleteMaintenenceEntry(maintenenceEntry: MaintenenceEntry): Promise<(DeleteResponse) | null> { - const path = `/rests/operations/data-provider:delete-maintenance`; + public async deleteMaintenenceEntry(maintenenceEntry: MaintenanceEntry): Promise<(DeleteResponse) | null> { + const path = '/rests/operations/data-provider:delete-maintenance'; const query = { - "id": maintenenceEntry._id, - "node-id": maintenenceEntry.nodeId, - "active": maintenenceEntry.active, - "description": maintenenceEntry.description, - "end": convertToISODateString(maintenenceEntry.end), - "start": convertToISODateString(maintenenceEntry.start) + 'id': maintenenceEntry.mId, + 'node-id': maintenenceEntry.nodeId, + 'active': maintenenceEntry.active, + 'description': maintenenceEntry.description, + 'end': convertToISODateString(maintenenceEntry.end), + 'start': convertToISODateString(maintenenceEntry.start), }; - const result = await requestRest(path, { method: "POST", body: JSON.stringify(convertPropertyNames({ "data-provider:input": query }, replaceUpperCase)) }); + const result = await requestRest(path, { method: 'POST', body: JSON.stringify(convertPropertyNames({ 'data-provider:input': query }, replaceUpperCase)) }); return result || null; } } -- cgit 1.2.3-korg