Browse Source

fix(dashboard): minor fixes, and restored in-activity timer to 1min

Torkel Ödegaard 9 years ago
parent
commit
a45fdfdd3f

+ 1 - 1
public/app/core/components/grafana_app.ts

@@ -122,7 +122,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
       // handle in active view state class
       var lastActivity = new Date().getTime();
       var activeUser = true;
-      var inActiveTimeLimit = 10 * 1000;
+      var inActiveTimeLimit = 60 * 1000;
 
       function checkForInActiveUser() {
         if (!activeUser) {

+ 1 - 1
public/app/features/dashboard/row/add_panel.html

@@ -5,7 +5,7 @@
 
   <div class="gf-form-inline dash-row-add-panel-form">
     <div class="gf-form">
-      <input type="text" class="gf-form-input max-width-14" ng-model='ctrl.panelSearch' give-focus='true' ng-keydown="ctrl.keyDown($event)" ng-change="ctrl.panelSearchChanged()" placeholder="panel search filter" ng-blur="ctrl.panelSearchBlur()"></input>
+      <input type="text" class="gf-form-input max-width-14" ng-model='ctrl.panelSearch' give-focus='true' ng-keydown="ctrl.keyDown($event)" ng-change="ctrl.panelSearchChanged()" placeholder="panel search filter"></input>
     </div>
   </div>
 

+ 0 - 6
public/app/features/dashboard/row/add_panel.ts

@@ -45,12 +45,6 @@ export class AddPanelCtrl {
     }
   }
 
-  panelSearchBlur() {
-    // this.$timeout(() => {
-    //   this.rowCtrl.dropView = 0;
-    // }, 400);
-  }
-
   moveSelection(direction) {
     var max = this.panelHits.length;
     var newIndex = this.activeIndex + direction;

+ 0 - 2
public/app/features/dashboard/row/row_ctrl.ts

@@ -19,7 +19,6 @@ export class DashRowCtrl {
 
     if (this.row.isNew) {
       this.dropView = 1;
-      delete this.row.isNew;
     }
   }
 
@@ -36,7 +35,6 @@ export class DashRowCtrl {
           type: panelId,
           id: this.dashboard.getNextPanelId(),
         },
-        isNew: true,
       };
     } else {
       dragObject = this.dashboard.getPanelInfoById(panelId);

+ 4 - 0
public/app/features/dashboard/row/row_model.ts

@@ -34,6 +34,10 @@ export class DashboardRow {
 
   getSaveModel() {
     assignModelProperties(this.model, this, this.defaults);
+
+    // remove properties that dont server persisted purpose
+    delete this.model.isNew;
+
     return this.model;
   }