mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Etemplate: Add a timeout to waiting for widgets to load so we can more easily know what happened & track it down.
This commit is contained in:
parent
f4438ac59d
commit
df20d58abf
@ -745,7 +745,23 @@ export class etemplate2
|
||||
// to run.
|
||||
setTimeout(() =>
|
||||
{
|
||||
Promise.all(deferred).then(() =>
|
||||
Promise.race([Promise.all(deferred),
|
||||
// If loading takes too long, give some feedback so we can try to track down why
|
||||
new Promise((resolve) =>
|
||||
{
|
||||
setTimeout(() =>
|
||||
{
|
||||
if(this.ready)
|
||||
{
|
||||
return;
|
||||
}
|
||||
egw.debug("error", "Loading timeout");
|
||||
console.debug("Deferred widget list, look for widgets still pending.", deferred);
|
||||
resolve()
|
||||
}, 10000
|
||||
);
|
||||
})
|
||||
]).then(() =>
|
||||
{
|
||||
|
||||
console.timeEnd("deferred");
|
||||
|
Loading…
Reference in New Issue
Block a user