Просмотр исходного кода

add keyboard shotcuts for collapse/expand rows

Mitsuhiro Tanda 8 лет назад
Родитель
Сommit
5a30b08b14
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      public/app/core/services/keybindingSrv.ts

+ 14 - 0
public/app/core/services/keybindingSrv.ts

@@ -187,6 +187,20 @@ export class KeybindingSrv {
       }
     });
 
+    // collapse all rows
+    this.bind('r C', () => {
+      _.each(dashboard.rows, function(row) {
+        row.collapse = true;
+      });
+    });
+
+    // expand all rows
+    this.bind('r E', () => {
+      _.each(dashboard.rows, function(row) {
+        row.collapse = false;
+      });
+    });
+
     this.bind('d r', () => {
       scope.broadcastRefresh();
     });