Page 11 of 17

Re: Reworked default websites

Posted: Mon 04 Dec 2023 7:17 am
by griffo42
Trevor

Thanks very much for your prompt reply to my request. I will have a look at it tomorrow at the earliest when, hopefully, I have a little more time available to do it.

I appreciate your help. I will let you know how I get on. I am a self-taught rank amateur when it comes to programming: I am an accountant by profession!

Best wishes,

Re: Reworked default websites

Posted: Mon 04 Dec 2023 9:18 am
by NeilThomas
griffo42 wrote: Sun 03 Dec 2023 11:38 pm @NeilThomas

There is an extra "on" in the rainfall area: see below circled in blue.

Screenshot 2023-12-04 092817.png

It looks to me that records.html is in need of an edit to fix.

Keep up the good work. :D :D
Hi all

The extra 'on's are on lines 171, 179 and 220 of the records.html file. Just remove them but leave a space at the end of the line otherwise there will be no gap between data and time & date.

Neil

Re: Reworked default websites

Posted: Mon 04 Dec 2023 5:59 pm
by bumpy
Hello

I've encountered a problem! I downloaded the Cumulus Public Dashboard using Neil Thomas' recent zip but I am left with a Dashboard empty of data. I realise that I need to make an adjustment to one line in the ws-extra.js file. So far so good but when I attempt to open the ws-extra file using notepad I get the response that there is an error in the file programme and I am denied access. If I cant amend the file because I am not able to access it, how can I alter the text line that is causing the problem.
Can anyone suggest a solution please?

Tony
www.farleighmeadows.co.uk

Re: Reworked default websites

Posted: Tue 05 Dec 2023 1:59 am
by griffo42
@NeilThomas
In further checking, I have found that the words "in", "on" and "at" are missing at the appropriate places in both the Records for this Year and Records for this Month pages as shown:
Screenshot 2023-12-05 110746.png
Screenshot 2023-12-05 110721.png
As a test and learning exercise for me, I have edited the lines 335 and 338 in records.js (as below) and these seem to achieve the desired result as can be seen in the above Records for this month (December) page above.
Screenshot 2023-12-05 110957.png
There may be a more professional or better way to achieve the looked for result: could you take it from there, please? :D :D

best wishes

Re: Reworked default websites

Posted: Wed 06 Dec 2023 11:12 am
by flort
Hi Neil,

I just had Developer Tools open and noticed it is throwing up an error on line 94 of ws-extra.js. I haven't seen it cause any issues but you might like to take a look at it.
ws-extra error.jpg
Regards,
Trevor

Re: Reworked default websites

Posted: Wed 06 Dec 2023 11:24 am
by bumpy
Help please.
Yet again I need to contact the forum for assistance.
I need to amend the ws-extra.js file with this amendment viz let dataPath = '';
Having accessed the file from Notepad and found Line 13 that needs amending adjusting, I am totally lost whether the amendment is an addition to the original text, a replacement for the whole line or possibly something else. I have tried several combinations but the CumulusMX Public Dashboard remains resolutely empty of any data.
I am obviously going wrong! Can someone enlighten me or perhaps copy me the correct and full text for Line 13?
Many thanks.
Tony
www.farleighmeadows.co.uk

Re: Reworked default websites

Posted: Wed 06 Dec 2023 5:47 pm
by NeilThomas
bumpy wrote: Wed 06 Dec 2023 11:24 am Help please.
Yet again I need to contact the forum for assistance.
I need to amend the ws-extra.js file with this amendment viz let dataPath = '';
Having accessed the file from Notepad and found Line 13 that needs amending adjusting, I am totally lost whether the amendment is an addition to the original text, a replacement for the whole line or possibly something else. I have tried several combinations but the CumulusMX Public Dashboard remains resolutely empty of any data.
I am obviously going wrong! Can someone enlighten me or perhaps copy me the correct and full text for Line 13?
Many thanks.
Tony
www.farleighmeadows.co.uk
Hi Tony.

Just change the variable to read as shown below:

Code: Select all

let dataPath=''
Note that that is two single quotes not just a double quote. The above then expects to find your data in the same place as your html files.

Neil.

Re: Reworked default websites

Posted: Wed 06 Dec 2023 5:49 pm
by NeilThomas
flort wrote: Wed 06 Dec 2023 11:12 am Hi Neil,

I just had Developer Tools open and noticed it is throwing up an error on line 94 of ws-extra.js. I haven't seen it cause any issues but you might like to take a look at it.

ws-extra error.jpg

Regards,
Trevor
Hi Trevor

I am aware of this but I believe I get it on the default Interface as well. I am not able to access the Interface at the moment so cannot confirm but I believe it its the case. I certainly doesn't seem to cause any issues for me. I'll check later in the week.

Neil

Re: Reworked default websites

Posted: Wed 06 Dec 2023 5:53 pm
by NeilThomas
griffo42 wrote: Tue 05 Dec 2023 1:59 am @NeilThomas
In further checking, I have found that the words "in", "on" and "at" are missing at the appropriate places in both the Records for this Year and Records for this Month pages as shown:

Screenshot 2023-12-05 110746.png
Screenshot 2023-12-05 110721.png

As a test and learning exercise for me, I have edited the lines 335 and 338 in records.js (as below) and these seem to achieve the desired result as can be seen in the above Records for this month (December) page above.
Screenshot 2023-12-05 110957.png

There may be a more professional or better way to achieve the looked for result: could you take it from there, please? :D :D

best wishes
Hi

That is exactly how I resolve this situation as the table is used for all variations of the records and some web tags return the 'at' characters and others don't. It's a hangover from a much earlier version of CumulusMX.

Neil

Re: Reworked default websites

Posted: Sun 31 Dec 2023 1:36 pm
by bumpy
Hello
Help please before I finally give up the ghost!
I have been trying, unsuccessfully to populate the Alternative Interface website, but unfortunately, all I get are blank template pages with the exception of the gauges.html which updates and displays without problem. This is all the more frustrating as the Cumulus Default website: www.farleighmeadows.co.uk/htm is working perfectly. The two default dashboards, connected via local host and i.p. are updating without problem and the Alternative Interface dashboard is also flawless. When I try to access www.farleighmeadows.co.uk/html, the pages can be found but are empty of data with the exception of gauges which are working.
I believe I have followed the instructions - readme - etc carefully and downloaded the necessary files. I have adjusted the ws-extra.js at line 13 as advised. I have checked the websitedata.json file on the server and this is uploading regularly.
Having spent considerable time trying to resolve this unsuccessfully, I really don't know what to do know.
Can someone offer a possible solution please?
My website is www.farleighmeadows.co.uk
I have tried to attach the latest Mdiags file in case that can throw light on the problem but when I do a message appears HTTP error and the file won't attach.
Any help would be much appreciated.
Tony

Re: Reworked default websites

Posted: Sun 31 Dec 2023 2:05 pm
by freddie
The alternative interface shouldn't be used on a server that doesn't have MX running on it. It isn't designed to be used on a publicly accessible web server. This is because your station configuration (including usernames, passwords etc.) can then be accessed by anybody.

Re: Reworked default websites

Posted: Sun 31 Dec 2023 2:24 pm
by SamiS
There is some mixup in the last two messages… So to clarify:

”Alternative Interface” is a replacement for CMX Dashboard, and it is meant to run only in the computer that is running CMX.

”Alternative Website” or ”Reworked website” (that is the discussion in this thread) is a new version of the default website, and it is designed to run on a public webserver just as the original default website.

So @bumpy which one are you actually tring to do?

Re: Reworked default websites

Posted: Sun 31 Dec 2023 3:01 pm
by bumpy
Hello
I was rather confused by Freddie's response but it seems I didn't explain correctly and used the wrong terminology. My apologies for the confusion.
What I want to do is to retain the website as it is now ie. the default website run with CMX and also have via the same server the Alternative/Reworked website. The CMX default website works well and I have the pages for the Alternative website but I cannot get data to show on these pages although the gauges pages displays fine.

All I wanted was to have the option of, what from my view, was the choice of a more attractive website. Hopefully this explains things a little more clearly.

Can you offer some advice please?

Tony

Re: Reworked default websites

Posted: Sun 31 Dec 2023 5:06 pm
by SamiS
I haven’t setup the alternate website myself, but if I have understood correctly, it is a drop in replacement for the default website, so you cannot run it in parallel with the default one without some tricks. So basically you make a choice which one do you keep feeding data to.

If your old default website uploads go to htm folder, you just change all upload paths on CMX settings to point to the html folder where you have put the alternate website files, and it should start working. But as said before, I have not setup it myself, so I don’t know if it needs some editing of the files regarding reports path etc.

Hopefully someone corrects me if I have wrong info above.

Re: Reworked default websites

Posted: Sun 31 Dec 2023 5:54 pm
by NeilThomas
SamiS wrote: Sun 31 Dec 2023 5:06 pm I haven’t setup the alternate website myself, but if I have understood correctly, it is a drop in replacement for the default website, so you cannot run it in parallel with the default one without some tricks. So basically you make a choice which one do you keep feeding data to.

If your old default website uploads go to htm folder, you just change all upload paths on CMX settings to point to the html folder where you have put the alternate website files, and it should start working. But as said before, I have not setup it myself, so I don’t know if it needs some editing of the files regarding reports path etc.

Hopefully someone corrects me if I have wrong info above.
Hi
Actually, you can run both together as all pages in the supplied default website use the file extension ‘.htm’. The alternative uses the full .html extension. The only issue would be where you send the data. The supplied default website expects it in the same folder as the pages, whereas you can choose an alternative folder for my alternative site. You will need to edit page-manager.js to set the variable for the data source to the default location, I.i., the same folder as the pages.

You can test that both work simply by using either index.htm, for the default site or index.html for the alternative.

Neil.