mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tweaked pulldown editor path
This commit is contained in:
parent
d3495ff739
commit
40a95bedb7
@ -68,9 +68,18 @@ function (angular, config, _) {
|
|||||||
return { 'min-height': row.collapse ? '5px' : row.height };
|
return { 'min-height': row.collapse ? '5px' : row.height };
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.edit_path = function(type) {
|
$scope.panel_path =function(type) {
|
||||||
if(type) {
|
if(type) {
|
||||||
return 'app/panels/'+type.replace(".","/")+'/editor.html';
|
return 'app/panels/'+type.replace(".","/");
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.edit_path = function(type) {
|
||||||
|
var p = $scope.panel_path(type);
|
||||||
|
if(p) {
|
||||||
|
return p+'/editor.html';
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-repeat="pulldown in dashboard.current.nav" ng-controller="PulldownCtrl" ng-show="editor.index == 4+$index">
|
<div ng-repeat="pulldown in dashboard.current.nav" ng-controller="PulldownCtrl" ng-show="editor.index == 4+$index">
|
||||||
<ng-include ng-show="pulldown.enable" src="'./app/panels/'+pulldown.type+'/editor.html'"></ng-include>
|
<ng-include ng-show="pulldown.enable" src="edit_path(pulldown.type)"></ng-include>
|
||||||
<button ng-hide="pulldown.enable" class="btn" ng-click="pulldown.enable = true">Enable the {{pulldown.type}}</button>
|
<button ng-hide="pulldown.enable" class="btn" ng-click="pulldown.enable = true">Enable the {{pulldown.type}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user