Bläddra i källkod

fixed so that full editor controls are only loaded when opening editor

Torkel Ödegaard 12 år sedan
förälder
incheckning
f7544f3e91

+ 6 - 0
src/app/controllers/graphiteTarget.js

@@ -67,9 +67,15 @@ function (angular, _, config, graphiteFuncs, Parser) {
         if ((index-1) >= func.def.params.length) {
           throw { message: 'invalid number of parameters to method ' + func.def.name };
         }
+
         func.params[index - 1] = astNode.value;
         break;
+
       case 'metric':
+        if ($scope.segments.length > 0) {
+          throw { message: 'Multiple metric params not supported, use text editor.' };
+        }
+
         $scope.segments = _.map(astNode.segments, function(segment) {
           return {
             val: segment.value,

+ 1 - 1
src/app/panels/graphite/module.html

@@ -97,7 +97,7 @@
     </span>
   </div>
 
-  <div class="panel-full-edit-tabs" ng-show="inEditMode">
+  <div class="panel-full-edit-tabs" ng-if="inEditMode">
       <div ng-model="editor.index" bs-tabs>
         <div ng-repeat="tab in setEditorTabs(panelMeta)" data-title="{{tab}}">
         </div>

+ 1 - 1
src/app/panels/graphite/module.js

@@ -211,7 +211,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv, RQ) {
 
 
     $scope.init = function() {
-      $scope.openConfigureModal({preventDefault: function() {}, stopPropagation: function() {} });
+      //$scope.openConfigureModal({preventDefault: function() {}, stopPropagation: function() {} });
 
       // Hide view options by default
       $scope.options = false;