-
Notifications
You must be signed in to change notification settings - Fork 60
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
Improve EOSdash. #417
base: feature/config-nested
Are you sure you want to change the base?
Improve EOSdash. #417
Conversation
e36c529
to
cc29506
Compare
Ready for review and merge. |
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.
I'm very excited to check it out, can you upload footer.py as well?
ModuleNotFoundError: No module named 'akkudoktoreos.server.dash.footer'
Sorry, test for EOSdash is definitively missing. Module added now. |
after starting eos on windows accessing http://localhost:8503/ i get the 404. access to eosdash does work (http://localhost:8504/) very nice. Documentation link should open in a new tab. |
Please wait a little bit and refresh. It takes some time for EOSdash to start up. Maybe we have to add a longer timeout here until display of the page. |
I did wait several minutes. same result. some kind of console output like Loading .... | ... Loading finished would be great. |
Now used themed content. Should be better readable.
Footer needs to wait for alive connection result. Now a loading symbol is displayed for the first 5 seconds. |
fb46c19
to
4ab0561
Compare
sorry but it does not start anymore. same 404 on 8503 and http://localhost:8504/ gets a "Internal Server Error" without any further debug information. I did delete all config/cache folders before starting it. |
Please assure you did install all required packages.
If it still does not work, please only start eosdash and provide the error output: .venv/bin/python src/akkudoktoreos/server/eosdash.py --reload True |
|
@NormannK, Please try the new version. |
done. http://localhost:8504/ does load again. looks good. |
Footer is ok. EOS is not running and this is the lengthy error message. Should vanish when you start EOS. Did you also start EOS? |
38fee88
to
e5ab66d
Compare
@NormannK, please try the new version. Should now detect if a server is already running. Hopefully this helps. |
64c7fa2
to
1c29f85
Compare
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 dashboard changes + cache improvments. Could already drop the demo (force of demo settings) and display the real system, probably have to adjust the test then a little.
I would probably also go as far as separate the backend/frontend more (different repos) as the dependencies and assets start diverging. But that's a different discussion/PR.
Only remark I have: Let's let the user decide about their app startup (systemd, docker-compose, initXYZ, ...) and we can drop a dependency and remove some controlling code. Currently it would block startup if I have the server-file open for some reason (e.g. development).
@@ -171,9 +90,26 @@ def start_eosdash() -> subprocess.Popen: | |||
access_log = args.access_log | |||
reload = args.reload | |||
|
|||
# Check if EOSdash process is already running |
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.
init system
@@ -912,28 +1028,25 @@ def site_map() -> RedirectResponse: | |||
|
|||
# Keep the proxy last to handle all requests that are not taken by the Rest API. | |||
|
|||
if config_eos.server.startup_eosdash: |
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.
did it break the proxy?
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.
did it break the proxy?
Proxy operation is not related to startup_eosdash. EOSdash may be started by other means.
src/akkudoktoreos/server/eos.py
Outdated
@@ -1004,6 +1117,21 @@ def run_eos(host: str, port: int, log_level: str, access_log: bool, reload: bool | |||
# Make hostname Windows friendly | |||
if host == "0.0.0.0" and os.name == "nt": | |||
host = "localhost" | |||
|
|||
# Check if EOSdash process is already running |
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.
init system
""" | ||
# Make hostname Windows friendly | ||
if host == "0.0.0.0" and os.name == "nt": | ||
host = "localhost" | ||
|
||
# Check if EOSdash process is already running |
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.
init system
dd36445
to
4c54550
Compare
Demo is for situations where we do not have a full config or the config is invalid - e.g. first time use. Maybe the Demo button can be made configurable, so a user can just decide it not to be shown. |
EOSdash would not start up if another EOSdash is already running on the same host. This is by intention. Can you explain why this is a problem? |
With the current implementation it also does not start up if I access the file in any other way, e.g. vim ...py . Let's keep any advanced startup handling to the OS. |
Ok, I see. The criterium for the correct process is to weak. |
* Move the caching module to core. Add an in memory cache that for caching function and method results during an energy management run (optimization run). Two decorators are provided for methods and functions. * Improve the file cache store by load and save functions. Make EOS load the cache file store on startup and save it on shutdown. Add a cyclic task that cleans the cache file store from outdated cache files. * Improve startup of EOSdash by EOS Make EOS starting EOSdash adhere to path configuration given in EOS. The whole environment from EOS is now passed to EOSdash. Should also prevent test errors due to unwanted/ wrong config file creation. * Allow to check server process startup by health status Both servers now provide a health endpoint that can be used to detect whether the server is running. This is also used for testing now. * Add administration endpoints to control caching from REST API. * Improve test support (to be able to test caching) - Add system test option to pytest for running tests with "real" resources - Add new test fixture to start server for test class Signed-off-by: Bobby Noelte <[email protected]>
Make EOSdash use UI components from MonsterUI to ease further development. - Add a first menu with some dummy pages and the configuration page. - Make the configuration scrollable. - Add markdown component that uses markdown-it-py (same as used by the myth-parser for documentation generation). - Add bokeh (https://docs.bokeh.org/) component for charts - Added several prediction charts to demo - Add a footer that displays connection status with EOS server - Add logo and favicon Update EOS server: - Move error message generation to extra module Signed-off-by: Bobby Noelte <[email protected]>
Make EOSdash use UI components from MonsterUI to ease further development.
the myth-parser for documentation generation).
Update EOS server:
For feature branch: feature/config-nested. Based on #431 (to be merged first)