diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2021-02-17 18:17:01 +0000 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-02-19 20:15:48 +0000 |
commit | ea60839df48549a7c07c0289169bb26209417d47 (patch) | |
tree | f2b00f8c0ce47c64649c213dda04924cce91cf1f | |
parent | b3982731bc994a0de656e36905ae42ea5246595d (diff) |
Refactor Policy-Gui to use Instant from Date
Issue-ID: POLICY-3069
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: Ie91e60667707df110c53b65fdac8918acb07f6e1
-rw-r--r-- | gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/rest/PdpMonitoringRestResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/rest/PdpMonitoringRestResource.java b/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/rest/PdpMonitoringRestResource.java index 921c68c..bb11c26 100644 --- a/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/rest/PdpMonitoringRestResource.java +++ b/gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/rest/PdpMonitoringRestResource.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix Foundation. + * Copyright (C) 2020-2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -177,11 +177,11 @@ public class PdpMonitoringRestResource { engineStatusObject.setPolicyExecutions(engineStats.getEventCount()); engineStatusObject.setLastPolicyDuration(gson.toJson( getValuesFromCache(id, engineStats.getEngineId() + "_last_policy_duration", - pdpStatistics.getTimeStamp().getTime(), engineStats.getLastExecutionTime()), + pdpStatistics.getTimeStamp().getEpochSecond(), engineStats.getLastExecutionTime()), List.class)); engineStatusObject.setAveragePolicyDuration( gson.toJson(getValuesFromCache(id, engineStats.getEngineId() + "_average_policy_duration", - pdpStatistics.getTimeStamp().getTime(), + pdpStatistics.getTimeStamp().getEpochSecond(), (long) engineStats.getAverageExecutionTime()), List.class)); engineStatusList.add(engineStatusObject); } catch (final RuntimeException e) { |