EinsteinToolkit / tests

Integration tests of the Einstein Toolkit
https://einsteintoolkit.github.io/tests
Other
1 stars 2 forks source link

reduce number of http requests used to display checkmarks #18

Closed rhaas80 closed 2 years ago

rhaas80 commented 2 years ago

Currently each checkmark / exclamation mark in the lists of builds requires a http request in javascript in version.js. With multiple hundred checkmarks this is quite slow and also causes unnecessary traffic. It takes many seconds for me.

Since all the information is known at page build time this can be avoided.

try { sidebar = document.getElementsByClassName('sidebar'); sidebar[0].innerHTML = content; } catch (err) { console.log(err); }



I also note that calling the XMLHttpRequest `membersFile` is a historic leftover from copying this javascript code out of einsteintoolkit.org where it loads `members.txt` and creates the list of members.
rhaas80 commented 2 years ago

It is probably possible to avoid all javascript if one uses iframes creatively. In paticular index.html would contain the sidebar and an iframe to the right for the test results. The sidebar links can use a <a> target attribute to load their target in the iframe. Eg as shown here https://www.w3schools.com/html/tryit.asp?filename=tryhtml_iframe_target. This would also have the advantage of preserving the scroll position of the sidebar. A downside is that one must take care to match CSS styles in the iframe to the outside CSS, since CSS is not inherited by the iframe. This may well be acceptable since the sidebar and results page do not share much styling anyway.