Page 1 of 1

Ajax Dashboard - days since rain

Posted: Thu Dec 07, 2017 6:08 pm
by tcsplinters
Hi

After having a small moment yesterday with erroneous rain data... I have managed to fix all the faulty data except in the wxindex / ajax dashboard.

I am trying to find where the days since last rain is generated from... because it would appear I have an error in my data

www.jointworks.co.nz/weather/wxindex.php

Currently showing 17507, should be around 24

Thank you

Re: Ajax Dashboard - days since rain

Posted: Thu Dec 07, 2017 7:45 pm
by BCJKiwi
As far as I can see from a quick look;
This is based on the LastRrainTipISO value from Cumulus and calculated by the Saratoga template file CU-defs.php which creates the $dayswithnorain variable used in ajax-dashboard.php
Search for $dayswithnorain in CU-defs.php

Re: Ajax Dashboard - days since rain

Posted: Fri Dec 08, 2017 6:21 pm
by tcsplinters
Hi

Thanks for this. Yes it is in the CU-Defs file

So CU-Defs.php reads from CU_tags.php

However cant find where that lasttipdate is set within Cumulus in order to set it in the CU_tags file. Manually corrected it with Cumulus shutdown, but Cumulus overwrote it once it restarted

Thanks in advance
tc

Re: Ajax Dashboard - days since rain

Posted: Fri Dec 08, 2017 7:26 pm
by BCJKiwi
The starting point is this entry;
$LastRainTipISO = '<#LastRainTipISO>';
in the CUtagsT.txt template file in the C:\cumulus\web folder

If you look at this value in either;
CUtagsT.txttmp in C:\cumulus\web folder
or
the CUtags.php file on the webserver you should see the value Cumulus is delivering.
If this is not correct then there is still an error somewhere that needs to be fixed in the cumulus data.

Re: Ajax Dashboard - days since rain

Posted: Fri Dec 08, 2017 7:48 pm
by steve
The last rain tip time is held in today.ini and you can change it by stopping Cumulus and editing that file.

Re: Ajax Dashboard - days since rain

Posted: Sat Dec 09, 2017 6:26 am
by tcsplinters
Hi

Thanks to you both. That solved it... learnt a fair bit about the file son the way through as well

thx