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

This commit is contained in:
Torkel Ödegaard
2013-12-26 11:53:54 +01:00
parent c9260d7e80
commit f7544f3e91
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -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
View File
@@ -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
View File
@@ -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;