After losing a few hours I would say that the buttons are not showing on my netbook as in this post https://cumulus.hosiene.co.uk/viewtopic.php?f=4&t=6471. Can't see an easy way around it..... unless I copy all the Cumulus data files to another PC, install Cumulus, make up the NOAA files and copy them back and upload.The view menu in Cumulus is where the items are that you need to use to create the NOAA reports
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
JavaScript 'Viewer' of Cumulus generated NOAA style reports
Moderator: daj
-
apple8
- Posts: 141
- Joined: Sun 21 Aug 2011 2:26 am
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Location: Sydney. Australia
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
But, as I said in that thread, I reduced the default height of the NOAA windows; they're now 480 pixels high. What is your screen resolution?apple8 wrote:After losing a few hours I would say that the buttons are not showing on my netbook as in this post https://cumulus.hosiene.co.uk/viewtopic.php?f=4&t=6471.
Edit: I see from your web site that you are still using build 1022. I reduced the height of the windows in build 1024.
Steve
-
apple8
- Posts: 141
- Joined: Sun 21 Aug 2011 2:26 am
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Location: Sydney. Australia
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
Thanks, that got it. Downloaded latest version, all good.I see from your web site that you are still using build 1022
-
apple8
- Posts: 141
- Joined: Sun 21 Aug 2011 2:26 am
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Location: Sydney. Australia
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
I think that is my next challenge. ie adding it to the Cumulus menu?wait until you have made your 'themed' page
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
That - plus modifying / creating a page that matches the rest of your site.apple8 wrote:I think that is my next challenge. ie adding it to the Cumulus menu?wait until you have made your 'themed' page
See the (correct) PHP page / Intermediate level, It's really not too difficult - honest
https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=5754
......................Imagine, what you will KNOW tomorrow !
-
apple8
- Posts: 141
- Joined: Sun 21 Aug 2011 2:26 am
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Location: Sydney. Australia
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
Wow I did itIt's really not too difficult - honest
I thought it was going to be beyond me, thanks beteljuice.
-
radelrama
- Posts: 12
- Joined: Fri 09 Mar 2012 10:42 am
- Weather Station: Ws-0101
- Operating System: Windows 7 x64
- Location: Sierre
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
I'm trying to implement history graphs into this nice and simple report solution. To keep it simple I thought of a workaround:
- Script Cumulus to generate monthly history graphs, this every 1st of month just after midnight
- Script Cumulus to generate yearly history graphs, this every 1st of january just after midnight
This would result in one or several image files like Temp_NOAAMO0312.png or Temp_NOAAYR2012.png.
Even though my knowledge of javascript is equal to zero, by playing with noaarep.js I am able to add an image after the report text
, on line 238:
document.getElementById("theReport").innerHTML = repdat + " <br><img src=prev.png /> "; // o/p the report
How do I get the info month/year, so I could add something like
If month_button pressed Then .innerHTML = repdat + " <br><img src=Temp_NOAAMO" + month_pressed + according_year + ".png /> "
Else .innerHTML = repdat + " <br><img src=Temp_NOAAYR" + year_pressed + ".png /> "
Studying beteljuice's code, but can't figure out...
- Script Cumulus to generate monthly history graphs, this every 1st of month just after midnight
- Script Cumulus to generate yearly history graphs, this every 1st of january just after midnight
This would result in one or several image files like Temp_NOAAMO0312.png or Temp_NOAAYR2012.png.
Even though my knowledge of javascript is equal to zero, by playing with noaarep.js I am able to add an image after the report text
document.getElementById("theReport").innerHTML = repdat + " <br><img src=prev.png /> "; // o/p the report
How do I get the info month/year, so I could add something like
If month_button pressed Then .innerHTML = repdat + " <br><img src=Temp_NOAAMO" + month_pressed + according_year + ".png /> "
Else .innerHTML = repdat + " <br><img src=Temp_NOAAYR" + year_pressed + ".png /> "
Studying beteljuice's code, but can't figure out...
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
I did say you're on your own with this code
... but the easiest way is to have a seperate directory (eg. graphs/) with the files names exactly the same as the corresponding reports. - except for the extension type of course !
Again, for completeness and uniformity in html create a new <div id='repGraph'></div> underneath 'theReport' <div> - although you can use the <br /> as you have done.
Then in the script, something like:
NB: No existance check of the graph takes place ! - it could be done but would need extra code to call the Ajax routine yet again in a slightly different way.
The easiest way to handle this is to probably generate a graph every day (just like the month / this year reports) even though it will be incomplete, it will be current and available
... but the easiest way is to have a seperate directory (eg. graphs/) with the files names exactly the same as the corresponding reports. - except for the extension type of course !
Again, for completeness and uniformity in html create a new <div id='repGraph'></div> underneath 'theReport' <div> - although you can use the <br /> as you have done.
Then in the script, something like:
Code: Select all
document.getElementById("theReport").innerHTML = repdat; // o/p the report
repImageHolder = document.getElementById("repGraph"); // the new graph <div>
if(repImageHolder){ // if the div exists
repImageUrl = url.replace("txt", "png");
repImageHolder.innerHTML = "<img src = \"graphs/" +repImageUrl+ "\" />";
}
}
The easiest way to handle this is to probably generate a graph every day (just like the month / this year reports) even though it will be incomplete, it will be current and available
......................Imagine, what you will KNOW tomorrow !
-
radelrama
- Posts: 12
- Joined: Fri 09 Mar 2012 10:42 am
- Weather Station: Ws-0101
- Operating System: Windows 7 x64
- Location: Sierre
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
thanks!!!
document.getElementById("theReport").innerHTML = " <br><img src=" + url.replace("txt","png") + " /> " + repdat; // o/p the report
document.getElementById("theReport").innerHTML = " <br><img src=" + url.replace("txt","png") + " /> " + repdat; // o/p the report
You do not have the required permissions to view the files attached to this post.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
You are 'lucky' the lookup routine checks the full file names, else there would be a problem with graph and report names clashing !
Also it's 'handy' that "theReport" <div> wraps and your images are the right size.
You need a <br /> between your image and the report. (Why the initial [space]<br /> ?)
PS. Why is there no location information in your reports ?
Also it's 'handy' that "theReport" <div> wraps and your images are the right size.
You need a <br /> between your image and the report. (Why the initial [space]<br /> ?)
Code: Select all
document.getElementById("theReport").innerHTML = "<img src=" + url.replace("txt","png") + " /><br />" + repdat; // o/p the report......................Imagine, what you will KNOW tomorrow !
-
radelrama
- Posts: 12
- Joined: Fri 09 Mar 2012 10:42 am
- Weather Station: Ws-0101
- Operating System: Windows 7 x64
- Location: Sierre
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
You are right, corrected...beteljuice wrote: You need a <br /> between your image and the report. (Why the initial [space]<br /> ?)
Didn't enter it in Cumulus settings, don't want it to be shown...beteljuice wrote:PS. Why is there no location information in your reports ?
Just finished the AutoIt3 script which every night after midnight generates
- graph30.png (last 30 days graph)
- NOAAMOmmyyyy.png (last month graph)
- NOAAYRyyyy.png (this year graph)
If anyone's interested in source code, let me know...
-
roy_fox
- Posts: 4
- Joined: Fri 12 Nov 2010 9:47 pm
- Weather Station: PCE FWS 20
- Operating System: Windows 7 32 and 64bit
- Location: Germany
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
I have integrated the NOAA reports to my page.
It works fine. http://www.luckscher.de/Wetter/noaa_test.htm
But when I use IE8, then it looks wrong.
Has anyone a hint, to solve the problem?
Thanks.
It works fine. http://www.luckscher.de/Wetter/noaa_test.htm
But when I use IE8, then it looks wrong.
Has anyone a hint, to solve the problem?
Thanks.
You do not have the required permissions to view the files attached to this post.
- mcrossley
- Posts: 14384
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
IE8 (and firefox4) do not fully support the <pre> tag, they do not honour line breaks. You can add word-wrap and wrap options to these browsers respectively, but I think that will just wrap the text at the edge of the iFrame rather than where the line breaks are.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
I didn't know that ...IE8 (and firefox4) do not fully support the <pre> tag,
......................Imagine, what you will KNOW tomorrow !
- mcrossley
- Posts: 14384
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
Yeah, makes it a bit awkward doesn't it
parse the report and sub <br /> for line breaks ?
Or upgrade to a decent browser
Or upgrade to a decent browser