temporarily disabled ARVE sensors data

This commit is contained in:
lrdossan 2024-06-11 17:35:19 +02:00
parent c9b296bd0d
commit 1215f1d7b7
2 changed files with 28 additions and 25 deletions

View file

@ -1014,13 +1014,14 @@ $(document).ready(function () {
//Check all radio buttons previously selected
$("input[type=radio]:checked").each(function() {require_fields(this)});
// TEMPORARILY DISABLED
// On CERN theme, when the arve_sensors_option changes we want to make its respective
// children show/hide.
if ($("input[type=radio][name=arve_sensors_option]").length > 0) {
$("input[type=radio][name=arve_sensors_option]").change(on_use_sensors_data_change);
// Call the function now to handle forward/back button presses in the browser.
on_use_sensors_data_change(url);
}
// if ($("input[type=radio][name=arve_sensors_option]").length > 0) {
// $("input[type=radio][name=arve_sensors_option]").change(on_use_sensors_data_change);
// // Call the function now to handle forward/back button presses in the browser.
// on_use_sensors_data_change(url);
// }
// When the ventilation_type changes we want to make its respective
// children show/hide.

View file

@ -5,28 +5,30 @@
<span class="tooltip_text">?</span>
</div>
<div class="split">
<div>Use data from ARVE sensors:</div>
<div>
<input class="ml-2" type="radio" id="arve_sensor_no" name="arve_sensors_option" value=0 checked="checked">
<label for="arve_sensor_no">No</label>
<input class="ml-2" type="radio" id="arve_sensor_yes" name="arve_sensors_option" value=1 data-enables="#DIVsensors_data">
<label for="arve_sensor_yes">Yes</label>
</div>
</div>
<p id="offline_sensors" class="red_text mb-2" style="display: none">All sensors are offline.</p>
<p id="arve_api_error_message" class="red_text mb-2" style="display:none; max-width: 85%;">Unauthorized - Something went wrong during the ARVE API authentication process.</p>
<div id="DIVsensors_data" class="mb-1" style="display:none">
<div class="form-group row mb-0">
<div class="col-sm-4"><label class="col-form-label">Sensor:</label></div>
<div class="col-sm-6">
<select id="sensors" name="sensor_in_use" class="form-control">
</select>
<div class="d-none">
<div class="split">
<div>Use data from ARVE sensors:</div>
<div>
<input class="ml-2" type="radio" id="arve_sensor_no" name="arve_sensors_option" value=0 checked="checked">
<label for="arve_sensor_no">No</label>
<input class="ml-2" type="radio" id="arve_sensor_yes" name="arve_sensors_option" value=1 data-enables="#DIVsensors_data">
<label for="arve_sensor_yes">Yes</label>
</div>
</div>
<div>
<div><label>Temperature: </label><span class="ml-3 font-weight-bold" id="sensor_temperature"></span></div>
<div><label>Relative Humidity: </label><span class="ml-3 font-weight-bold" id="sensor_humidity"></span></div>
<p id="offline_sensors" class="red_text mb-2" style="display: none">All sensors are offline.</p>
<p id="arve_api_error_message" class="red_text mb-2" style="display:none; max-width: 85%;">Unauthorized - Something went wrong during the ARVE API authentication process.</p>
<div id="DIVsensors_data" class="mb-1" style="display:none">
<div class="form-group row mb-0">
<div class="col-sm-4"><label class="col-form-label">Sensor:</label></div>
<div class="col-sm-6">
<select id="sensors" name="sensor_in_use" class="form-control">
</select>
</div>
</div>
<div>
<div><label>Temperature: </label><span class="ml-3 font-weight-bold" id="sensor_temperature"></span></div>
<div><label>Relative Humidity: </label><span class="ml-3 font-weight-bold" id="sensor_humidity"></span></div>
</div>
</div>
</div>
{% endblock room_data %}