Commit bbdf75bd by Torkel Ödegaard

feat(dashboard): Automatically go into panel edit mode after adding a new panel to the dashboard

parent 5c0cf9f5
...@@ -15,7 +15,7 @@ function (_) { ...@@ -15,7 +15,7 @@ function (_) {
'text': { path: 'app/panels/text', name: 'Text' }, 'text': { path: 'app/panels/text', name: 'Text' },
'dashlist': { path: 'app/panels/dashlist', name: 'Dashboard list' }, 'dashlist': { path: 'app/panels/dashlist', name: 'Dashboard list' },
}, },
new_panel_title: 'no title (click here)', new_panel_title: 'Panel Title',
plugins: {}, plugins: {},
playlist_timespan: "1m", playlist_timespan: "1m",
unsaved_changes_warning: true, unsaved_changes_warning: true,
......
...@@ -91,13 +91,14 @@ function (angular, _, config) { ...@@ -91,13 +91,14 @@ function (angular, _, config) {
error: false, error: false,
span: _as < defaultSpan && _as > 0 ? _as : defaultSpan, span: _as < defaultSpan && _as > 0 ? _as : defaultSpan,
editable: true, editable: true,
type: type type: type,
isNew: true,
}; };
$scope.addPanel(panel); $scope.addPanel(panel);
$timeout(function() { $timeout(function() {
$scope.$broadcast('render'); $scope.dashboardViewState.update({fullscreen: true, edit: true, panelId: panel.id });
}); });
}; };
......
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