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

This commit is contained in:
Torkel Ödegaard 2015-11-12 11:49:07 +01:00
parent 5c0cf9f5d7
commit bbdf75bdfa
2 changed files with 4 additions and 3 deletions

View File

@ -15,7 +15,7 @@ function (_) {
'text': { path: 'app/panels/text', name: 'Text' },
'dashlist': { path: 'app/panels/dashlist', name: 'Dashboard list' },
},
new_panel_title: 'no title (click here)',
new_panel_title: 'Panel Title',
plugins: {},
playlist_timespan: "1m",
unsaved_changes_warning: true,

View File

@ -91,13 +91,14 @@ function (angular, _, config) {
error: false,
span: _as < defaultSpan && _as > 0 ? _as : defaultSpan,
editable: true,
type: type
type: type,
isNew: true,
};
$scope.addPanel(panel);
$timeout(function() {
$scope.$broadcast('render');
$scope.dashboardViewState.update({fullscreen: true, edit: true, panelId: panel.id });
});
};