Fixed directives.
This commit is contained in:
@@ -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';
|
||||||
|
|||||||
@@ -189,22 +189,20 @@ 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 };
|
|
||||||
}
|
|
||||||
funcDef = index[funcDef];
|
|
||||||
}
|
}
|
||||||
return new FuncInstance(funcDef, params);
|
funcDef = index[funcDef];
|
||||||
},
|
|
||||||
|
|
||||||
getFuncDef: function(name) {
|
|
||||||
return index[name];
|
|
||||||
},
|
|
||||||
|
|
||||||
getCategories: function() {
|
|
||||||
return categories;
|
|
||||||
}
|
}
|
||||||
};
|
return new FuncInstance(funcDef, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getFuncDef(name) {
|
||||||
|
return index[name];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCategories() {
|
||||||
|
return categories;
|
||||||
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user