Commit 1aa5ed0c by Torkel Ödegaard

ux: minor fixes

parent d87653b0
...@@ -174,6 +174,7 @@ export function dashGridItem($timeout, $rootScope) { ...@@ -174,6 +174,7 @@ export function dashGridItem($timeout, $rootScope) {
if (panel.id !== payload.panelId) { if (panel.id !== payload.panelId) {
return; return;
} }
gridCtrl.gridstack.locked(element, false);
element.removeClass('panel-fullscreen'); element.removeClass('panel-fullscreen');
}, scope); }, scope);
......
...@@ -218,15 +218,14 @@ export class PanelCtrl { ...@@ -218,15 +218,14 @@ export class PanelCtrl {
} }
replacePanel(newPanel, oldPanel) { replacePanel(newPanel, oldPanel) {
var row = this.row; var index = _.indexOf(this.dashboard.panels, oldPanel);
var index = _.indexOf(this.row.panels, oldPanel); this.dashboard.panels.splice(index, 1);
this.row.panels.splice(index, 1);
// adding it back needs to be done in next digest // adding it back needs to be done in next digest
this.$timeout(() => { this.$timeout(() => {
newPanel.id = oldPanel.id; newPanel.id = oldPanel.id;
newPanel.span = oldPanel.span; newPanel.width = oldPanel.width;
this.row.panels.splice(index, 0, newPanel); this.dashboard.panels.splice(index, 0, newPanel);
}); });
} }
......
...@@ -104,7 +104,7 @@ class GettingStartedPanelCtrl extends PanelCtrl { ...@@ -104,7 +104,7 @@ class GettingStartedPanelCtrl extends PanelCtrl {
} }
dismiss() { dismiss() {
this.row.removePanel(this.panel, false); this.dashboard.removePanel(this.panel, false);
this.backendSrv.request({ this.backendSrv.request({
method: 'PUT', method: 'PUT',
......
...@@ -225,6 +225,9 @@ div.flot-text { ...@@ -225,6 +225,9 @@ div.flot-text {
.panel-fullscreen { .panel-fullscreen {
display: block !important; display: block !important;
> .ui-resizable-handle {
display: none !important;
}
} }
} }
......
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