ansible-community / ara-web

Stateless web client for the ARA Records Ansible API.
https://ara.recordsansible.org
GNU General Public License v3.0
37 stars 8 forks source link

When no playbooks are found, differentiate between "the api server works but is empty" vs "could not connect to remote api server" #9

Closed dmsimard closed 5 years ago

dmsimard commented 5 years ago

Right now, if there's either no API server running or if there are no playbooks found, the error returned will be the same:

Screenshot from 2019-05-28 11-46-20

We should be able to tell if the remote API server is up and running by retrieving the version of ARA API server at "/", for example:

Screenshot from 2019-05-28 11-48-13

guillaumevincent commented 5 years ago

yes let me improve this

dmsimard commented 5 years ago

Tested https://review.opendev.org/#/c/661940/ and works for me !

When the server is offline or can't be reached: Screenshot from 2019-05-29 08-51-29

When the server is online but empty: Screenshot from 2019-05-29 08-52-40

Great work, thanks @guillaumevincent !