Fixed linter warnings.

This commit is contained in:
Alexander Zobnin
2016-09-27 20:28:18 +03:00
parent e10b831a91
commit 65308375f4
5 changed files with 4 additions and 17 deletions

View File

@@ -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) { function formatMetric(metricObj) {
return { return {
text: metricObj.name, text: metricObj.name,
@@ -457,7 +450,7 @@ function formatMetric(metricObj) {
* template variables, for example * template variables, for example
* /CPU $cpu_item.*time/ where $cpu_item is system,user,iowait * /CPU $cpu_item.*time/ where $cpu_item is system,user,iowait
*/ */
function zabbixTemplateFormat(value, variable) { function zabbixTemplateFormat(value) {
if (typeof value === 'string') { if (typeof value === 'string') {
return utils.escapeRegex(value); return utils.escapeRegex(value);
} }
@@ -466,7 +459,8 @@ function zabbixTemplateFormat(value, variable) {
return '(' + escapedValues.join('|') + ')'; 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: * and wrap with '/' for proper multi-value work. Example:
* $variable selected as a, b, c * $variable selected as a, b, c
* We use filter $variable * We use filter $variable

View File

@@ -1,4 +1,5 @@
import {QueryCtrl} from 'app/plugins/sdk'; import {QueryCtrl} from 'app/plugins/sdk';
import angular from 'angular';
import _ from 'lodash'; import _ from 'lodash';
import * as utils from './utils'; import * as utils from './utils';
import * as metricFunctions from './metricFunctions'; import * as metricFunctions from './metricFunctions';

View File

@@ -335,12 +335,6 @@ function getByFilter(list, filter) {
} }
} }
function getFromIndex(index, objids) {
return _.map(objids, function(id) {
return index[id];
});
}
function convertHistoryPoint(point) { function convertHistoryPoint(point) {
// Value must be a number for properly work // Value must be a number for properly work
return [ return [

View File

@@ -1,7 +1,6 @@
import _ from 'lodash'; import _ from 'lodash';
import moment from 'moment'; import moment from 'moment';
/** /**
* Expand Zabbix item name * Expand Zabbix item name
* *

View File

@@ -1,6 +1,5 @@
import angular from 'angular'; import angular from 'angular';
import _ from 'lodash'; import _ from 'lodash';
import * as utils from './utils';
// Use factory() instead service() for multiple datasources support. // Use factory() instead service() for multiple datasources support.
// Each datasource instance must initialize its own cache. // Each datasource instance must initialize its own cache.