From cd5aba0c5d0a734653a2cb6f09dc81898cc8ae1e Mon Sep 17 00:00:00 2001 From: akeela_azhar Date: Thu, 22 Jun 2023 14:21:04 +0530 Subject: [PATCH] Update delete device with a print message --- .../api/jaxrs/service/impl/DeviceManagementServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java index 41399829e0..0f6860cfc5 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -156,7 +156,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { String range = "Sheet1!A:D"; // Prepare the values to be written - List rowValues = Arrays.asList(startTime, endTime, responseTime); + List rowValues = Arrays.asList(startTime, endTime, responseTime, message); List> values = Collections.singletonList(rowValues); // Build the value range object @@ -482,11 +482,12 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { return Response.status(Response.Status.NOT_FOUND).build(); } boolean response = deviceManagementProviderService.disenrollDevice(deviceIdentifier); + String message = "Delete Device"; long endTime = System.currentTimeMillis(); //end measuring API call response time long responseTime = endTime - startTime; // save the start time, end time and response time to google sheet - saveResponseTimeToSpreadsheet(startTime, endTime, responseTime, "Delete Device"); + saveResponseTimeToSpreadsheet(startTime, endTime, responseTime, message); return Response.status(Response.Status.OK).entity(response).build(); } catch (DeviceManagementException e) { String msg = "Error encountered while deleting requested device of type : " + deviceType;