Fixed directives.

This commit is contained in:
Alexander Zobnin
2016-03-16 21:41:19 +03:00
parent 816870136c
commit 17e8529127
3 changed files with 20 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
import _ from 'lodash'; import _ from 'lodash';
import * as dateMath from 'app/core/utils/datemath'; import * as dateMath from 'app/core/utils/datemath';
import * as utils from './utils'; import * as utils from './utils';
import metricFunctions from './metricFunctions'; import * as metricFunctions from './metricFunctions';
import './zabbixAPI.service.js'; import './zabbixAPI.service.js';
import './zabbixCache.service.js'; import './zabbixCache.service.js';
import './queryProcessor.service.js'; import './queryProcessor.service.js';

View File

@@ -189,8 +189,7 @@ class FuncInstance {
} }
} }
export default { export function createFuncInstance(funcDef, params) {
createFuncInstance: function(funcDef, params) {
if (_.isString(funcDef)) { if (_.isString(funcDef)) {
if (!index[funcDef]) { if (!index[funcDef]) {
throw { message: 'Method not found ' + name }; throw { message: 'Method not found ' + name };
@@ -198,13 +197,12 @@ export default {
funcDef = index[funcDef]; funcDef = index[funcDef];
} }
return new FuncInstance(funcDef, params); return new FuncInstance(funcDef, params);
}, }
getFuncDef: function(name) { export function getFuncDef(name) {
return index[name]; return index[name];
}, }
getCategories: function() { export function getCategories() {
return categories; return categories;
} }
};

View File

@@ -1,7 +1,10 @@
import {QueryCtrl} from 'app/plugins/sdk'; import {QueryCtrl} from 'app/plugins/sdk';
import _ from 'lodash'; import _ from 'lodash';
import * as utils from './utils'; import * as utils from './utils';
import metricFunctions from './metricFunctions'; import * as metricFunctions from './metricFunctions';
import './add-metric-function.directive';
import './metric-function-editor.directive';
export class ZabbixQueryController extends QueryCtrl { export class ZabbixQueryController extends QueryCtrl {