Skip to content

Commit f537619

Browse files
author
John Janzen
committed
Revert "Change onRender function to always update the dashboard stats"
This reverts commit d26e8c1. This reopens #4204 (which i can't reproduce sadly) The reverted commit is responsible for an infinite loop of requests to /hosts, which makes buttons unresponsive on the main page another way to invalidate the cache needs to be found this infinite requests loop happens on d26e8c1 and on the docker image `nginxproxymanager/nginx-proxy-manager-dev:pr-4206` the docker image is attaced to the pr #4206 which merges the commit
1 parent 805968a commit f537619

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/js/app/dashboard/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ module.exports = Mn.View.extend({
5050
onRender: function () {
5151
let view = this;
5252

53-
Api.Reports.getHostStats()
53+
if (typeof view.stats.hosts === 'undefined') {
54+
Api.Reports.getHostStats()
5455
.then(response => {
5556
if (!view.isDestroyed()) {
5657
view.stats.hosts = response;
@@ -60,6 +61,7 @@ module.exports = Mn.View.extend({
6061
.catch(err => {
6162
console.log(err);
6263
});
64+
}
6365
},
6466

6567
/**

0 commit comments

Comments
 (0)