diff --git a/application/config/config.sample.php b/application/config/config.sample.php index 552dad23f..15c3cb3c7 100644 --- a/application/config/config.sample.php +++ b/application/config/config.sample.php @@ -892,6 +892,19 @@ $config['max_login_attempts'] = 3; $config['enable_dxcluster_file_cache_band'] = false; $config['enable_dxcluster_file_cache_worked'] = false; +/* +|-------------------------------------------------------------------------- +| DXCluster Refresh Time +|-------------------------------------------------------------------------- +| This defines the how often the DXCluster spots are refreshed in seconds. Default is 30 seconds. +| Be careful with this and do not set it too low because depending on how many QSOs a user has it +| can cause a lot of load on the server. Also consider enabling a proper caching (file caches are +| not recommended for very large installations) to reduce the load on the server. +|-------------------------------------------------------------------------- + */ +$config['dxcluster_refresh_time'] = 30; + + /* |-------------------------------------------------------------------------- | Internal tools diff --git a/application/controllers/Bandmap.php b/application/controllers/Bandmap.php index 4c4b6fcd9..878e8a624 100644 --- a/application/controllers/Bandmap.php +++ b/application/controllers/Bandmap.php @@ -60,18 +60,20 @@ class Bandmap extends CI_Controller { } switch ($pageData['custom_date_format']) { - case "d/m/y": $pageData['custom_date_format'] = 'DD/MM/YY'; break; - case "d/m/Y": $pageData['custom_date_format'] = 'DD/MM/YYYY'; break; - case "m/d/y": $pageData['custom_date_format'] = 'MM/DD/YY'; break; - case "m/d/Y": $pageData['custom_date_format'] = 'MM/DD/YYYY'; break; - case "d.m.Y": $pageData['custom_date_format'] = 'DD.MM.YYYY'; break; - case "y/m/d": $pageData['custom_date_format'] = 'YY/MM/DD'; break; - case "Y-m-d": $pageData['custom_date_format'] = 'YYYY-MM-DD'; break; - case "M d, Y": $pageData['custom_date_format'] = 'MMM DD, YYYY'; break; - case "M d, y": $pageData['custom_date_format'] = 'MMM DD, YY'; break; - default: $pageData['custom_date_format'] = 'DD/MM/YYYY'; + case "d/m/y": $pageData['custom_date_format'] = 'DD/MM/YY'; break; + case "d/m/Y": $pageData['custom_date_format'] = 'DD/MM/YYYY'; break; + case "m/d/y": $pageData['custom_date_format'] = 'MM/DD/YY'; break; + case "m/d/Y": $pageData['custom_date_format'] = 'MM/DD/YYYY'; break; + case "d.m.Y": $pageData['custom_date_format'] = 'DD.MM.YYYY'; break; + case "y/m/d": $pageData['custom_date_format'] = 'YY/MM/DD'; break; + case "Y-m-d": $pageData['custom_date_format'] = 'YYYY-MM-DD'; break; + case "M d, Y": $pageData['custom_date_format'] = 'MMM DD, YYYY'; break; + case "M d, y": $pageData['custom_date_format'] = 'MMM DD, YY'; break; + default: $pageData['custom_date_format'] = 'DD/MM/YYYY'; } + $data['dxcluster_refresh_time'] = $this->config->item('dxcluster_refresh_time') ?? 30; + $data['page_title'] = __("DXCluster"); $this->load->view('interface_assets/header', $data); $this->load->view('bandmap/list',$pageData); diff --git a/application/views/bandmap/list.php b/application/views/bandmap/list.php index f7633d326..6bc0650ee 100644 --- a/application/views/bandmap/list.php +++ b/application/views/bandmap/list.php @@ -4,6 +4,7 @@ var cat_timeout_interval = "optionslib->get_option('cat_timeout_interval'); ?>"; var dxcluster_maxage = optionslib->get_option('dxcluster_maxage') ?? 60; ?>; var custom_date_format = ""; + var dxcluster_refresh_time = ; // Detect OS for proper keyboard shortcuts var isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; diff --git a/assets/js/sections/bandmap_list.js b/assets/js/sections/bandmap_list.js index 17440381c..a6eeccee1 100644 --- a/assets/js/sections/bandmap_list.js +++ b/assets/js/sections/bandmap_list.js @@ -15,7 +15,7 @@ // CONFIGURATION & CONSTANTS // ======================================== -const SPOT_REFRESH_INTERVAL = 60; // Auto-refresh interval in seconds +const SPOT_REFRESH_INTERVAL = dxcluster_refresh_time; // Auto-refresh interval in seconds, defined via config.php (default: 30s) const QSO_SEND_DEBOUNCE_MS = 3000; // Debounce for sending callsign to QSO form (milliseconds) // Mode display capitalization lookup (API returns lowercase) diff --git a/install/config/config.php b/install/config/config.php index 4f3ce0c79..1e4ad582d 100644 --- a/install/config/config.php +++ b/install/config/config.php @@ -892,6 +892,18 @@ $config['enable_eqsl_massdownload'] = false; $config['enable_dxcluster_file_cache_band'] = false; $config['enable_dxcluster_file_cache_worked'] = false; +/* +|-------------------------------------------------------------------------- +| DXCluster Refresh Time +|-------------------------------------------------------------------------- +| This defines the how often the DXCluster spots are refreshed in seconds. Default is 30 seconds. +| Be careful with this and do not set it too low because depending on how many QSOs a user has it +| can cause a lot of load on the server. Also consider enabling a proper caching (file caches are +| not recommended for very large installations) to reduce the load on the server. +|-------------------------------------------------------------------------- + */ +$config['dxcluster_refresh_time'] = 30; + /* |-------------------------------------------------------------------------- | Internal tools