From 78e28071b7db309907fc88312a10d8ab26fea26e Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sun, 21 Apr 2024 10:52:30 +0200 Subject: [PATCH] show total instance qso in debug --- application/controllers/Debug.php | 2 ++ application/models/Logbook_model.php | 7 +++++++ application/views/debug/index.php | 9 ++++++++- assets/css/general.css | 4 ++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index 229e0306f..97e24a274 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -26,6 +26,8 @@ class Debug extends CI_Controller $footerData['scripts'] = ['assets/js/sections/debug.js']; $data['stations'] = $this->Stations->all(); + + $data['qso_total'] = $this->Logbook_model->count_all_qso(); $data['qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); if ($data['qsos_with_no_station_id']) { diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 7654393ed..dd44deed3 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1773,6 +1773,13 @@ class Logbook_model extends CI_Model { } } + // returns the number of qso's total on this instance + function count_all_qso() { + $sql = 'SELECT COUNT(*) AS total FROM '. $this->config->item('table_name').' WHERE station_id IS NOT NULL;'; + $query = $this->db->query($sql); + return $query->row()->total; + } + /* * Function returns the QSOs from the logbook, which have not been either marked as uploaded to hrdlog, or has been modified with an edit */ diff --git a/application/views/debug/index.php b/application/views/debug/index.php index cf891f0a0..67ef0ef66 100644 --- a/application/views/debug/index.php +++ b/application/views/debug/index.php @@ -43,7 +43,14 @@ Environment - + + + + + + Total QSO on this instance + + diff --git a/assets/css/general.css b/assets/css/general.css index 9f3faa844..1e58d3c51 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -939,4 +939,8 @@ label { border-color: #fff; border-width: 1px; border-style: solid; +} + +.blank-row { + height: 20px !important; } \ No newline at end of file