124 |
124 |
$_POST["thermal_sensors_widget_zone_critical_threshold"] = floor(($_POST["thermal_sensors_widget_zone_critical_threshold"] - 32) / 1.8);
|
125 |
125 |
$_POST["thermal_sensors_widget_core_warning_threshold"] = floor(($_POST["thermal_sensors_widget_core_warning_threshold"] - 32) / 1.8);
|
126 |
126 |
$_POST["thermal_sensors_widget_core_critical_threshold"] = floor(($_POST["thermal_sensors_widget_core_critical_threshold"] - 32) / 1.8);
|
|
127 |
$_POST["thermal_sensors_widget_pch_warning_threshold"] = floor(($_POST["thermal_sensors_widget_pch_warning_threshold"] - 32) / 1.8);
|
|
128 |
$_POST["thermal_sensors_widget_pch_critical_threshold"] = floor(($_POST["thermal_sensors_widget_pch_critical_threshold"] - 32) / 1.8);
|
127 |
129 |
}
|
128 |
130 |
|
129 |
131 |
set_customwidgettitle($user_settings);
|
130 |
132 |
saveThresholdSettings($user_settings, $_POST, "thermal_sensors_widget_zone_warning_threshold", "thermal_sensors_widget_zone_critical_threshold");
|
131 |
133 |
saveThresholdSettings($user_settings, $_POST, "thermal_sensors_widget_core_warning_threshold", "thermal_sensors_widget_core_critical_threshold");
|
|
134 |
saveThresholdSettings($user_settings, $_POST, "thermal_sensors_widget_pch_warning_threshold", "thermal_sensors_widget_pch_critical_threshold");
|
132 |
135 |
|
133 |
136 |
//handle checkboxes separately
|
134 |
137 |
saveGraphDisplaySettings($user_settings, $_POST, "thermal_sensors_widget_show_raw_output");
|
... | ... | |
150 |
153 |
$thermal_sensors_widget_zoneCriticalTempThreshold = getThresholdValueFromConfig($user_settings, "thermal_sensors_widget_zone_critical_threshold", DEFAULT_CRITICAL_THRESHOLD, $widgetkey);
|
151 |
154 |
$thermal_sensors_widget_coreWarningTempThreshold = getThresholdValueFromConfig($user_settings, "thermal_sensors_widget_core_warning_threshold", DEFAULT_WARNING_THRESHOLD, $widgetkey);
|
152 |
155 |
$thermal_sensors_widget_coreCriticalTempThreshold = getThresholdValueFromConfig($user_settings, "thermal_sensors_widget_core_critical_threshold", DEFAULT_CRITICAL_THRESHOLD, $widgetkey);
|
|
156 |
$thermal_sensors_widget_pchWarningTempThreshold = getThresholdValueFromConfig($user_settings, "thermal_sensors_widget_pch_warning_threshold", DEFAULT_WARNING_THRESHOLD, $widgetkey);
|
|
157 |
$thermal_sensors_widget_pchCriticalTempThreshold = getThresholdValueFromConfig($user_settings, "thermal_sensors_widget_pch_critical_threshold", DEFAULT_CRITICAL_THRESHOLD, $widgetkey);
|
153 |
158 |
|
154 |
159 |
//get display settings from config (apply defaults if missing)
|
155 |
160 |
$thermal_sensors_widget_showRawOutput = getBoolValueFromConfig($user_settings, "thermal_sensors_widget_show_raw_output", false, $widgetkey);
|
... | ... | |
171 |
176 |
zoneCriticalTempThreshold:<?= $thermal_sensors_widget_zoneCriticalTempThreshold; ?>,
|
172 |
177 |
coreWarningTempThreshold:<?= $thermal_sensors_widget_coreWarningTempThreshold; ?>,
|
173 |
178 |
coreCriticalTempThreshold:<?= $thermal_sensors_widget_coreCriticalTempThreshold; ?>,
|
|
179 |
pchWarningTempThreshold:<?= $thermal_sensors_widget_pchWarningTempThreshold; ?>,
|
|
180 |
pchCriticalTempThreshold:<?= $thermal_sensors_widget_pchCriticalTempThreshold; ?>,
|
174 |
181 |
showRawOutput:<?= $thermal_sensors_widget_showRawOutput ? "true" : "false"; ?>,
|
175 |
182 |
showFullSensorName:<?= $thermal_sensors_widget_showFullSensorName ? "true" : "false"; ?>,
|
176 |
183 |
pulsateWarning:<?= $thermal_sensors_widget_pulsateWarning ? "true" : "false"; ?>,
|
... | ... | |
187 |
194 |
$("#thermal_sensors_widget_zone_critical_threshold").val(function(){return getFahrenheitValue(this.value);});
|
188 |
195 |
$("#thermal_sensors_widget_core_warning_threshold").val(function(){return getFahrenheitValue(this.value);});
|
189 |
196 |
$("#thermal_sensors_widget_core_critical_threshold").val(function(){return getFahrenheitValue(this.value);});
|
|
197 |
$("#thermal_sensors_widget_pch_warning_threshold").val(function(){return getFahrenheitValue(this.value);});
|
|
198 |
$("#thermal_sensors_widget_pch_critical_threshold").val(function(){return getFahrenheitValue(this.value);});
|
190 |
199 |
} else {
|
191 |
200 |
$(".thermal_sensors_widget_unit").html('<?=gettext("°C")?>');
|
192 |
201 |
$(".thermal_sensors_widget_range").html('<?=gettext("(1–100)")?>');
|
... | ... | |
194 |
203 |
$("#thermal_sensors_widget_zone_critical_threshold").val(function(){return getCelsiusValue(this.value);});
|
195 |
204 |
$("#thermal_sensors_widget_core_warning_threshold").val(function(){return getCelsiusValue(this.value);});
|
196 |
205 |
$("#thermal_sensors_widget_core_critical_threshold").val(function(){return getCelsiusValue(this.value);});
|
|
206 |
$("#thermal_sensors_widget_pch_warning_threshold").val(function(){return getCelsiusValue(this.value);});
|
|
207 |
$("#thermal_sensors_widget_pch_critical_threshold").val(function(){return getCelsiusValue(this.value);});
|
197 |
208 |
}
|
198 |
209 |
});
|
199 |
210 |
// --------------------- Centralized widget refresh system ------------------------------
|
... | ... | |
233 |
244 |
$thermal_sensors_widget_zoneCriticalTempThreshold = ceil($thermal_sensors_widget_zoneCriticalTempThreshold * 1.8 + 32);
|
234 |
245 |
$thermal_sensors_widget_coreWarningTempThreshold = ceil($thermal_sensors_widget_coreWarningTempThreshold * 1.8 + 32);
|
235 |
246 |
$thermal_sensors_widget_coreCriticalTempThreshold = ceil($thermal_sensors_widget_coreCriticalTempThreshold * 1.8 + 32);
|
|
247 |
$thermal_sensors_widget_pchWarningTempThreshold = ceil($thermal_sensors_widget_pchWarningTempThreshold * 1.8 + 32);
|
|
248 |
$thermal_sensors_widget_pchCriticalTempThreshold = ceil($thermal_sensors_widget_pchCriticalTempThreshold * 1.8 + 32);
|
236 |
249 |
}
|
237 |
250 |
?>
|
238 |
251 |
<div style="padding: 5px">
|
... | ... | |
281 |
294 |
</div>
|
282 |
295 |
</div>
|
283 |
296 |
|
|
297 |
<div class="form-group">
|
|
298 |
<label class="col-sm-4 control-label"><?=gettext('PCH Warning')?></label>
|
|
299 |
<div class="col-sm-4">
|
|
300 |
<input type="text" name="thermal_sensors_widget_pch_warning_threshold" id="thermal_sensors_widget_pch_warning_threshold" value="<?= $thermal_sensors_widget_pchWarningTempThreshold; ?>" class="form-control" />
|
|
301 |
</div>
|
|
302 |
</div>
|
|
303 |
|
|
304 |
<div class="form-group">
|
|
305 |
<label class="col-sm-4 control-label"><?=gettext('PCH Critical')?></label>
|
|
306 |
<div class="col-sm-4">
|
|
307 |
<input type="text" name="thermal_sensors_widget_pch_critical_threshold" id="thermal_sensors_widget_pch_critical_threshold" value="<?= $thermal_sensors_widget_pchCriticalTempThreshold; ?>" class="form-control" />
|
|
308 |
</div>
|
|
309 |
</div>
|
|
310 |
|
284 |
311 |
<div class="form-group">
|
285 |
312 |
<label class="col-sm-6 control-label"><?=gettext('Display settings:')?></label>
|
286 |
313 |
</div>
|