mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
Ghost panel test
This commit is contained in:
parent
7919d79347
commit
cc71b1f07d
@ -81,13 +81,13 @@ function (angular, app, _, config) {
|
||||
$scope.$broadcast('render');
|
||||
};
|
||||
|
||||
$scope.remove_panel_from_row = function(row, panel) {
|
||||
$scope.removePanel = function(panel) {
|
||||
$scope.appEvent('confirm-modal', {
|
||||
title: 'Are you sure you want to remove this panel?',
|
||||
icon: 'fa-trash',
|
||||
yesText: 'Delete',
|
||||
onConfirm: function() {
|
||||
row.panels = _.without(row.panels, panel);
|
||||
$scope.row.panels = _.without($scope.row.panels, panel);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -20,9 +20,9 @@ function (angular, $, _) {
|
||||
var template = '<div class="panel-menu small">';
|
||||
template += '<div class="panel-menu-inner">';
|
||||
template += '<div class="panel-menu-row">';
|
||||
template += '<a class="panel-menu-icon pull-left" ng-click="updateColumnSpan(-1)"><i class="fa fa-minus"></i></a>';
|
||||
template += '<a class="panel-menu-icon pull-left" ng-click="updateColumnSpan(1)"><i class="fa fa-plus"></i></a>';
|
||||
template += '<a class="panel-menu-icon pull-right" ng-click="remove_panel_from_row(row, panel)"><i class="fa fa-remove"></i></a>';
|
||||
template += '<a class="panel-menu-icon pull-left" ng-click="updateColumnSpan(panel,-1)"><i class="fa fa-minus"></i></a>';
|
||||
template += '<a class="panel-menu-icon pull-left" ng-click="updateColumnSpan(panel,1)"><i class="fa fa-plus"></i></a>';
|
||||
template += '<a class="panel-menu-icon pull-right" ng-click="removePanel(panel)"><i class="fa fa-remove"></i></a>';
|
||||
template += '<div class="clearfix"></div>';
|
||||
template += '</div>';
|
||||
|
||||
|
@ -41,6 +41,7 @@ function (angular, _, config) {
|
||||
|
||||
$scope.updateColumnSpan = function(span) {
|
||||
$scope.panel.span = Math.min(Math.max($scope.panel.span + span, 1), 12);
|
||||
$scope.row.updatePanelSpan()
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$broadcast('render');
|
||||
|
Loading…
Reference in New Issue
Block a user