-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: Add static file serving support in webconsole #191
feat: Add static file serving support in webconsole #191
Conversation
@patriciareinoso, to address the issue with the |
@patriciareinoso, does this PR replace #143? |
b23f2e7
to
24152f4
Compare
yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good, I got a couple of comments to make the PR make more sense to people not familiar with the change
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
Co-authored-by: gab-arrobo <[email protected]> Signed-off-by: Patricia Reinoso <[email protected]>
Co-authored-by: Guillaume Belanger <[email protected]> Signed-off-by: Patricia Reinoso <[email protected]>
Co-authored-by: Guillaume Belanger <[email protected]> Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
2139ffb
to
1ce30a7
Compare
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. This PR allows to have a UI for Webui (optionally).
Overall, I do not have objection in merging. Is it like Canonical copies list of static files before compilation?
|
The solutions is generic so any set of frontend static files would work. At Canonical, we have a frontend implementation but its code is not meant to be added to this repo. |
@gab-arrobo @thakurajayL can we move forward and merge this? |
I am still travelling and do not have my laptop with me to take another look at it. As of last time I checked the PR, everything looked good to me. One thing that I am wondering how it will be handled is about the process to provide support/guidance to users who want to use this capability/feature? @thakurajayL @gruyaume what are your thoughts about this? |
For people using our distribution of SD-Core with our frontend, we have a "bug" link in the ui that points to our issue tracker. If we find that the bug is with the underlying webui code here, we'll address it. For users who want to use their own frontend, I encourage to look at how we're doing it. This repo is publicly accessible, and I'm happy with other people using our approach. Patricia also added lines in the README to explain how to use webui with any static web files. |
Can you confirm if you addressed the comments from Gabriel. so that it can be merged. |
yes, all the comments from Gabriel were taken into account |
All comments addressed and Gabriel is on PTO. Can not hold changes for long.
Description
Usage
Webconsole can optionally serve static files, which constitute the frontend part of the application.
To build webui with a frontend, place the static files under
webconsole/ui/frontend_files
before compilation.To build the webconsole including the UI option:
Access the UI at:
The
webconsole/ui/frontend_files
directory contains an example of a basic static html file that looks like this:Rationale
Canonical builds its own UI for WebConsole (we call it NMS), which is currently operated as a standalone service. The goal is for us to be able to build and deploy WebConsole as one service/container, including both the backend and front end.
The NMS static files will be served by the UI service added.
Code explanation
The
AddUiService
method will be used from eitherbackend/webui_service/dummy_ui_service.go
orbackend/webui_service/ui_service.go
depending on the use of theui
build tag during the Go build process.