show total instance qso in debug

This commit is contained in:
HB9HIL
2024-04-21 10:52:30 +02:00
parent d6161d1639
commit 78e28071b7
4 changed files with 21 additions and 1 deletions

View File

@@ -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']) {

View File

@@ -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
*/

View File

@@ -43,7 +43,14 @@
<td>Environment</td>
<td><?php echo ENVIRONMENT; ?></td>
</tr>
<tr class="blank-row">
<td> </td>
<td> </td>
</tr>
<tr>
<td>Total QSO on this instance</td>
<td><?php echo $qso_total . ' QSOs'; ?></td>
</tr>
</table>
</div>
</div>

View File

@@ -939,4 +939,8 @@ label {
border-color: #fff;
border-width: 1px;
border-style: solid;
}
.blank-row {
height: 20px !important;
}