1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-08 15:25:22 +02:00

fix(docker/services): get datas from local storage when auto refresh is enable

This commit is contained in:
alice groux 2021-01-27 16:10:49 +01:00
parent 36fbaa9026
commit 51d584bb50
3 changed files with 25 additions and 12 deletions

View file

@ -183,8 +183,9 @@ angular.module('portainer.app').controller('GenericDatatableController', [
};
this.startRepeater = function () {
this.repeater = $interval(() => {
this.refreshCallback();
this.repeater = $interval(async () => {
await this.refreshCallback();
this.onDataRefresh();
}, this.settings.repeater.refreshRate * 1000);
};
@ -197,6 +198,14 @@ angular.module('portainer.app').controller('GenericDatatableController', [
}
DatatableService.setDataTableSettings(this.tableKey, this.settings);
};
/**
* Override this method to execute code after calling the refresh callback
*/
this.onDataRefresh = function () {
return;
};
/**
* !REPEATER SECTION
*/