Alignak-monitoring-contrib / alignak-app

Desktop application in system tray for Alignak users.
GNU Affero General Public License v3.0
6 stars 2 forks source link

No WS connection, no information ... #308

Closed mohierf closed 6 years ago

mohierf commented 6 years ago

When the connection to the Alignak WS fails, the user do not have any information about the connection failure. Raising an alert may be interesting ?

And why does this connection fail ? My backend username/password is valid and thus the WS should be Log:

[2018-04-12,15:06:13]-alignak_app.backend.backend: [INFO] Try to connect to the Alignak backend...
[2018-04-12,15:06:14]-alignak_app.backend.backend: [INFO] Connection by password: Success
[2018-04-12,15:06:14]-alignak_app.backend.ws_client: [INFO] Requesting Web Service authentication with token: 1522151800026-aa365092-9fc5-4d9e-b111-84e37b1f5467
[2018-04-12,15:06:35]-alignak_app.backend.ws_client: [WARNING] Connection to Web Service on [https://alignak.fdj.kiosks.ipmfrance.com:8888/login] has failed

What is the app behavior when the WS is not available? The commands button are still active whereas they should not IMHO...

algorys commented 6 years ago

@mohierf information failures are available in DEBUG mode of App.

For command buttons (ACK and DOWNTIME), I left them for the moment active because the actionacknowledge and actiondowntime endpoints of the backend API are still valid.

If you think I have to make them inactive if there is no Web Service, I can.

mohierf commented 6 years ago

It may be more logical to disable the buttons IF a Web Service URI is set. If WS URI is set, it means, use the WS Alignak module ... and if it is not available, no commands may be raised from the App.

Looks more logical, no ?

algorys commented 6 years ago

I did not see WS integration like that. I thought the backend API was the main connection with the backend... and WS can add some features or better access.

Ok, if you think it's more logical this way. So, just for the actions ?

Or should the WS be used for all (in the long run) queries if it is enabled (because, some endpoints are still missing...) ?

mohierf commented 6 years ago

The WS will be the main Alignak (+ backend) API ... the backend is only an internal data model and the WS aims to expose. the idea is to hide the backend behind the WS :)

algorys commented 6 years ago

So:

Do you agree @mohierf ?

mohierf commented 6 years ago

Yes

algorys commented 6 years ago

Done.