diff --git a/src/datasource-zabbix/add-metric-function.directive.js b/src/datasource-zabbix/add-metric-function.directive.js index a3676ee..88448e5 100644 --- a/src/datasource-zabbix/add-metric-function.directive.js +++ b/src/datasource-zabbix/add-metric-function.directive.js @@ -8,10 +8,10 @@ angular .module('grafana.directives') .directive('addMetricFunction', function($compile) { var inputTemplate = ''; - var buttonTemplate = '' + ''; diff --git a/src/datasource-zabbix/partials/query.editor.html b/src/datasource-zabbix/partials/query.editor.html index 50342cd..eb858c5 100644 --- a/src/datasource-zabbix/partials/query.editor.html +++ b/src/datasource-zabbix/partials/query.editor.html @@ -1,210 +1,149 @@ -
- - - +
+
+
+
+ - + + + + +
+
+
+ - -
- + }"> + -
-
+ +
-
  • Application
  • -
  • +
    + -
  • +
    -
  • Item
  • -
  • +
    + -
  • -
  • Options
  • -
  • - - -
  • - - - -
    - -
    - -
    -
    - -
    -
    +
    + +
    +
    + +
    +
    +
    + +
    -
  • - Text filter -
  • -
  • +
    + -
  • -
  • - Use capture groups  - - -
  • - + ng-blur="ctrl.onTargetBlur()"> +
    -
    - + + + + diff --git a/src/datasource-zabbix/query.controller.js b/src/datasource-zabbix/query.controller.js index 3556209..bd35da3 100644 --- a/src/datasource-zabbix/query.controller.js +++ b/src/datasource-zabbix/query.controller.js @@ -26,9 +26,9 @@ export class ZabbixQueryController extends QueryCtrl { this.templateSrv = templateSrv; this.editorModes = { - 0: 'num', - 1: 'itservice', - 2: 'text' + 0: {value: 'num', text: 'Numeric metrics', mode: 0}, + 1: {value: 'itservice', text: 'IT Services', mode: 1}, + 2: {value: 'text', text: 'Text metrics', mode: 2} }; // Map functions for bs-typeahead @@ -98,7 +98,7 @@ export class ZabbixQueryController extends QueryCtrl { initFilters() { var self = this; - var itemtype = self.editorModes[self.target.mode]; + var itemtype = self.editorModes[self.target.mode].value; return this.$q.when(this.suggestGroups()) .then(() => {return self.suggestHosts();}) .then(() => {return self.suggestApps();})