Fixed linter warnings.
This commit is contained in:
@@ -433,13 +433,6 @@ function bindFunctionDefs(functionDefs, category) {
|
||||
});
|
||||
}
|
||||
|
||||
function filterFunctionDefs(funcs, category) {
|
||||
let filteredFuncs = _.map(metricFunctions.getCategories()[category]);
|
||||
return _.filter(funcs, func => {
|
||||
return _.includes(filteredFuncs, func.def.name);
|
||||
});
|
||||
}
|
||||
|
||||
function formatMetric(metricObj) {
|
||||
return {
|
||||
text: metricObj.name,
|
||||
@@ -457,7 +450,7 @@ function formatMetric(metricObj) {
|
||||
* template variables, for example
|
||||
* /CPU $cpu_item.*time/ where $cpu_item is system,user,iowait
|
||||
*/
|
||||
function zabbixTemplateFormat(value, variable) {
|
||||
function zabbixTemplateFormat(value) {
|
||||
if (typeof value === 'string') {
|
||||
return utils.escapeRegex(value);
|
||||
}
|
||||
@@ -466,7 +459,8 @@ function zabbixTemplateFormat(value, variable) {
|
||||
return '(' + escapedValues.join('|') + ')';
|
||||
}
|
||||
|
||||
/** If template variables are used in request, replace it using regex format
|
||||
/**
|
||||
* If template variables are used in request, replace it using regex format
|
||||
* and wrap with '/' for proper multi-value work. Example:
|
||||
* $variable selected as a, b, c
|
||||
* We use filter $variable
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {QueryCtrl} from 'app/plugins/sdk';
|
||||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import * as utils from './utils';
|
||||
import * as metricFunctions from './metricFunctions';
|
||||
|
||||
@@ -335,12 +335,6 @@ function getByFilter(list, filter) {
|
||||
}
|
||||
}
|
||||
|
||||
function getFromIndex(index, objids) {
|
||||
return _.map(objids, function(id) {
|
||||
return index[id];
|
||||
});
|
||||
}
|
||||
|
||||
function convertHistoryPoint(point) {
|
||||
// Value must be a number for properly work
|
||||
return [
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import moment from 'moment';
|
||||
|
||||
|
||||
/**
|
||||
* Expand Zabbix item name
|
||||
*
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import * as utils from './utils';
|
||||
|
||||
// Use factory() instead service() for multiple datasources support.
|
||||
// Each datasource instance must initialize its own cache.
|
||||
|
||||
Reference in New Issue
Block a user