OpenAgricultureFoundation / openag_ui

UI for OpenAg food computers
GNU General Public License v3.0
53 stars 27 forks source link

Clear connection issue banner if a good connection comes back #118

Open gordonbrander opened 7 years ago

gordonbrander commented 7 years ago

Or just make it close-able, I suppose?

yeliztaneroglu commented 7 years ago

Please Could you give me more information ? Thank you. @gordonbrander

gordonbrander commented 7 years ago

@yeliztaneroglu yes!

scripts/app.js has a yellow banner that will display any global app errors. One type of error that this banner will show is an error for a dropped HTTP connection.

The banner module is defined in scripts/common/banner.js. It can display several kinds of banners, including AlertDismissable (can be dismissed by user) and AlertRefreshable. Currently HTTP connection errors coming from environment are mapped to AlertRefreshable (in TagEnvironment). These should probably be AlertDismissable.

Let me know if you want more details. I am happy to coach you through this change. ARCHITECTURE.md in the repository should also have some helpful info for how the UI works.

yeliztaneroglu commented 7 years ago

How to developing the openag_ui without a working food computer ? @gordonbrander

yeliztaneroglu commented 7 years ago

Excuse me @gordonbrander, I wonder if I asked a wrong question ?

gordonbrander commented 7 years ago

@yeliztaneroglu no, sorry, just very slow to respond because of US holidays! The easiest way is if you have a Raspberry Pi. The UI can run with Raspberry Pi even if you don't have a Food Computer.

If you don't have a Raspberry Pi, we can get creative and install CouchDB on a laptop, I think (but I haven't tried this approach yet).

yeliztaneroglu commented 7 years ago

thank you @gordonbrander , I will buy a Raspberry Pi to myself :) Which Raspberry Pi product do you suggest me to buy ?

gordonbrander commented 7 years ago

You'll want a Raspberry Pi 3 and an Arduino Mega.

gordonbrander commented 7 years ago

This is actually more difficult than I expected. We need an ID system for alert banners so you can clear a banner by id without accidentally clearing some other banner that was thrown by some other component.

gordonbrander commented 7 years ago

I'm creating a workaround for now.