mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboard: delete row improvements
Possibility to delete row and all its panels or only the row which will leave its panels in the dashboard.
This commit is contained in:
@@ -469,6 +469,16 @@ export class DashboardModel {
|
||||
this.events.emit("panel-removed", panel);
|
||||
}
|
||||
|
||||
removeRow(row: PanelModel, removePanels: boolean) {
|
||||
const needToogle = (!removePanels && row.collapsed) || (removePanels && !row.collapsed);
|
||||
|
||||
if (needToogle) {
|
||||
this.toggleRow(row);
|
||||
}
|
||||
|
||||
this.removePanel(row);
|
||||
}
|
||||
|
||||
setPanelFocus(id) {
|
||||
this.meta.focusPanelId = id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user