I can't add a widget to a dashboard
-
@tomg Do you see any error on the browser console on this operation?
-
@jkandasa said in I can't add a widget to a dashboard:
@tomg Do you see any error on the browser console on this operation?
Are you referring to Web Developer/Web Console in Firefox? I just went there and found the following:
XML Parsing Error: not well-formed Location: http://192.168.2.8/languages/mc_locale_gui-en_us.json Line Number 1, Column 1: mc_locale_gui-en_us.json:1:1 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys util.js:224:33 XML Parsing Error: no root element found Location: http://192.168.2.8/mc/rest/dashboard Line Number 1, Column 1:
The first XML error was there when I opened the console. The second error happened right after I added a new widget (which I knew wouldn't stay after I went to another dashboard).
Let me know if you need more info.
By the way, I had the same problem with MC 1.2.0.
-
@tomg can you give the following details?
Status >> About
Clear cache once, https://forum.mycontroller.org/topic/47/gui-caching-issue-problem -
@jkandasa said in I can't add a widget to a dashboard:
@tomg can you give the following details?
Status >> About
Clear cache once, https://forum.mycontroller.org/topic/47/gui-caching-issue-problemI don't see a "Status/About" in Firefox or Chrome. However, the Firefox "Help/About Firefox" shows "Firefox Quantum 61.0.1 (64-bit)" and the Chrome "Help/About Google Chrome" shows "Version 68.0.3440.75 (Official Build) (64-bit)". Is that the info. you wanted?
I cleared the Chrome cash as you described in the forum, but that didn't solve the problem. I also cleared the cached in Firefox (Options/Privacy & Security/Cookies and Site Data/Clear Data/Cached Web Content), but that didn't solve the problem.
-
@tomg I am sorry, I asked to see
Status >> About
in MyController page. -
@jkandasa said in I can't add a widget to a dashboard:
@tomg I am sorry, I asked to see
Status >> About
in MyController page.Here it is:
MyController Version 1.3.0.Final Database schema revision 1.04.03 - 2018 Jul 01 Database type H2 database embedded Database version 1.4.194 (2017-03-10) Git commit:branch e1a31b7751172fe8a910424891c927a533b7c232:master Built on 2018-07-30T11:46:48+0530 Build JDK 1.8.0_172 Build tool Apache Maven 3.5.0 Java virtual machine specification VM vendor Oracle Corporation VM name Java HotSpot(TM) Client VM VM version 1.8.0_172-b11 Java home /opt/jdk1.8.0_172/jre Operating system Operating system Linux Architecture arm Version/Kernel 4.14.52-v7+ Location /home/pi/mycontroller/
I hope you see something I can fix!
-
@tomg I do not see all default configurations only.
Can you check network tab and console tab when you save your changes on the dashboard? -
@jkandasa said in I can't add a widget to a dashboard:
@tomg I do not see all default configurations only.
Can you check network tab and console tab when you save your changes on the dashboard?In the Chrome browser I did the right-click/Inspect, then Console tab, and all I see is this error:
Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
There were no new messages in the Console tab when I saved a new widget, that subsequently disappeared when changing between dashboards.
The Network tab has a lot of stuff in it and I'm not sure what to look for. Here is a screenshot of the top of the data (it scrolls down a long way):
-
@tomg ok, I do not see any issue on this console. I do not get the root cause of this issue. can you send your database to my email address? jkandasa at gmail dot com
-
@jkandasa said in I can't add a widget to a dashboard:
@tomg ok, I do not see any issue on this console. I do not get the root cause of this issue. can you send your database to my email address? jkandasa at gmail dot com
I just emailed you my database. It isn't too big (1.6mb).
Thanks much for looking into this problem!
-
@TomG Thanks for the database, I found the issue and created a ticket in GitHub to track.
-
@jkandasa said in I can't add a widget to a dashboard:
@TomG Thanks for the database, I found the issue and created a ticket in GitHub to track.
Thank you very much for your hard work on this. Is there anything I can do to work around this problem (other than making additional dashboards, or simplify my custom button widgets)?
I know nothing about Java programming, but it appears the solution is to increase the size of the VALUE2 array or to make it dynamically sized (if possible). Could you make the size of this array a setting so everyone that doesn't have this problem won't have to pay the price of the additional memory that this fix will require (and it wouldn't be a hard coded size that someone will run into sooner or later)? Perhaps the additional memory isn't that big of an issue.
-
@tomg Thank you! For now no workaround, other than creating a new dashboard.
I plan to take off dashboard configuration from the database(keep it as a JSON file.). This option will remove this restriction. -
@jkandasa said in I can't add a widget to a dashboard:
@tomg Thank you! For now no workaround, other than creating a new dashboard.
I plan to take off dashboard configuration from the database(keep it as a JSON file.). This option will remove this restriction.:clapping_hands_medium-light_skin_tone: :clapping_hands_medium-light_skin_tone: :clapping_hands_medium-light_skin_tone:
-
-
@jkandasa said in I can't add a widget to a dashboard:
@tomg I have added fix for this issue and this change is available in the SNAPSHOT version. Kindly check it on this version and let me know.
Thank you!NOTE: Once you upgrade, you cannot go back to the previous version(without old backup)
The snapshot worked great! I was able to combine my two dashboards (that I made to work around the problem) into one dashboard without any problems.
Is the dashboard configuration in a JSON file available somewhere?
This issue was important to me not for just one dashboard, but I plan to have several dashboards of similar complexity and artificially splitting up dashboards made the user interface more complex and confusing.
I'm surprised I'm the first person to report this problem. Perhaps other people just lived with the limitation and added dashboards or I'm pushing the boundaries on custom button widgets.
I'd like to point out to everyone listening, that about one week after I reported a problem, the developer provided a fix. I certainly wouldn't expect this level of service all the time, but this is a level of service you won't see from most commercial products. I'll definitely support MyController.org (and MySensors.org) with an annual donation. You should support them too if you find value in these products. I'm sure any amount would be appreciated. FYI, I don't have any connection to these two organizations other than as a satisfied user.
-
@tomg Thank you for your support!
Please note: I am working on this project in my spare time. Sometimes you may expect a long delay.Back to the main query:
Yes, At this time we have dashboard configuration in two places,- Database - Keeps dashboard name and root layout details
- JSON file - Keeps widget configurations
This JSON file will be kept under
myconteller/conf/resources/dashboards/
, NOTE: You should not change the file name. -
@jkandasa It doesn't look like I'll be editing either of these to dashboard configuration sources by hand. :smiling_face_with_open_mouth_smiling_eyes:
Thanks again for your hard work. I'm look forward to the final release of 1.4.0.
-
@tomg 12 hours ago I have updated a patch to fix dashboard deletion issue, Kindly move to the latest SNAPSHOT version.
-
@jkandasa Thanks much.