diff --git a/src/datasource-zabbix/add-metric-function.directive.js b/src/datasource-zabbix/add-metric-function.directive.js index 795a254..64c2c41 100644 --- a/src/datasource-zabbix/add-metric-function.directive.js +++ b/src/datasource-zabbix/add-metric-function.directive.js @@ -66,7 +66,7 @@ angular }); $input.blur(function() { - // clicking the function dropdown menu wont + // clicking the function dropdown menu won't // work if you remove class at once setTimeout(function() { $input.val(''); diff --git a/src/datasource-zabbix/dataProcessor.js b/src/datasource-zabbix/dataProcessor.js index 1c5942e..4ff8c9e 100644 --- a/src/datasource-zabbix/dataProcessor.js +++ b/src/datasource-zabbix/dataProcessor.js @@ -19,7 +19,7 @@ let AVERAGE = ts.AVERAGE; let MIN = ts.MIN; let MAX = ts.MAX; let MEDIAN = ts.MEDIAN; -let PERCENTIL = ts.PERCENTIL; +let PERCENTILE = ts.PERCENTILE; function limit(order, n, orderByFunc, timeseries) { let orderByCallback = aggregationFunctions[orderByFunc]; @@ -121,9 +121,9 @@ function aggregateWrapper(groupByCallback, interval, datapoints) { return groupBy(sortedPoints, interval, groupByCallback); } -function percentil(interval, n, datapoints) { +function percentile(interval, n, datapoints) { var flattenedPoints = ts.flattenDatapoints(datapoints); - var groupByCallback = _.partial(PERCENTIL, n); + var groupByCallback = _.partial(PERCENTILE, n); return groupBy(flattenedPoints, interval, groupByCallback); } @@ -155,7 +155,7 @@ let metricFunctions = { transformNull: transformNull, aggregateBy: aggregateByWrapper, // Predefined aggs - percentil: percentil, + percentile: percentile, average: _.partial(aggregateWrapper, AVERAGE), min: _.partial(aggregateWrapper, MIN), max: _.partial(aggregateWrapper, MAX), diff --git a/src/datasource-zabbix/partials/config.html b/src/datasource-zabbix/partials/config.html index 1e9f682..0bd3a3e 100644 --- a/src/datasource-zabbix/partials/config.html +++ b/src/datasource-zabbix/partials/config.html @@ -99,7 +99,7 @@ In order to use this feature it should be created and configured first. Zabbix plugin uses this data source for querying history data directly from the database. This way usually faster than pulling data from Zabbix API, especially on the wide time ranges, and reduces - amount of data transfered. + amount of data transferred.
diff --git a/src/datasource-zabbix/timeseries.js b/src/datasource-zabbix/timeseries.js index 1e23114..de20b4a 100644 --- a/src/datasource-zabbix/timeseries.js +++ b/src/datasource-zabbix/timeseries.js @@ -333,7 +333,7 @@ function expMovingAverage(datapoints, n) { return ema; } -function PERCENTIL(n, values) { +function PERCENTILE(n, values) { var sorted = _.sortBy(values); return sorted[Math.floor(sorted.length * n / 100)]; } @@ -509,7 +509,7 @@ const exportedFunctions = { MIN, MAX, MEDIAN, - PERCENTIL, + PERCENTILE, sortByTime, flattenDatapoints, };