Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
969b079
[Advanced Logbook] Started on dbtools
AndreasK79 Dec 2, 2025
24672dd
Merge branch 'dev' into lba_db_tools
AndreasK79 Dec 7, 2025
cdf942d
Tweaked layout a bit and implemented checks for continent/dxcc/distance
AndreasK79 Dec 7, 2025
2ddf698
Added state check
AndreasK79 Dec 7, 2025
0fad755
Implemented batch state fixer
AndreasK79 Dec 7, 2025
46fad66
Added button to show qso list in state
AndreasK79 Dec 7, 2025
10c5a0a
Fix QSO list. Added info to info button
AndreasK79 Dec 8, 2025
6933a63
Moved DXCC QSO updater from update to lba
AndreasK79 Dec 8, 2025
bde29d6
Add userid filter
AndreasK79 Dec 8, 2025
7e3b962
Get dxcc fix working in gui
AndreasK79 Dec 8, 2025
462664f
Use html view to load result instead
AndreasK79 Dec 8, 2025
e219425
Added Run buttons
AndreasK79 Dec 8, 2025
c2948a3
Merge branch 'dev' into lba_db_tools
AndreasK79 Dec 8, 2025
b49bfcf
Corrected number of counties
AndreasK79 Dec 8, 2025
6f9f0fa
Added state and callsign link in state qso list
AndreasK79 Dec 10, 2025
b72d9c9
Fixed DXCC checking for ALL QSOs
AndreasK79 Dec 11, 2025
7117a10
Fix updating missing DXCC
AndreasK79 Dec 12, 2025
dc9a7ad
Add QSO list for missing DXCC
AndreasK79 Dec 13, 2025
3d0949c
Added changed files
AndreasK79 Dec 13, 2025
82fbbb8
Continent update is fixed
AndreasK79 Dec 13, 2025
b70c128
Fixed CQ/ITU zone updater
AndreasK79 Dec 14, 2025
99c2d05
Changed wording a bit
AndreasK79 Dec 14, 2025
d390f2d
Fixed some ids to have spinner working
AndreasK79 Dec 14, 2025
91cdec2
Moved function from model, and added userid
AndreasK79 Dec 14, 2025
539ee16
Merge branch 'dev' into lba_db_tools
AndreasK79 Dec 14, 2025
00b5397
Adding translations
AndreasK79 Dec 14, 2025
d16ff05
Removed information in dialog, and instead linked to the Wiki
AndreasK79 Dec 14, 2025
27f9cb9
Changed to button
AndreasK79 Dec 14, 2025
e4721c1
Fixed state update count
AndreasK79 Dec 14, 2025
6a746b6
Red if 0, green if > 0
AndreasK79 Dec 15, 2025
9d29f7e
Fixed return messages for dxcc update
AndreasK79 Dec 15, 2025
90daf3a
More verbose message on dxcc and state fixer
AndreasK79 Dec 15, 2025
fc1993b
Fix disabled close button
AndreasK79 Dec 15, 2025
325ada1
Fixed continent return result
AndreasK79 Dec 15, 2025
decc5f7
Fixed distance return result
AndreasK79 Dec 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed to button
  • Loading branch information
AndreasK79 committed Dec 14, 2025
commit 27f9cb9f523798c508b0a15c89a5b73935a68ad3
5 changes: 4 additions & 1 deletion application/controllers/Logbookadvanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,15 @@ public function fixStateBatch() {
$this->load->model('logbookadvanced_model');

$dxcc = $this->input->post('dxcc', true);
$country = $this->input->post('country', true);

// Process for batch QSO state fix
$result = $this->logbookadvanced_model->fixStateBatch($dxcc);

$data['message'] = __("The number of QSOs updated for state/province in") . ' ' . $country . ' : ' . count($result);

header("Content-Type: application/json");
echo json_encode($result);
echo json_encode($data);
}

public function openStateList() {
Expand Down
14 changes: 7 additions & 7 deletions application/views/logbookadvanced/dbtoolsdialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<p class="mb-1 small text-muted"><?= __("Update missing CQ zone information") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-secondary me-1 ld-ext-right" id="checkFixCqZonesBtn" onclick="checkFixCqZones()">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkFixCqZonesBtn" onclick="checkFixCqZones()">
<?= __("Check") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand All @@ -24,7 +24,7 @@
<p class="mb-1 small text-muted"><?= __("Update missing ITU zone information") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-secondary me-1 ld-ext-right" id="checkFixItuZonesBtn" onclick="checkFixItuZones()">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkFixItuZonesBtn" onclick="checkFixItuZones()">
<?= __("Check") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand All @@ -36,7 +36,7 @@
<p class="mb-1 small text-muted"><?= __("Update missing or incorrect continent information") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-secondary me-1 ld-ext-right" id="checkFixContinentBtn" onclick="checkFixContinent()">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkFixContinentBtn" onclick="checkFixContinent()">
<?= __("Check") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand All @@ -48,7 +48,7 @@
<p class="mb-1 small text-muted"><?= __("Update missing state/province information") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-secondary me-1 ld-ext-right" id="checkFixStateBtn" onclick="checkFixState()">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkFixStateBtn" onclick="checkFixState()">
<?= __("Check") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand All @@ -60,7 +60,7 @@
<p class="mb-1 small text-muted"><?= __("Calculate and update distance information for QSOs") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-secondary me-1 ld-ext-right" id="checkUpdateDistancesBtn" onclick="checkUpdateDistances()">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkUpdateDistancesBtn" onclick="checkUpdateDistances()">
<?= __("Check") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand All @@ -72,7 +72,7 @@
<p class="mb-1 small text-muted"><?= __("Identify QSOs that are missing DXCC information") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-secondary me-1 ld-ext-right" id="checkMissingDxccsBtn" onclick="checkMissingDxcc()">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkMissingDxccsBtn" onclick="checkMissingDxcc()">
<?= __("Check") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand All @@ -85,7 +85,7 @@
<p class="mb-1 small alert-danger"><?= __("This will overwrite ALL existing DXCC information!") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-primary ld-ext-right" id="updateDxccBtn" onclick="fixMissingDxcc(true)">
<button type="button" class="btn btn-sm btn-primary me-1 ld-ext-right" id="updateDxccBtn" onclick="fixMissingDxcc(true)">
<?= __("Run") ?><div class="ld ld-ring ld-spin"></div>
</button>
</div>
Expand Down
50 changes: 30 additions & 20 deletions application/views/logbookadvanced/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,28 +752,35 @@
</div>
<div class="card-body p-2">
<div class="d-grid gap-2">
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="btnUpdateFromCallbook"><?= __("Update from Callbook"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="queueBureau"><?= __("Queue Bureau"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="queueDirect"><?= __("Queue Direct"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="queueElectronic"><?= __("Queue Electronic"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="sentBureau"><?= __("Sent (Bureau)"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="sentDirect"><?= __("Sent (Direct)"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="sentElectronic"><?= __("Sent (Electronic)"); ?></button>
<button type="button" class="btn btn-sm btn-danger dropdown-action" id="dontSend"><?= __("Not Sent"); ?></button>
<button type="button" class="btn btn-sm btn-danger dropdown-action" id="notRequired"><?= __("QSL Not Required"); ?></button>
<button type="button" class="btn btn-sm btn-danger dropdown-action" id="notReceived"><?= __("Not Received"); ?></button>
<button type="button" class="btn btn-sm btn-warning dropdown-action" id="receivedBureau"><?= __("Received (Bureau)"); ?></button>
<button type="button" class="btn btn-sm btn-warning dropdown-action" id="receivedDirect"><?= __("Received (Direct)"); ?></button>
<button type="button" class="btn btn-sm btn-warning dropdown-action" id="receivedElectronic"><?= __("Received (Electronic)"); ?></button>
<button type="button" class="btn btn-sm btn-info dropdown-action" id="exportAdif"><?= __("Create ADIF"); ?></button>
<button type="button" class="btn btn-sm btn-info dropdown-action" id="printLabel"><?= __("Print Label"); ?></button>
<button type="button" class="btn btn-sm btn-info dropdown-action" id="qslSlideshow"><?= __("QSL Slideshow"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="fixCqZones"><?= __("Fix CQ Zones"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="fixItuZones"><?= __("Fix ITU Zones"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="fixState"><?= __("Fix State"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="dbtools"><?= __("Database Tools"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="btnUpdateFromCallbook"><?= __("Update from Callbook"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="queueBureau"><?= __("Queue Bureau"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="queueDirect"><?= __("Queue Direct"); ?></button>
<button type="button" class="btn btn-sm btn-primary dropdown-action" id="queueElectronic"><?= __("Queue Electronic"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="sentBureau"><?= __("Sent (Bureau)"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="sentDirect"><?= __("Sent (Direct)"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="sentElectronic"><?= __("Sent (Electronic)"); ?></button>
<button type="button" class="btn btn-sm btn-danger dropdown-action" id="dontSend"><?= __("Not Sent"); ?></button>
<button type="button" class="btn btn-sm btn-danger dropdown-action" id="notRequired"><?= __("QSL Not Required"); ?></button>
<button type="button" class="btn btn-sm btn-danger dropdown-action" id="notReceived"><?= __("Not Received"); ?></button>
<button type="button" class="btn btn-sm btn-warning dropdown-action" id="receivedBureau"><?= __("Received (Bureau)"); ?></button>
<button type="button" class="btn btn-sm btn-warning dropdown-action" id="receivedDirect"><?= __("Received (Direct)"); ?></button>
<button type="button" class="btn btn-sm btn-warning dropdown-action" id="receivedElectronic"><?= __("Received (Electronic)"); ?></button>
<button type="button" class="btn btn-sm btn-info dropdown-action" id="exportAdif"><?= __("Create ADIF"); ?></button>
<button type="button" class="btn btn-sm btn-info dropdown-action" id="printLabel"><?= __("Print Label"); ?></button>
<button type="button" class="btn btn-sm btn-info dropdown-action" id="qslSlideshow"><?= __("QSL Slideshow"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="fixCqZones"><?= __("Fix CQ Zones"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="fixItuZones"><?= __("Fix ITU Zones"); ?></button>
<button type="button" class="btn btn-sm btn-success dropdown-action" id="fixState"><?= __("Fix State"); ?></button>
</div>
</div>
<!-- <div class="card-header p-2">
<span class="h6 w-100 mt-0 mb-0"><?= __("With ALL QSOs: "); ?></span>
</div>
<div class="card-body p-2">
<div class="d-grid gap-2">
<button type="button" class="btn btn-sm btn-success dropdown-action" id="dbtools2"><?= __("Database Tools"); ?></button>
</div>
</div> -->
</div>
</div>
</div>
Expand Down Expand Up @@ -822,6 +829,9 @@
<button type="options" class="btn btn-sm btn-primary me-1 flex-grow-0 mb-2" id="optionButton" aria-label="<?= __("Options"); ?>" style="white-space: nowrap;" data-bs-toggle="tooltip" data-bs-placement="top" title="<?= __("Options"); ?>">
<i class="fas fa-cog"></i>
</button>
<button type="button" class="btn btn-sm btn-primary me-1 flex-grow-0 mb-2" id="dbtools" style="white-space: nowrap;" aria-label="<?= __("Database Tools"); ?>" data-bs-toggle="tooltip" data-bs-placement="top" title="<?= __("Database Tools"); ?>">
<i class="fas fa-wrench"></i>
</button>
<button type="button" class="btn btn-sm btn-danger me-1 flex-grow-0 mb-2" id="deleteQsos" style="white-space: nowrap;" aria-label="<?= __("Delete"); ?>" data-bs-toggle="tooltip" data-bs-placement="top" title="<?= __("Delete"); ?>">
<i class="fas fa-trash-alt"></i>
</button>
Expand Down
2 changes: 1 addition & 1 deletion application/views/logbookadvanced/statecheckresult.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<td><?php echo $name; ?></td>
<td><?php echo $qsos; ?></td>
<td>
<button type="button" class="btn btn-sm btn-primary ld-ext-right" id="fixStateBtn_<?php echo $item->col_dxcc; ?>" onclick="fixState(<?php echo $item->col_dxcc; ?>)">
<button type="button" class="btn btn-sm btn-primary ld-ext-right" id="fixStateBtn_<?php echo $item->col_dxcc; ?>" onclick="fixState(<?php echo $item->col_dxcc; ?>, '<?php echo $formattedName; ?>')">
<?= __("Run fix") ?><div class="ld ld-ring ld-spin"></div>
</button>
<button id="openStateListBtn_<?php echo $item->col_dxcc; ?>" onclick="openStateList(<?php echo $item->col_dxcc; ?>)" class="btn btn-sm btn-success"><i class="fas fa-search"></i></button>
Expand Down
6 changes: 4 additions & 2 deletions assets/js/sections/logbookadvanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -2176,17 +2176,19 @@ function saveOptions() {
});
}

function fixState(dxcc) {
function fixState(dxcc, country) {
$('#fixStateBtn_' + dxcc).prop("disabled", true).addClass("running");

$.ajax({
url: base_url + 'index.php/logbookadvanced/fixStateBatch',
type: 'post',
data: {
'dxcc': dxcc
'dxcc': dxcc,
'country': country
},
success: function (response) {
$('#fixStateBtn_' + dxcc).prop("disabled", false).removeClass("running");
$('.result').html('<div class="alert alert-success" role="alert">' + response.message + '</div>');
},
error: function () {
$('#fixStateBtn_' + dxcc).prop("disabled", false).removeClass("running");
Expand Down