Support ms resolution.

Patch from Jay Dawes <ajaxous@gmail.com>
This commit is contained in:
Alexander Zobnin
2017-03-26 19:20:18 +03:00
parent 9162210fc7
commit 682be45901
17 changed files with 100 additions and 25 deletions

View File

@@ -80,7 +80,7 @@ function handleSLAResponse(itservice, slaProperty, slaObject) {
function convertHistoryPoint(point) {
// Value must be a number for properly work
return [Number(point.value), point.clock * 1000];
return [Number(point.value), point.clock * 1000 + Math.round(point.ns / 1000000)];
}
function convertTrendPoint(valueType, point) {
@@ -95,6 +95,12 @@ function convertTrendPoint(valueType, point) {
case "avg":
value = point.value_avg;
break;
case "sum":
value = point.value_sum;
break;
case "count":
value = point.value_count;
break;
default:
value = point.value_avg;
}