dashboards: fix keyboard shortcut for expand/collapse rows

This commit is contained in:
Marcus Efraimsson
2018-02-22 18:03:29 +01:00
parent 609f3c1c9d
commit 34f1611d18
2 changed files with 30 additions and 6 deletions

View File

@@ -524,6 +524,34 @@ export class DashboardModel {
this.removePanel(row);
}
expandRows() {
for (let i = 0; i < this.panels.length; i++) {
var panel = this.panels[i];
if (panel.type !== 'row') {
continue;
}
if (panel.collapsed) {
this.toggleRow(panel);
}
}
}
collapseRows() {
for (let i = 0; i < this.panels.length; i++) {
var panel = this.panels[i];
if (panel.type !== 'row') {
continue;
}
if (!panel.collapsed) {
this.toggleRow(panel);
}
}
}
setPanelFocus(id) {
this.meta.focusPanelId = id;
}