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

Yet more gauges

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

gemini06720 wrote:
mcrossley wrote:The LCD displays are hard coded to be right justified at the moment.
Indeed, I looked through the code of the 'steelseries.js' and found the location of the 'hard coded' right justification of the text ... a request for less 'hard coding' and more flexibility would really really be appreciated ... and you have that direct communication/connection with the holy designer... :mrgreen:
Ray, the problem is he is migrating the Java gauges over to Javascript. This is a big job which he does in his spare time. He will not want to go adding functionality into the JS version without implementing it in the Java version first. As it stands the JS version will lag behind the Java version for some time.

Now, if I come up with a cool suggestion that grabs his attention, he does sometimes put it in straight away (see the scrolling LCD he has now implemented in the JS version). But for run of the mill stuff like justification, I cannot see being done in the near term. I imagine he wants the keep the two versions as similar as possible whilst he is in the long slog the porting process.

The JS code is evolving too, I've made some suggestions about updating style and syntax that I see he has implemented in the latest version too. The current code has a number of 'issues' that should be resolved before tweaking features.

Now I have quite a lot of changes already to Gerrit's code to implement the current gauges. It is painful to carry these changes forward into each of Gerrit's new releases, so I am reluctant to go adding more customisation at this stage too. I guess I'm saying we've got what we've got for now, unless we come up with killer suggestions - and I think what we've got is pretty cool already 8-)
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yet more gauges

Post by gemini06720 »

Mark, the flexibility in the positioning of the texts was just a suggestion... But with this...
mcrossley wrote:...see the scrolling LCD he has now implemented in the JS version...
...there is no need for text justification... :) Will it be possible for you to use that feature?

Another question. Someone suggested the addition of a cloud base gauge. Do you have access to these gauges and could one of them be used for that purpose?
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Hi Ray, once I get the code back from yourself I'll look at updating the Gerrit's latest code which will give us the scrolling.

The linear gauges have been available for a while - see my demo page. I could use one for the cloud base, it's not difficult just a matter of priorities and time.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

I'm cross posting this from another thread on the forum, just in case people missed it:
One of the more recent changes to the gauge code means they will only work with the latest beta version of Cumulus.
Sorry, I hadn't realised this and made it clear, this is because it includes the new <#timeUTC> tag.

If you feel like making the v0-9 gauges work with version 1.9.1 of Cumulus, then edit gauges.js, and change line 630 from

var then = eval("Date.UTC("+cumulus.timeUTC+")");
to
var then = now;

and you should be good.
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Yet more gauges

Post by JimDantin »

mcrossley wrote:beteljuice is correct, the error checking in the script is very 'light' at the moment. Just deleting elements from the HTML is not sufficient, at the moment you also need to remove/comment out the relevant sections of code that refer to them.

Once I have a solution that functions as expected across the various different unit and nationalisation combinations, I do plan on making it more robust. One obvious addition would be to check for the existence of containers in the DOM before trying to use them. That way people can remove elements easily without having to worry about the code.
That's appreciated -- I have no significant experience in web design beyond simple HTML and Javascript. In the past, I found code I liked, modified/deleted, tried it out and moved on -- this one was a bit of a surprise. The gauges are SO nice, I just HAVE to include them! The amount of effort you guys are putting into developing a page design for the rest of us is amazing. Thanks.
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
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: Yet more gauges

Post by beteljuice »

Tip:
I don't know if <span> or <div> are being used as containers, but a temporary solution for you would be to 'hide' the container - to keep any page formatting you would have to 'replace' it with one of a similar size with whatever content you wanted.

The following assumes a <span> container:

Code: Select all

<span id="this_gauge" class="...         style="display: none;">content hidden no space reserved</span>
By using the style display code after any class declaration the container will not be displayed,
further it takes up NO space ! - the Javascript can still 'see' it and will 'process' it.

If you want to leave a blank 'hole' the right size, use:

Code: Select all

<span id="this_gauge" class="...         style="visibility: hidden;">content hidden, RESERVED space</span>
These should work unless the javascript is refreshing those properties during the Ajax loop.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

The gauges are <canvas> but they are wrapped in a <div> at the current version, but I was going to take the wrapper out for the next release as I don't actually use it :roll: but maybe I'll leave it in now :)
The next release of code will be smarter around the HTML content - you can delete whatever components you want and the rest will continue to function.
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Yet more gauges

Post by JimDantin »

beteljuice, you rock! :clap:

The HTML code was not quite like you used in the example, but the idea worked fine. Just before the three canvas lines, I changed
<td colspan='3' style="text-align:'left'">
to
<td colspan='3' style="display: none;">
and got this:
http://personalpages.bellsouth.net/j/d/ ... auges1.htm
Simple, clean, and the 4x2 layout shows up on my phone quite nicely.
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Yet more gauges

Post by gwheelo »

Has anyone translated SS "gauges.js" to language specific variables? Specifically I need French, Spanish, Catalan (hey - Meteotortosa), Dutch, and German.

George Wheelock
Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yet more gauges

Post by gemini06720 »

gwheelo wrote:Has anyone translated SS "gauges.js" to language specific variables? Specifically I need French, Spanish, Catalan (hey - Meteotortosa), Dutch, and German.
George, I have a partial translation to french ... a work in progress... ;)

For the time being, the 'gauges.js' script by itself has not (and will not) be translated into another language, but the texts (messages) appearing inside the gauges and with the graphic images have been moved into language variables - those variables have also been moved together near the top of the script. It will be up to the station operator to translate the language variables into his/her language.
User avatar
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: Yet more gauges

Post by beteljuice »

beteljuice, you rock! :clap:
I sometimes sway a bit after visiting my local hostelry :D , but I'm not sure I am to be congratulated for showing you how to hide Marks (very) hard work :roll:
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Yet more gauges

Post by gwheelo »

Ray-
George, I have a partial translation to french ... a work in progress..
When finished -I would appreciate a copy. It is indeed only those variables I need!

Anyone else working in other languages?

Again I am looking for Spanish,Catalan, French,German, and Dutch.

GW
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

George

I have put all the strings into a LANG 'object'. If you want multiple language support, then you will have to write a (external preferably) script, that just overwrites all those object properties and calls 'drawGauges()' which will then refresh all the gauges on the page.
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Yet more gauges

Post by JimDantin »

I just went live with the revised gauges web page. I edited all of the navigation links to point to my new gauges1.htm web page instead of the standard gauges.htm. That required editing every one of my web pages and changing the href in two places in each file (my web pages have navigation bars on the top and bottom). But, I'm a bit lazy, so here's how I did it . . .

Get the free utility program Replace Text from http://ecobyte.com/replacetext/ (there are probably other similar utilities, but I know this one works!). This program will do a search and replace on a group of files that you specify. It's a life saver in situations like this.

Make a backup copy of your \cumulus\web folder. The utility will save a backup copy of each file it processes, but let's be REALLY careful, OK? The utility is really easy to use, but I'll give you a quick tutorial.

Open the program.
Add a Replace Group.
Add files to the group -- select the "Use folder" option, navigate to the Cumulus folder and enter "*.htm" in the "Include File Filter:" box. Exclude any that you do NOT want to modify.
Make additional entries as needed for specific files that you want to process.
In the bottom of the screen, enter href="gauges.htm" in the Original Text box, and the name of your new file in the Replacement Text box (for me it was href="gauges1.htm")
Click on the"Start Replacing" icon
You are done.

Do a manual Web Update in Cumulus and upload any files that Cumulus doesn't know about. That's it.

Jim
Last edited by JimDantin on Sat 09 Jul 2011 9:21 am, edited 1 time in total.
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Yet more gauges

Post by meteotortosa »

gwheelo, I'm going to translate to català and spanish.
Weather in Tortosa (NE Spain), updated every 15'
Image Image
Post Reply