Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vcoman/ces demo #6

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions agriculture/agriculturecore/templates/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@
</button>
<div class="dropdown-menu shadow-sm simulation-controls-container" aria-labelledby="simulationMenuButton">
<p>Simulation controls</p>
<div class="card">
<p class="widget-title">Weather condition</p>
<p class="widget-desc">Control the weather condition of the farm. You can change it to see different temperature and moisture values.</p>
<div class="widget-button-container">
<button id="weather-sunny" class="btn widget-button weather-button" type="button" value="0">
<span id="weather-sunny-logo" class="icon-widget weather-icon fas fa-sun fa-2x" title="Change weather to sunny"></span>
</button>
<button id="weather-cloudy" class="btn widget-button weather-button" type="button" value="1">
<span id="weather-cloudy-logo" class="icon-widget weather-icon fas fa-cloud fa-2x" title="Change weather to cloudy"></span>
</button>
<button id="weather-rainy" class="btn widget-button weather-button" type="button" value="2">
<span id="weather-rainy-logo" class="icon-widget weather-icon fas fa-cloud-rain fa-2x" title="Change weather to rainy"></span>
</button>
</div>
</div>
<!-- <div class="card">-->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before, just remove this, if we wanted to recover it we can always go back to a previous commit that had this piece of code.

<!-- <p class="widget-title">Weather condition</p>-->
<!-- <p class="widget-desc">Control the weather condition of the farm. You can change it to see different temperature and moisture values.</p>-->
<!-- <div class="widget-button-container">-->
<!-- <button id="weather-sunny" class="btn widget-button weather-button" type="button" value="0">-->
<!-- <span id="weather-sunny-logo" class="icon-widget weather-icon fas fa-sun fa-2x" title="Change weather to sunny"></span>-->
<!-- </button>-->
<!-- <button id="weather-cloudy" class="btn widget-button weather-button" type="button" value="1">-->
<!-- <span id="weather-cloudy-logo" class="icon-widget weather-icon fas fa-cloud fa-2x" title="Change weather to cloudy"></span>-->
<!-- </button>-->
<!-- <button id="weather-rainy" class="btn widget-button weather-button" type="button" value="2">-->
<!-- <span id="weather-rainy-logo" class="icon-widget weather-icon fas fa-cloud-rain fa-2x" title="Change weather to rainy"></span>-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<div class="card">
<p class="widget-title">Time</p>
<p class="widget-desc">Control how the time elapses in the farm. You can change it to see the irrigation events faster.</p>
Expand Down Expand Up @@ -197,6 +197,9 @@
// Get the weather condition and time factor from the irrigation controller.
getWeatherCondition();
getTimeFactor();

// Check farm connectivity in 5 secs.
setTimeout(checkFarmConnected, 5000, "schedule");
});

// Sets the selected section.
Expand All @@ -223,7 +226,7 @@
function getControllerID() {
return '{{ controller_id }}';
}

// Gets the status of the farm.
function verifyParameters() {
let url = new URL(window.location.href);
Expand Down