deat: Added statistics on your log

This commit is contained in:
2026-07-13 01:29:54 +02:00
parent b59c6856bd
commit eb9e2db41a
10 changed files with 1695 additions and 0 deletions
+4
View File
@@ -294,6 +294,8 @@ export function GetClusterAutoConnect():Promise<boolean>;
export function GetClusterStatus():Promise<Array<cluster.ServerStatus>>;
export function GetContestRuns():Promise<Array<qso.ContestRun>>;
export function GetCtyDatInfo():Promise<main.CtyDatInfo>;
export function GetDBBackendStatus():Promise<main.DBBackendStatus>;
@@ -326,6 +328,8 @@ export function GetLoTWUsersStatus():Promise<main.LoTWUsersStatus>;
export function GetLogFilePath():Promise<string>;
export function GetLogStats(arg1:string,arg2:string,arg3:string,arg4:number):Promise<qso.Stats>;
export function GetLogbookRevision():Promise<string>;
export function GetLookupSettings():Promise<main.LookupSettings>;
+8
View File
@@ -546,6 +546,10 @@ export function GetClusterStatus() {
return window['go']['main']['App']['GetClusterStatus']();
}
export function GetContestRuns() {
return window['go']['main']['App']['GetContestRuns']();
}
export function GetCtyDatInfo() {
return window['go']['main']['App']['GetCtyDatInfo']();
}
@@ -610,6 +614,10 @@ export function GetLogFilePath() {
return window['go']['main']['App']['GetLogFilePath']();
}
export function GetLogStats(arg1, arg2, arg3, arg4) {
return window['go']['main']['App']['GetLogStats'](arg1, arg2, arg3, arg4);
}
export function GetLogbookRevision() {
return window['go']['main']['App']['GetLogbookRevision']();
}
+138
View File
@@ -2922,6 +2922,20 @@ export namespace qso {
this.status = source["status"];
}
}
export class Bucket {
key: string;
count: number;
static createFrom(source: any = {}) {
return new Bucket(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.key = source["key"];
this.count = source["count"];
}
}
export class Condition {
field: string;
op: string;
@@ -2938,6 +2952,42 @@ export namespace qso {
this.value = source["value"];
}
}
export class ContestRun {
id: string;
year: number;
count: number;
start: string;
end: string;
static createFrom(source: any = {}) {
return new ContestRun(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.year = source["year"];
this.count = source["count"];
this.start = source["start"];
this.end = source["end"];
}
}
export class Gap {
start: string;
end: string;
minutes: number;
static createFrom(source: any = {}) {
return new Gap(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.start = source["start"];
this.end = source["end"];
this.minutes = source["minutes"];
}
}
export class ListFilter {
callsign?: string;
band?: string;
@@ -3286,6 +3336,94 @@ export namespace qso {
return a;
}
}
export class Stats {
total: number;
unique_calls: number;
entities: number;
continents: number;
first_qso: string;
last_qso: string;
confirmed_lotw: number;
confirmed_eqsl: number;
confirmed_qsl: number;
confirmed_any: number;
by_mode: Bucket[];
by_band: Bucket[];
by_operator: Bucket[];
by_station: Bucket[];
by_continent: Bucket[];
top_entities: Bucket[];
by_year: Bucket[];
by_month: Bucket[];
window_start: string;
window_end: string;
window_hours: number;
avg_per_hour: number;
avg_per_active: number;
on_air_minutes: number;
off_air_minutes: number;
peak_hour_key: string;
peak_hour_count: number;
best_60: number;
gaps: Gap[];
rate: Bucket[];
static createFrom(source: any = {}) {
return new Stats(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.total = source["total"];
this.unique_calls = source["unique_calls"];
this.entities = source["entities"];
this.continents = source["continents"];
this.first_qso = source["first_qso"];
this.last_qso = source["last_qso"];
this.confirmed_lotw = source["confirmed_lotw"];
this.confirmed_eqsl = source["confirmed_eqsl"];
this.confirmed_qsl = source["confirmed_qsl"];
this.confirmed_any = source["confirmed_any"];
this.by_mode = this.convertValues(source["by_mode"], Bucket);
this.by_band = this.convertValues(source["by_band"], Bucket);
this.by_operator = this.convertValues(source["by_operator"], Bucket);
this.by_station = this.convertValues(source["by_station"], Bucket);
this.by_continent = this.convertValues(source["by_continent"], Bucket);
this.top_entities = this.convertValues(source["top_entities"], Bucket);
this.by_year = this.convertValues(source["by_year"], Bucket);
this.by_month = this.convertValues(source["by_month"], Bucket);
this.window_start = source["window_start"];
this.window_end = source["window_end"];
this.window_hours = source["window_hours"];
this.avg_per_hour = source["avg_per_hour"];
this.avg_per_active = source["avg_per_active"];
this.on_air_minutes = source["on_air_minutes"];
this.off_air_minutes = source["off_air_minutes"];
this.peak_hour_key = source["peak_hour_key"];
this.peak_hour_count = source["peak_hour_count"];
this.best_60 = source["best_60"];
this.gaps = this.convertValues(source["gaps"], Gap);
this.rate = this.convertValues(source["rate"], Bucket);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class WorkedBefore {
callsign: string;
count: number;