Enhancement #3322
Dashboard: avoid blocking on todos ajax calls
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-base | |||
Target version: | v6.7 | |||
Resolution: | NEEDINFO: | No |
Description
The Dashboard calls /usr/libexec/nethserver/admin-todos
to display a list of todos at the top of the page.
The request is made with an asynchronous ajax call, but if response takes a long time, the browser will wait for the pending request blocking any other action on the web interface.
Since each todo is a self-contained script, there is no way to know how long the server will take for the response.
To workaround the problem, add a short timeout to the execution of each todo scripts.
Associated revisions
Todos: add timeout (2s) for each script. Refs #3322
History
#1 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from NEW to TRIAGED
- % Done changed from 0 to 20
#2 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Giacomo Sanchietti
- Target version set to v6.7
- % Done changed from 20 to 30
#3 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
#4 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from MODIFIED to ON_QA
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 60 to 70
- nethserver-base-2.9.3-1.1.gaa123c5.ns6.noarch.rpm
- Install the new package on a clean machine
- Create a todo script which sleeps for 10 seconds:
echo -e '#!/bin/bash\nsleep 10\n' > /etc/nethserver/todos.d/80test chmod a+x /etc/nethserver/todos.d/80test
- Execute
/etc/nethserver/todos.d/80test
and check the command doesn't sleep for all 10 seconds:time /usr/libexec/nethserver/admin-todos
#5 Updated by Filippo Carletti over 5 years ago
- Status changed from ON_QA to VERIFIED
- % Done changed from 70 to 90
I added the fake sleep-10 todo and verified that the server-manager hung for 10 second after accessing the dashboard.
Then I installed the updated package and repetaed the same steps: the server-manager hung for only 2 seconds.
I think that a 2 seconds reaction to a click is not perceived as an hung.
#6 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
- nethserver-base-2.9.4-1.ns6.noarch.rpm