UI is using API to request scripts with full content
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
Unassigned | ||
2.9 |
Won't Fix
|
Undecided
|
Unassigned | ||
maas-ui |
Fix Released
|
Unknown
|
Bug Description
While looking through the MAAS logs I noticed that the UI is repeatedly requesting
/MAAS/api/
This uses the API to return all scripts including their content. The API returns historic data so not only does this include script content but the content for every version of a script. The API also includes other data which the UI is not currently using.
On a fresh MAAS install with no script history the returned size is as follows:
/MAAS/api/
/MAAS/api/
This causes a lot of unnecessary load on the region and alot of unnecessary data over the network which can effect slow connections. This also seems to happening repeatedly so content is not cached.
1. MAAS has a websocket to return script data. It does not currently have a way to return content but that can be easily added.
2. Script content should be loaded as needed. IMHO its better to wait a second for each script to load when viewing content then to load it all at once. I discovered this while on the nodes-listing page where you can't view script content.
Related branches
- Lee Trager (community): Approve
- MAAS Lander: Pending (unittests) requested
-
Diff: 158 lines (+117/-4)2 files modifiedsrc/maasserver/websockets/handlers/script.py (+35/-2)
src/maasserver/websockets/handlers/tests/test_script.py (+82/-2)
- Björn Tillenius: Approve
- MAAS Lander: Needs Fixing
-
Diff: 158 lines (+117/-4)2 files modifiedsrc/maasserver/websockets/handlers/script.py (+35/-2)
src/maasserver/websockets/handlers/tests/test_script.py (+82/-2)
Changed in maas-ui: | |
importance: | Undecided → Unknown |
Changed in maas-ui: | |
status: | New → Fix Released |
Changed in maas: | |
milestone: | none → 2.10-beta1 |
status: | New → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
This should be back ported if its effecting earlier versions of MAAS.