refactoring graphite panel
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user