Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard design #2

Open
Geal opened this issue Aug 27, 2018 · 7 comments
Open

dashboard design #2

Geal opened this issue Aug 27, 2018 · 7 comments

Comments

@Geal
Copy link
Owner

Geal commented Aug 27, 2018

there is none :D
Just an accumulation of graphs. Let's find a way to make it look nice! I'm open to any idea and pull requests here. There's only one thing that will stay for now: using chartjs to display the data (for performance reasons). But any graphical changes to the graphs are fair game :)

@Vengarioth
Copy link

Hey @Geal, i'd love to contribute to the frontend. But i'd rather put it into it's own repository, make a webpack/babeljs pipeline and use reactjs.

@Geal
Copy link
Owner Author

Geal commented Aug 27, 2018

why in another repository? I'm not really attached to the current frontend code (I mean, look at it :D), so it should be fine.
A few things that I'd care about though:

  • I'd like a way to embed the frontend inside the executable, to avoid carrying assets in folders everywhere (right now it's done with include_str)
  • the interface should feel fast, and the current way of downloading all the new points and updating all the charts at once will not work well once we get a lot of points, so maybe there's something to do with promises and async requests?

@Vengarioth
Copy link

Another repository because it would come with it's own unit tests and build steps.

The produced artifact would be a single js file with all needed ressources embedded into it. just <script src="..."> it into an html page and it works (i would not add dependencies over the web since dashboards often run on boxes without web access). So yes, this file can be embedded into the executable. It should also be possible to directly embed it into an html wrapper.

About the data management, it absolutely should be async and at best should use the same API accessible to everyone using it. My usual aproach is axios and redux, if data changes come in too frequent for redux then build something new with the react context api.

@Vengarioth
Copy link

started building it at https://github.com/Vengarioth/grad-frontend can transfer the repo to you if you like

@Geal
Copy link
Owner Author

Geal commented Aug 27, 2018

it can live there for now, it's fine. How would you integrate that with the cargo build? Considering that the file should be integrated when building, even in a cargo install

@Vengarioth
Copy link

Vengarioth commented Aug 27, 2018

i would commit the compiled js file into this repo, it should only be updated with new releases of the frontend project, at some point we can publish the frontend on either npm or cargo(packaged in a rust lib).

Edit: but the heavy lifting / build process into a rust accessible project should be in the other repo.

@Geal
Copy link
Owner Author

Geal commented Aug 27, 2018

alright then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants