From bbdf75bdfa85416319f010332f98d65839e35ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 12 Nov 2015 11:49:07 +0100 Subject: [PATCH] feat(dashboard): Automatically go into panel edit mode after adding a new panel to the dashboard --- public/app/core/settings.js | 2 +- public/app/features/dashboard/rowCtrl.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/app/core/settings.js b/public/app/core/settings.js index e452b59b904..2fa484a9cba 100644 --- a/public/app/core/settings.js +++ b/public/app/core/settings.js @@ -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, diff --git a/public/app/features/dashboard/rowCtrl.js b/public/app/features/dashboard/rowCtrl.js index 0d8ee5d9473..723481d2d65 100644 --- a/public/app/features/dashboard/rowCtrl.js +++ b/public/app/features/dashboard/rowCtrl.js @@ -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 }); }); };