From 53d6b60e6fab54f5bcfca5ba41fd8099ec2f2cfc Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 25 Jul 2015 17:17:22 +0300 Subject: [PATCH] iss #19 - Reinitialize query editor when mode switched to IT services. --- zabbix/partials/query.editor.html | 4 ++-- zabbix/queryCtrl.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/zabbix/partials/query.editor.html b/zabbix/partials/query.editor.html index e7f2916..86dbcc2 100644 --- a/zabbix/partials/query.editor.html +++ b/zabbix/partials/query.editor.html @@ -19,11 +19,11 @@
  • IT Services + ng-click="switchEditorMode()">IT Services
  • Items + ng-click="switchEditorMode()">Items
  • Duplicate
  • Move up
  • diff --git a/zabbix/queryCtrl.js b/zabbix/queryCtrl.js index bca12e5..4fc469e 100644 --- a/zabbix/queryCtrl.js +++ b/zabbix/queryCtrl.js @@ -42,6 +42,11 @@ function (angular, _) { $scope.target.errors = validateTarget($scope.target); }; + $scope.switchEditorMode = function() { + $scope.target.ITService = !$scope.target.ITService; + $scope.init(); + }; + /** * Take alias from item name by default */