summaryrefslogtreecommitdiffstats
path: root/gui-pdp-monitoring
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-02-22 13:45:44 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-22 13:45:44 +0000
commit0900b6c7df91ff9ee854925795858f9ee68a0cff (patch)
tree797f2f90f7e00020d7d1fd5dc9319b131b326054 /gui-pdp-monitoring
parent13a50bb9b035c6408019ef58297009f7e3fe2779 (diff)
parentea60839df48549a7c07c0289169bb26209417d47 (diff)
Merge "Refactor Policy-Gui to use Instant from Date"
Diffstat (limited to 'gui-pdp-monitoring')
-rw-r--r--gui-pdp-monitoring/src/main/java/org/onap/policy/gui/pdp/monitoring/rest/PdpMonitoringRestResource.java6
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) {