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

Run as Webapp for easier Docker portability #43

Open
BunteStadt opened this issue Jan 25, 2025 · 1 comment
Open

Run as Webapp for easier Docker portability #43

BunteStadt opened this issue Jan 25, 2025 · 1 comment

Comments

@BunteStadt
Copy link

Hallo

i love the features of easy deployment when working on docker. Howevery every time some GUI parts are involved, alot of ease of use is gone as i need to make sure a X Server is setup and running correctly on the host.
A Webapp would be way easyer to interact with, as nearly every host has a webbrowser.

Sadly i have only very limited knowledge in this part. I tried to follow the instructions here: https://github.com/splintered-reality/py_trees_js#usage
But could not make it work.

I would like to reach one of these to goals and am looking for assistance to achive them.

  1. Right now i use NiceGui to buid my dashboards. I would love to have an easy way to integrate the Tree Viewer inside the NiceGUI website.
  2. As it might be easier to achive. I would like to run a node that automaticly hosts a website under localhost:1234 which i can open and interact with the viewer as in the gui version.

It would help me alot if someone could give me some recomendations or advice on how to achive this.

@stonier
Copy link
Member

stonier commented Jan 25, 2025

Right now i use NiceGui to buid my dashboards. I would love to have an easy way to integrate the Tree Viewer inside the NiceGUI website.

I'm no expert on web things, but ... some ideas:

  1. You'll need something like QWebEngineView in which you can insert the app that includes the javascript application (e.g. see index.html)

  2. For quick testing - write some python code in your main around NiceGui to send the app some test tree data (that's what I did in the pyqt demo). QWebEngineView has some mechanism for interacting with the app inside it from the python main. NiceGui might or might not have this capability. If not, that's ok. Just proceed to step 3.

  3. Get yoru nicegui app to interact with an external tree. Either drop websockets in your app that your external tree can communicate with or setup python communications of some sort in your python main (this would then redirect the comms to the internal js app).

If that's all possible with NiceGui, it'd be nice to upgrade the reference demo here. It'd have no reliance then on having an X server (or equivalent) in the environment.

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