diff --git a/src/app/controllers/row.js b/src/app/controllers/row.js
index 3fbd85f5edb..6c9d34d46dd 100644
--- a/src/app/controllers/row.js
+++ b/src/app/controllers/row.js
@@ -58,6 +58,12 @@ function (angular, app, _) {
$scope.row.panels.push(panel);
};
+ $scope.remove_panel_from_row = function(row, panel) {
+ if (confirm('Are you sure you want to remove this ' + panel.type + ' panel?')) {
+ row.panels = _.without(row.panels,panel);
+ }
+ };
+
/** @scratch /panels/0
* [[panels]]
* = Panels
diff --git a/src/app/directives/kibanaPanel.js b/src/app/directives/kibanaPanel.js
index f437ba9a406..1a2f00b1982 100644
--- a/src/app/directives/kibanaPanel.js
+++ b/src/app/directives/kibanaPanel.js
@@ -15,8 +15,7 @@ function (angular) {
'
-
+
\ No newline at end of file
diff --git a/src/app/panels/graphite/module.js b/src/app/panels/graphite/module.js
index ad416a12fe1..a1ad43c2bb3 100644
--- a/src/app/panels/graphite/module.js
+++ b/src/app/panels/graphite/module.js
@@ -225,6 +225,15 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
}
};
+ $scope.remove_panel_from_row = function(row, panel) {
+ if ($scope.inEditMode) {
+ $rootScope.$emit('fullEditMode', false);
+ }
+ else {
+ $scope.$parent.remove_panel_from_row(row, panel);
+ }
+ };
+
$scope.closeEditMode = function() {
$rootScope.$emit('fullEditMode', false);
};
diff --git a/src/app/panels/graphite/styleEditor.html b/src/app/panels/graphite/styleEditor.html
index 89da062d69c..f3c08ef7eda 100644
--- a/src/app/panels/graphite/styleEditor.html
+++ b/src/app/panels/graphite/styleEditor.html
@@ -14,38 +14,38 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -54,7 +54,7 @@