oysterprotocol / webinterface

Web interface that enables a user to upload a file via the Oyster Protocol
GNU General Public License v3.0
35 stars 5 forks source link

Warn users when brokers are down #199

Open CKH4 opened 6 years ago

CKH4 commented 6 years ago

There should be a warning on the site when the brokers are not functioning. Ideally it would stop use of the site so that users don't think that it might still work.

rfornea commented 6 years ago

Pasting this comment from the duplicate of this issue: perhaps the endpoint on the broker could check the status of the "DEPLOY_IN_PROGRESS" env variable. If that variable is either true or if the request to the broker totally fails, we could use the same screen on webinterface.

CKH4 commented 6 years ago

That sounds like a logical way to go about it. If Taylor doesn't get to the design today I may be able to design something for it, depends on how much time I get.

rfornea commented 6 years ago

I talked with Taylor about this. He's okay with us just designing something simple for this and we'll just replace it with his version when he finishes the other things he's working on.

CKH4 commented 6 years ago

That sounds good. I assume you're taking the back end side of this, who is taking the front end?

rfornea commented 6 years ago

For the backend, I'm a bit tied up with database stuff at the moment but I may be able to get to this later today, or perhaps @pzhao5 has some bandwidth.

For the front end @AaronVasquez do you have a preference on who does this, or mind if Connor takes it?

For the endpoint itself, how does everyone feel something like /api/v2/check-availability that will just return true or false?

CKH4 commented 6 years ago

I don't have too much time at the moment so I probably can't do it but I'll keep tabs on the changes. That endpoint sounds good to me.

rfornea commented 6 years ago

Changing the endpoint to /api/v2/status. It's more generic/reusable. At some point the webinterface may want to ask the broker for the status of other things as well before it starts an upload, so we may someday add additional parameters to the response. For now this is just going to come back like this:

{
    available:  true
}

or this:

{
    available:  false
}
CKH4 commented 6 years ago

That sounds like a much better naming idea. I'm glad these ideas are being worked on now during the beta rather than later.

rfornea commented 5 years ago

Taylor has designed a splash page for this. It's on Zeplin.

We could check the /status endpoint as soon as the user goes to oysterstorage and when the user clicks "Upload a File" we could take them to the splash page.

Another thing we could do is just grey out the "Upload a File" button so they can't click it in the first place, and if they manually try to go to the /upload-form page, we take them to the splash page.