Commit cf9a8a15 by Torkel Ödegaard

refactoring graphite panel

parent c4219ba0
......@@ -32,7 +32,7 @@
</div>
</div>
<div class="tab-content" ng-show="editorTabs[editor.index] == 'General'">
<!-- <div class="tab-content" ng-show="editorTabs[editor.index] == 'General'">
<div ng-include src="'app/partials/panelgeneral.html'"></div>
<div class="editor-row" ng-show="datasources.length > 0">
......@@ -44,8 +44,8 @@
</div>
</div>
</div>
<div class="tab-content" ng-repeat="tab in panelMeta.fullEditorTabs" ng-show="editorTabs[editor.index] == tab.title">
-->
<div class="tab-content" ng-repeat="tab in panelMeta.editorTabs" ng-show="editorTabs[editor.index] == tab.title">
<div ng-include src="tab.src"></div>
</div>
......
......@@ -38,9 +38,12 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope.panelMeta = {
modals : [],
editorTabs: [],
fullEditorTabs : [
editorTabs : [
{
title: 'General',
src:'app/partials/panelgeneral.html'
},
{
title:'Targets',
src:'app/panels/graphite/editor.html'
......@@ -221,7 +224,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope.fullscreen = false;
$scope.options = false;
$scope.editor = {index: 1};
$scope.editorTabs = _.union(['General'],_.pluck($scope.panelMeta.fullEditorTabs,'title'));
$scope.editorTabs = _.pluck($scope.panelMeta.editorTabs,'title');
$scope.hiddenSeries = {};
$scope.datasources = datasourceSrv.listOptions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment