Commit a45fdfdd by Torkel Ödegaard

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

parent 42167a65
...@@ -122,7 +122,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) { ...@@ -122,7 +122,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
// handle in active view state class // handle in active view state class
var lastActivity = new Date().getTime(); var lastActivity = new Date().getTime();
var activeUser = true; var activeUser = true;
var inActiveTimeLimit = 10 * 1000; var inActiveTimeLimit = 60 * 1000;
function checkForInActiveUser() { function checkForInActiveUser() {
if (!activeUser) { if (!activeUser) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="gf-form-inline dash-row-add-panel-form"> <div class="gf-form-inline dash-row-add-panel-form">
<div class="gf-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>
</div> </div>
......
...@@ -45,12 +45,6 @@ export class AddPanelCtrl { ...@@ -45,12 +45,6 @@ export class AddPanelCtrl {
} }
} }
panelSearchBlur() {
// this.$timeout(() => {
// this.rowCtrl.dropView = 0;
// }, 400);
}
moveSelection(direction) { moveSelection(direction) {
var max = this.panelHits.length; var max = this.panelHits.length;
var newIndex = this.activeIndex + direction; var newIndex = this.activeIndex + direction;
......
...@@ -19,7 +19,6 @@ export class DashRowCtrl { ...@@ -19,7 +19,6 @@ export class DashRowCtrl {
if (this.row.isNew) { if (this.row.isNew) {
this.dropView = 1; this.dropView = 1;
delete this.row.isNew;
} }
} }
...@@ -36,7 +35,6 @@ export class DashRowCtrl { ...@@ -36,7 +35,6 @@ export class DashRowCtrl {
type: panelId, type: panelId,
id: this.dashboard.getNextPanelId(), id: this.dashboard.getNextPanelId(),
}, },
isNew: true,
}; };
} else { } else {
dragObject = this.dashboard.getPanelInfoById(panelId); dragObject = this.dashboard.getPanelInfoById(panelId);
......
...@@ -34,6 +34,10 @@ export class DashboardRow { ...@@ -34,6 +34,10 @@ export class DashboardRow {
getSaveModel() { getSaveModel() {
assignModelProperties(this.model, this, this.defaults); assignModelProperties(this.model, this, this.defaults);
// remove properties that dont server persisted purpose
delete this.model.isNew;
return this.model; return this.model;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment