Commit 6969a412 by Torkel Ödegaard

removing pulldowns and simplifying submenu controls code

parent 4f8b2ad2
......@@ -48,6 +48,9 @@ function (angular, $, config, _) {
$scope.filter = filterSrv;
$scope.filter.init($scope.dashboard);
$scope.submenuEnabled = $scope.dashboard.templating.enable ||
$scope.dashboard.annotations.enable;
var panelMove = panelMoveSrv.create($scope.dashboard);
$scope.panelMoveDrop = panelMove.onDrop;
......
......@@ -24,4 +24,4 @@ function (angular, app, _) {
});
});
\ No newline at end of file
});
......@@ -3,16 +3,7 @@
<div ng-include="'app/partials/dashboard_topnav.html'">
</div>
<div class="submenu-controls">
<div class="submenu-panel" ng-controller="SubmenuCtrl" ng-repeat="pulldown in dashboard.pulldowns | filter:{ enable: true }">
<div class="submenu-panel-title">
<span class="small"><strong>{{pulldown.type}}:</strong></span>
</div>
<div class="submenu-panel-wrapper">
<grafana-simple-panel type="pulldown.type" ng-cloak></grafana-simple-panel>
</div>
</div>
<div class="clearfix"></div>
<div ng-if="submenuEnabled" ng-include="'app/partials/submenu.html'">
</div>
<div class="clearfix"></div>
......
<div class="submenu-controls" ng-controller="SubmenuCtrl">
<div class="grafana-target">
<div class="grafana-target-inner-wrapper">
<div class="grafana-target-inner">
<ul class="grafana-target-controls-left">
<li class="grafana-target-segment">
<i class="icon-remove pointer"></i>
</li>
</ul>
<ul class="grafana-segment-list">
<li ng-repeat="filter in filter.templateParameters" class="grafana-target-segment">
<div class="dropdown">
{{filter.name}} =
<a class="dropdown-toggle" data-toggle="dropdown">
{{filter.current.text}}
</a>
<ul class="dropdown-menu">
<li ng-repeat="option in filter.options">
<a ng-click="filterOptionSelected(filter, option)">{{option.text}}</a>
</li>
</ul>
</div>
</li>
<li ng-repeat="annotation in dashboard.annotations.list" class="grafana-target-segment" ng-class="{'annotation-disabled': !annotation.enable }">
<i class="annotation-color-icon icon-minus"></i>
<a ng-click="hide(annotation)" class="small">{{annotation.name}}</a>
</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
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