refactoring graphite panel

This commit is contained in:
Torkel Ödegaard
2014-02-27 08:33:53 +01:00
parent c4219ba0ad
commit cf9a8a15cd
2 changed files with 9 additions and 6 deletions
+3 -3
View File
@@ -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>
+6 -3
View File
@@ -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();