Giter VIP home page Giter VIP logo

Comments (3)

paulotruta avatar paulotruta commented on August 24, 2024

Would be cool to have some reactive functionality here indeed. What would you recommend we do here?

Maybe we don't need to go full-fledged on it and use some simple javascript to refresh the status once in a while?

from api.

inverse avatar inverse commented on August 24, 2024

True it could poll for state transitions :)

from api.

paulotruta avatar paulotruta commented on August 24, 2024

I would like to push this forward. The "wrapped client apps" experiments I've been doing lately would really benefit from this to look even more "native". Here's some context on what resources we have to work with to achieve this:

  • Internally at the Controller Level and using some helper functions, the dashboard already queries for information about the edgeapps to render the page.
  • Each app has an id (in unique slug string form), and status that can be checked. All apps available are returned in this list (even the ones the user didn't run anytime yet). The statuses available represent the states of:
    • running but offline
    • running and online
    • not running (off)
    • not installed

Here's my proposal:

  • For the page to be able to periodically refresh the status, we should provide an API endpoint (that responds with JSON data, and that can be called by the JS part every x seconds to refresh the status). This should not be super costly in terms of performance and easier to do than implementing a totally reactive framework here.
  • We can create a simple JS in a file that is only loaded on the edgeapps page and pools for the status report, and updates each of the divs that contain each app in the page, according to the new received status. Because these statuses as the page has them are present as css classes in the html elements of the edgeapps page, we can fairly easily obtain this information and compare it to the new status just pulled, and only update the DOM when really necessary.
  • Another option is to transform the single edgeapp card and subsequently the edgeapps list container into a WebComponent type of implementation. This probably would take a bit of experimentation but could give us knowledge to revamp the rest of the dashboard going forward to have a more dynamic behaviour (no need for page refreshes).

So... what do you think? :)

On the wild side of things, if a reactive framework would really benefit the project (pwa, super fast loads, auto status updates, more goodies with intefaces!), we could also explore this although I suspect we would have to totally ditch the current dashboard templates and start from scratch (Here's the React version of our dashboard design kit)

from api.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.