slapos_jio: Display "Status Unknown" if get status failed
There has an "onLoop" function in some gadgets which re-render every 5 minutes. In case this refresh fail, an error page is displayed. This commit prevent this gadget fail, by displays "Status Unknown" in the state.
Without test, you can be sure it will be quickly broken
Thinking a way to test this senario...
One way could be to use URLs reporting errors/failure/whatever.
Add some python script returning the expected HTTP errors for example.
Then, for the timeout, I don't know if it is possible for zope to not answer a query.
thanks for your suggestion. I will think about it. Initially I thought it was impossible, but I can test those gadgets on a isolated way probably.
The API uses jio_get see
https://lab.nexedi.com/nexedi/slapos.core/blob/a1d84489d7f069cf522c600073e741ba64dadc16/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_js.js#L111so I will probably need to create a "test page" to test this gadget (which act as a field" in a sense).