I am trying to understand a bit about HTML and customising pages. I see in the Dashboard, Index.html the line
<p><span id="Forecast"></span></p>.
Where does "Forecast" get the data?
I hope this makes sense.
Jeff
Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
"Forecast" in Dashboard
Moderator: mcrossley
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: "Forecast" in Dashboard
The function updateDisplay in dashboard.js has this code:
So any elements on the page with an id that matches one of the keys in the json data created by MX gets updated to the value for that key. You can see the json data using this URL in your browser:
http://<MX IP address>:8998/api/data/currentdata
You'll see that "Forecast" is one of the keys in the data.
Code: Select all
// Get the keys from the object and set
// the element with the same id to the value
Object.keys(data).forEach(function (key) {
var id = '#' + key;
if ($(id).length) {
$(id).text(data[key]);
}
});
http://<MX IP address>:8998/api/data/currentdata
You'll see that "Forecast" is one of the keys in the data.
Steve
-
- Posts: 14
- Joined: Mon 11 Jan 2016 8:32 am
- Weather Station: Davis Vantage Pro2 with FARS
- Operating System: Windows 10
- Location: Milton Keynes
Re: "Forecast" in Dashboard
Hi Steve
Thank you.
I am trying to do a bit more customising of the Dashboard.
Jeff
Thank you.
I am trying to do a bit more customising of the Dashboard.
Jeff
-
- Posts: 14
- Joined: Mon 11 Jan 2016 8:32 am
- Weather Station: Davis Vantage Pro2 with FARS
- Operating System: Windows 10
- Location: Milton Keynes
Re: "Forecast" in Dashboard
This is my customised Gauges page for use on tablets on my home network.
Jeff
Jeff
You do not have the required permissions to view the files attached to this post.