mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
added forceupdate to grid item so addpanel items rezie instantly, renamed function to copyPanel, fixed panel items height issue
This commit is contained in:
@@ -152,11 +152,13 @@ export class DashboardGrid extends React.Component<DashboardGridProps, any> {
|
||||
|
||||
onResize(layout, oldItem, newItem) {
|
||||
this.panelMap[newItem.i].updateGridPos(newItem);
|
||||
this.triggerForceUpdate();
|
||||
}
|
||||
|
||||
onResizeStop(layout, oldItem, newItem) {
|
||||
this.updateGridPos(newItem, layout);
|
||||
this.panelMap[newItem.i].resizeDone();
|
||||
this.triggerForceUpdate();
|
||||
}
|
||||
|
||||
onDragStop(layout, oldItem, newItem) {
|
||||
|
||||
@@ -195,7 +195,7 @@ export class PanelCtrl {
|
||||
|
||||
menu.push({
|
||||
text: 'Copy',
|
||||
click: 'ctrl.addToPanelList()',
|
||||
click: 'ctrl.copyPanel()',
|
||||
role: 'Editor',
|
||||
});
|
||||
}
|
||||
@@ -260,9 +260,9 @@ export class PanelCtrl {
|
||||
});
|
||||
}
|
||||
|
||||
addToPanelList() {
|
||||
copyPanel() {
|
||||
store.set(LS_PANEL_COPY_KEY, JSON.stringify(this.panel.getSaveModel()));
|
||||
appEvents.emit('alert-success', ['Panel temporarily added to panel list']);
|
||||
appEvents.emit('alert-success', ['Panel copied. Open new panel to paste']);
|
||||
}
|
||||
|
||||
replacePanel(newPanel, oldPanel) {
|
||||
|
||||
Reference in New Issue
Block a user