Is your feature request related to a problem? Please describe.
There is no indication in the CMS when the underlying service (BitBucket/GitHub/GitLab) used as a backend is down.
This can lead to data loss when a user tries to save an entry when the backend is down.
Describe the solution you'd like
A backend down status indicator (we could check https://www.githubstatus.com/ for example).
Describe alternatives you've considered
A bigger lift will be to add offline support.
Additional context
GitHub was down multiple times this week.
Hey, @erezrokah I want to take it. Though I am a very starter in opensource and netlify will you help me out a bit .
Thanks @amarpathak, I would start with adding a method to the GitHub backend to figure out if the backend is down.
Then probably a new redux reducer and actions to store and update the backend status.
Once that is working, probably add it to other backends.
Also related to https://github.com/netlify/netlify-cms/issues/68
@erezrokah this is an interesting feature that can be added. did some research and looks like GitHub and BitBucket has a public api for the status. I'll be interested in getting a PR for this if @amarpathak no longer active. Let me know.
Thanks @nigel5, I've assigned you to it.
It should be easier to implement now since https://github.com/netlify/netlify-cms/pull/3847 was merged
@erezrokah Ok. What do you think about updating the existing status function in Implementation.ts to return Promise<{ auth: boolean, backend: boolean }> ?
For the backend providers that don't have a status api we can just assume true for the backend.
When status.backend === false it can show a warning. Similar to #3847 when logged out.
That sounds good @nigel5, just I would use Promise<{ auth: boolean, api: boolean }>
Also, we shouldn't show the auth error if api fails since most likely auth won't work unless api is up.
Sure. I have added the functionality to ping the status page for GitHub and BitBucket. When the status page summary is "critical" it shows a toast message, which would need to be localized later.
And as you mentioned, If status.api === false, it will not action the Auth toast message
https://github.com/nigel5/netlify-cms/commit/e779749e7169bc2a5eedce6dd9f2784b73e845cd
This is the commit. I hope to get some feedback before making the pull request. Thanks @erezrokah ,
Thanks @nigel5, the direction in that commit is very good - added some comments.
@erezrokah Sure. I have made the suggested changes.
[backend]_OPERATIONAL_UNITSarray for these providers need to be in operational status.I added a en ui message 'One or more backend components are down. Proceed with caution'. Will the other locales show the en value if they don't have it localized?
https://github.com/nigel5/netlify-cms/commit/5c5dc4e0e2e39f62a4736819b4d4c20fe38ebf6b
I think we are working in different time zones 馃榾. Let me know what you think about this. Thanks for helping out with this. Getting familiar with the code base.
Thanks @nigel5, appreciate your work especially with the time zones challenge.
This looks very good.
I would consider returning true on failure to check statues (let's assume the status page can be down but the service can be up) like here https://github.com/nigel5/netlify-cms/commit/5c5dc4e0e2e39f62a4736819b4d4c20fe38ebf6b#diff-2531b7608fefb0ddd852c544b7579bb4R195
Good work on the translation, not sure backend components is a familiar term for users.
How about the backend service is experiencing an outage. Proceed with cation or something similar?
Regardless I think you can open a PR to get more visibility from the community.