mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 15:25:22 +02:00
Merge pull request #4766 from portainer/fix/GH/3068-fix-auto-refresh-collapse
fix(docker/services): save the settings of the table for auto refresh
This commit is contained in:
commit
bc459b55ae
3 changed files with 25 additions and 8 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue