Splash Screen / Loading page #269
Replies: 2 comments 2 replies
-
Hello! You should be able to do that using the refresh parameter of the shell component : select 'redirect' as component, 'test.sql' as link where sqlpage.cookie('waiting') is not null;
select 'cookie' as component, 'waiting' as name, 'y' as value, 5 as max_age;
select 'shell' as component, 'waiting...' as title, 2 as refresh;
select
'hero' as component,
'Please wait' as title,
'You will be redirected in a few seconds.' as description; Just out of curiosity, what do you need that waiting screen for? Is the user waiting for a particular event to happen? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply @lovasoa ! will give this a try. In this case, sqlpage is behind ContainerNursery proxy, which spins up a container when there is a user request, and spins it down when there is no sqlpage requests for x minutes. The first url (.sql url) in sqlpage has got multiple queries (charts) that are taking a few (~5-7) seconds to load. ContainerNursery meanwhile has got this issue where it is kicking off too many requests by the time first request is finished, leading to a infinite requests scenario. It sends requests at a high frequency to check if a container is up. (I see this issue across applications like sqlpage, filebrowser, dozzle, etc.) So my plan is to put a simple splash screen that can load instantaneously, that should get ContainerNursery to assume that the sqlpage application has loaded and stop sending new requests, and then sqlpage can redirect to the actual .sql url that runs the slightly heavier queries. |
Beta Was this translation helpful? Give feedback.
-
Hello all,
If I want to display a splash screen for 2 to 3 seconds first then redirect to the sql page, how can I go about doing that ?
I tried the redirect component and it sends me off to the next .sql url immediately.
How can I display a splash screen then redirect to another page after a 2 or 3 second delay?
I am wondering if anyone else has thought of a similar idea, and keen to know what possible options exist.
TIA for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions