summaryrefslogtreecommitdiffstats
path: root/gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js
diff options
context:
space:
mode:
authorHenry.Sun <henry.a.sun@est.tech>2020-03-24 15:16:46 +0800
committerHenry.Sun <henry.a.sun@est.tech>2020-03-25 12:48:02 +0800
commitfd5306f16f1e1f1bd07c706f073d57a700eff603 (patch)
tree81cc348197a2014422bc9fc54d2477e3368ddf84 /gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js
parentf9e85b70f97c139911466336f29fb365de53306c (diff)
add coverage test for JS
Issue-ID: POLICY-2311 Change-Id: I12a041f59bf07ed4e8688545522e64a338cdb326 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
Diffstat (limited to 'gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js')
-rw-r--r--gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js b/gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js
index 4ba8703..f130617 100644
--- a/gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js
+++ b/gui-pdp-monitoring/src/webapp/js/PdpEngineWorkerStatus.js
@@ -121,7 +121,8 @@ function setEngineStatusData(engineStatusData, changed) {
var lastPolicyDurationDiv = document.createElement("div");
lastPolicyDurationDiv.setAttribute("id", chartConfig.parent);
lastPolicyDurationDiv.setAttribute("class", "papChart");
- createChart(JSON.parse(engineStatusData[esd].lastPolicyDuration), lastPolicyDurationDiv,
+
+ createChart(engineStatusData[esd].lastPolicyDuration, lastPolicyDurationDiv,
chartConfig.title, chartConfig.unit, chartConfig.lineStroke, chartConfig.nodeColour);
$(chartWrapper).append(lastPolicyDurationDiv);
}
@@ -136,7 +137,7 @@ function setEngineStatusData(engineStatusData, changed) {
var averagePolicyDurationDiv = document.createElement("div");
averagePolicyDurationDiv.setAttribute("id", chartConfig.parent);
averagePolicyDurationDiv.setAttribute("class", "papChart");
- createChart(JSON.parse(engineStatusData[esd].averagePolicyDuration), averagePolicyDurationDiv,
+ createChart(engineStatusData[esd].averagePolicyDuration, averagePolicyDurationDiv,
chartConfig.title, chartConfig.unit, chartConfig.lineStroke, chartConfig.nodeColour);
$(chartWrapper).append(averagePolicyDurationDiv);
}