-
-
Notifications
You must be signed in to change notification settings - Fork 499
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 optimization #996
Comments
I've never experienced what you describe, even on devices with low resources such as my phone. Can you provide a screenshot of the kind of dashboard you're describing and list the specs of the computer rendering it in your web browser? |
Your code list all the output/input so I if have 50 input and there're 50 widget, the HTML page will list 50 times of that 50 inputs which increase the HTML size a lot. |
You likely don't have 50 inputs nor 50 widgets on your dashboard. I'm asking for you to demonstrate the issue you say you have. |
Currently, I have 16 inputs mostly wireless(Mijia, FLowercare). Flowercare alone has 5 channels--thus it will list as 5 inputs. We're having 50+ soon as in a greenhouse, we'll have up to 6 soil moisture + other sensors. There's no problem to open it from my laptop locally. But I try to remote it that come the problem of dashboard exceed 2.5MB(html, javascript...). I am trying to find a way to optimize it. |
I could add a dashboard option "lock dashboard" which would remove the widget option HTML from the page. |
I just added the ability to lock dashboards. If you upgrade to master, you can try it out before release. If you do, let me know what kind of performance improvement you see and perhaps compare the number of source lines when locked and unlocked. |
Just pushed another change that further reduces the size by removing the Add Widget dropdown at the bottom when locked. |
When locked, most of the input widgets are not displaying any image or data, the graph are not displaying any data maybe javascript issue. The output widget is ok. |
That's not happening for me. You're going to have to provide a bit more information: JS errors, browser inspection, etc. |
Thanks. I just committed a fix. |
The error still happen on existing widget(I tried both widgets that you updated). The following error occurred when add widget in dashboard.
|
the unlock html file of my dashboard is 1 MB, now it's 270K in locked mode, so it's nearly 75% decrease in size. That's fantastic |
Did you upgrade to master? |
After I am back from lunch and restart the service(both Mycodo and flask), it works ok now. |
I see the dashboard is getting very heavy due to loading of all the output options, inputs,....
I think we should have two modes, ie display and edit, where in display mode only the display items are seen and loaded.
Do you have any other suggestion?
One more thing, I see that the dashboard depends heavily on the API(which i find it very good) so is it feasible to separate the dashboard into another app(multi tier) so that we can remotely manage main Mycodo system?
The text was updated successfully, but these errors were encountered: