fix(hamqth): the whole-log upload reports itself

It ran into a panel nobody was showing: the button never set showLog, so
the tab sat on 'Pick a service' while a 25000-QSO upload came and went.
Now it opens the console like every other action here, and the console
has something to say: the callsign it is scoped to and how many of the
logbook's QSOs that leaves (a two-callsign database sends one of them,
which is the whole explanation for a count that looks short), the
exported record count and file size, and HamQTH's own reply.

Plus the two facts that make the site's own number readable: HamQTH
accepts the file and imports it in the BACKGROUND, and it reports what
it made of each record by e-mail — never in the reply we get. An
operator comparing counts a minute later is not looking at a failure.
This commit is contained in:
2026-08-31 22:11:51 +02:00
parent 5cebf163c5
commit e3332d1e27
3 changed files with 26 additions and 7 deletions
+18 -3
View File
@@ -11531,6 +11531,9 @@ func (a *App) runFullLogHamQTH(cfg extsvc.ServiceConfig) {
_ = tmp.Close()
defer os.Remove(path)
if owner != "" {
emit("Station callsign: " + owner + " — QSOs logged under another of your callsigns are NOT included.")
}
emit("Exporting the log…")
var res adif.ExportResult
if owner != "" {
@@ -11555,7 +11558,12 @@ func (a *App) runFullLogHamQTH(cfg extsvc.ServiceConfig) {
done(0)
return
}
emit(fmt.Sprintf("Uploading %d QSO(s) to HamQTH — this REPLACES the log there…", res.Count))
total, _ := a.qso.Count(ctx)
if total > 0 && int64(res.Count) != total {
emit(fmt.Sprintf("%d of %d QSOs in this logbook match %s and will be sent.", res.Count, total, owner))
}
emit(fmt.Sprintf("Exported %d QSO(s), %d KB of ADIF.", res.Count, res.SizeKB))
emit(fmt.Sprintf("Uploading to HamQTH — this REPLACES the log there…"))
up, uerr := extsvc.UploadHamQTHFullLog(ctx, nil, cfg, string(data))
if uerr != nil || !up.OK {
@@ -11568,8 +11576,15 @@ func (a *App) runFullLogHamQTH(cfg extsvc.ServiceConfig) {
done(0)
return
}
emit("HamQTH accepted the log: " + up.Message)
emit("HamQTH imports it in the background — errors in the ADIF are e-mailed to you, not reported here.")
emit("HamQTH replied: " + up.Message)
// Said plainly, because the numbers will not agree for a while and an
// operator comparing them straight away has every reason to think the
// upload failed: HamQTH ACCEPTS the file here and imports it later, at its
// own pace. What it makes of each record is reported by E-MAIL, never in
// this reply — so a count that stops short means the site rejected records,
// and the mail says which.
emit("Accepted — HamQTH imports the file in the BACKGROUND, so its QSO count will lag for a while.")
emit("If the count stops short, HamQTH e-mails the ADIF errors to your account address — this reply cannot carry them.")
// Everything is on HamQTH now, so nothing is still waiting to be sent. Only
// the rows that are not already stamped need writing.