OpenSprinkler Forums OpenSprinkler Mobile and Web App Incorporating other information into station log Re: Re: Incorporating other information into station log

#25509

Samer
Keymaster

By the way, the get logs function has become clunky which is 100% my fault. I should make those hide/show into proper functions so we don’t have to keep declaring things all over the place. I can do one of two things, I can push some changes to your Github branch timeline-logs or I can wait until you are done and it is merged with my line and make some changes.

More of a Git/Github topic now but if I made changes to my copy now and later merged your changes, what would happen to my changes? Would they get overwritten?

Update: Even the navigation elements can be condensed. By the way, if it helps for testing purposes, you can setup an array in PHP and send the JSON using one line:

echo json_encode($array);

This way you can generate random code based on some loops and see the results?

Also, I have some code early in main.php (Line 32) do demonstrate how to set new options such as an upgrade or new install situation. This makes the new option in config.php but uses pretty limiting filter to prevent injection which is integer conversion. Initially, this seemed great for 1/0 situations. I also adapted it for auto rain delay duration setting. But I have a feeling we might be reaching the limit if you need to configure a web source for the data.

I am thinking we can do a cross-domain to the other service instead. This way you are not relaying data around through web servers. The client should get a quicker result. The best part is JSONP is allowed to be cross-domain but regardless we could add the cross-domain header if the IP was configured in the settings.