v0.14.2-hotfix

This commit is contained in:
Mateusz Gruszczyński
2026-09-15 10:14:01 +02:00
parent c3f6e773f8
commit 7ffaba6c7a
12 changed files with 103 additions and 35 deletions
+13
View File
@@ -164,6 +164,18 @@ function renderLogRetention() {
select.value = days;
}
function updateConnectivityMetricFields() {
const form = $('#settingsForm');
if (!form) return;
const localEnabled = !!form.ping_metrics_enabled?.checked;
if (form.ping_interval_seconds) form.ping_interval_seconds.disabled = !localEnabled;
if (form.ping_sample_count) form.ping_sample_count.disabled = !localEnabled;
const cloudEnabled = !!form.gree_cloud_connectivity_metrics_enabled?.checked;
if (form.gree_cloud_connectivity_metrics_interval_seconds) form.gree_cloud_connectivity_metrics_interval_seconds.disabled = !cloudEnabled;
if (form.gree_cloud_connectivity_metrics_sample_count) form.gree_cloud_connectivity_metrics_sample_count.disabled = !cloudEnabled;
}
function renderSettings() {
if (!app.settings) return;
const form = $('#settingsForm');
@@ -191,6 +203,7 @@ function renderSettings() {
form.gree_cloud_connectivity_metrics_enabled.checked = !!cloud.connectivity_metrics_enabled;
form.gree_cloud_connectivity_metrics_interval_seconds.value = Number(cloud.connectivity_metrics_interval_seconds || 300);
form.gree_cloud_connectivity_metrics_sample_count.value = Number(cloud.connectivity_metrics_sample_count || 3);
updateConnectivityMetricFields();
const cloudInstance = $('#greeCloudInstanceId');
if (cloudInstance) cloudInstance.textContent = cloud.installation_id || '—';
const cloudLastContact = $('#greeCloudLastContact');