Version 6.6.0

This commit is contained in:
Chrystian Huot 2022-10-04 07:03:55 -04:00
parent af41604322
commit 6356c3b780
30 changed files with 1125 additions and 961 deletions

View file

@ -1,5 +1,14 @@
# Change log
## Version 6.6
- From now on precompiled versions of macOS will be named as such instead of darwin.
- Better example for rtlsdr-airband that leverage the new #TGHZ, #TGKHZ and #TGMHZ meta tags for dirwatch.
- Fixed dirwatch definition not always showing mask field when type is default.
- Fixed truncated source ids with SDRTrunk parser (issue #265).
- Fixed admin logs not updating if no results are found.
- New parameter http://host:port/?id=xyz added to URL that allows multiple client instances with different talkgroup selections to be retained accross sessions.
## Version 6.5
- Fixed API looping on malformed or invalid multipart content (issue #181, #212).
@ -48,6 +57,7 @@ _v6.5.6_
- Fixed Clients lockup by removing mutex on some unecessary Clients methods.
- Better `DSDPlus Fast Lane` parser. Tested with `ConP(BS)`, `DMR(BS)`, `NEXEDGE48(CS)`, `NEXEDGE48(CB)`, `NEXEDGE48(TB)`, `NEXEDGE96(CB)`, `NEXEDGE96(CS)`, `NEXEDGE96(TB)`, `P25(BS)` and `P25`.
- Fixed unit aliases not displaying on the main screen under certain circumstances.
- New incremental debouncer for emitting listeners count.
## Version 6.4

View file

@ -27,13 +27,13 @@ Clone the official repository on your computer and start the build process.
When finished, you will find the precompiled versions for various platforms in the `dist` folder.
rdio-scanner-darwin-amd64-v6.5.6.zip
rdio-scanner-darwin-arm64-v6.5.6.zip
rdio-scanner-freebsd-amd64-v6.5.6.zip
rdio-scanner-linux-386-v6.5.6.zip
rdio-scanner-linux-amd64-v6.5.6.zip
rdio-scanner-linux-arm64-v6.5.6.zip
rdio-scanner-linux-arm-v6.5.6.zip
rdio-scanner-windows-amd64-v6.5.6.zip
rdio-scanner-darwin-amd64-v6.6.0.zip
rdio-scanner-darwin-arm64-v6.6.0.zip
rdio-scanner-freebsd-amd64-v6.6.0.zip
rdio-scanner-linux-386-v6.6.0.zip
rdio-scanner-linux-amd64-v6.6.0.zip
rdio-scanner-linux-arm64-v6.6.0.zip
rdio-scanner-linux-arm-v6.6.0.zip
rdio-scanner-windows-amd64-v6.6.0.zip
**Happy Rdio scanning !**

View file

@ -16,20 +16,20 @@
################################################################################
app := rdio-scanner
date := 2022/09/19
ver := 6.5.6
date := 2022/10/04
ver := 6.6.0
client := $(wildcard client/*.json client/*.ts)
server := $(wildcard server/*.go)
build = @cd server && GOOS=$(1) GOARCH=$(2) go build -o ../dist/$(1)-$(2)/$(3)
build = @cd server && GOOS=$(1) GOARCH=$(3) go build -o ../dist/$(2)-$(3)/$(4)
pandoc = @test -d dist/$(1)-$(2) || mkdir -p dist/$(1)-$(2) && pandoc -f markdown -o dist/$(1)-$(2)/$(3) --resource-path docs:docs/platforms $(4) docs/webapp.md docs/faq.md CHANGELOG.md
zip = @cd dist/$(1)-$(2) && zip -q ../$(app)-$(1)-$(2)-v$(ver).zip * && cd ..
.PHONY: all clean container dist sed
.PHONY: darwin darwin-amd64 darwin-arm64
.PHONY: freebsd freebsd-amd64
.PHONY: linux linux-386 linux-amd64 linux-arm linux-arm64
.PHONY: macos macos-amd64 macos-arm64
.PHONY: windows windows-amd64
all: clean dist
@ -43,12 +43,12 @@ container: webapp linux-amd64
@podman build --platform linux/amd64,linux/arm,linux/arm64 --pull --manifest rdio-scanner:latest .
@podman manifest push --format v2s2 localhost/rdio-scanner:latest docker://docker.io/chuot/rdio-scanner:latest
dist: darwin freebsd linux windows
dist: freebsd linux macos windows
sed:
@sed -i -re "s|^(\s*\"version\":).*$$|\1 \"$(ver)\"|" client/package.json
@sed -i -re "s|^(const\s+Version\s+=).*$$|\1 \"$(ver)\"|" server/version.go
@sed -i -re "s|v[0-9]+\.[0-9]+\.[0-9]+|v$(ver)|" COMPILING.md docs/docker/README.md docs/platforms/*.md
@sed -i -re "s|v[0-9]+\.[0-9]+\.[0-9]+|v$(ver)|" COMPILING.md README.md docs/docker/README.md docs/platforms/*.md
@sed -i -re "s|[0-9]{4}/[0-9]{2}/[0-9]{2}|$(date)|" docs/docker/README.md docs/platforms/*.md
webapp: server/webapp/index.html
@ -57,26 +57,12 @@ server/webapp/index.html: $(client)
@cd client && test -d node_modules || npm ci --loglevel=error --no-progress
@cd client && npm run build
darwin: darwin-amd64 darwin-arm64
darwin-amd64: webapp dist/$(app)-darwin-amd64-v$(ver).zip
darwin-arm64: webapp dist/$(app)-darwin-arm64-v$(ver).zip
dist/$(app)-darwin-amd64-v$(ver).zip: $(server)
$(call pandoc,darwin,amd64,rdio-scanner.pdf,docs/platforms/darwin.md)
$(call build,darwin,amd64,$(app))
$(call zip,darwin,amd64,$(app))
dist/$(app)-darwin-arm64-v$(ver).zip: $(server)
$(call pandoc,darwin,arm64,rdio-scanner.pdf,docs/platforms/darwin.md)
$(call build,darwin,arm64,$(app))
$(call zip,darwin,arm64,$(app))
freebsd: freebsd-amd64
freebsd-amd64: webapp dist/$(app)-freebsd-amd64-v$(ver).zip
dist/$(app)-freebsd-amd64-v$(ver).zip: $(server)
$(call pandoc,freebsd,amd64,rdio-scanner.pdf,docs/platforms/freebsd.md)
$(call build,freebsd,amd64,$(app))
$(call build,freebsd,freebsd,amd64,$(app))
$(call zip,freebsd,amd64,$(app))
linux: linux-386 linux-amd64 linux-arm linux-arm64
@ -87,28 +73,42 @@ linux-arm64: webapp dist/$(app)-linux-arm64-v$(ver).zip
dist/$(app)-linux-386-v$(ver).zip: $(server)
$(call pandoc,linux,386,rdio-scanner.pdf,docs/platforms/linux.md)
$(call build,linux,386,$(app))
$(call build,linux,linux,386,$(app))
$(call zip,linux,386,$(app))
dist/$(app)-linux-amd64-v$(ver).zip: $(server)
$(call pandoc,linux,amd64,rdio-scanner.pdf,docs/platforms/linux.md)
$(call build,linux,amd64,$(app))
$(call build,linux,linux,amd64,$(app))
$(call zip,linux,amd64,$(app))
dist/$(app)-linux-arm-v$(ver).zip: $(server)
$(call pandoc,linux,arm,rdio-scanner.pdf,docs/platforms/linux.md)
$(call build,linux,arm,$(app))
$(call build,linux,linux,arm,$(app))
$(call zip,linux,arm,$(app))
dist/$(app)-linux-arm64-v$(ver).zip: $(server)
$(call pandoc,linux,arm64,rdio-scanner.pdf,docs/platforms/linux.md)
$(call build,linux,arm64,$(app))
$(call build,linux,linux,arm64,$(app))
$(call zip,linux,arm64,$(app))
macos: macos-amd64 macos-arm64
macos-amd64: webapp dist/$(app)-macos-amd64-v$(ver).zip
macos-arm64: webapp dist/$(app)-macos-arm64-v$(ver).zip
dist/$(app)-macos-amd64-v$(ver).zip: $(server)
$(call pandoc,macos,amd64,rdio-scanner.pdf,docs/platforms/macos.md)
$(call build,darwin,macos,amd64,$(app))
$(call zip,macos,amd64,$(app))
dist/$(app)-macos-arm64-v$(ver).zip: $(server)
$(call pandoc,macos,arm64,rdio-scanner.pdf,docs/platforms/macos.md)
$(call build,darwin,macos,arm64,$(app))
$(call zip,macos,arm64,$(app))
windows: windows-amd64
windows-amd64: webapp dist/$(app)-windows-amd64-v$(ver).zip
dist/$(app)-windows-amd64-v$(ver).zip: $(server)
$(call pandoc,windows,amd64,rdio-scanner.pdf,docs/platforms/windows.md)
$(call build,windows,amd64,$(app).exe)
$(call build,windows,windows,amd64,$(app).exe)
$(call zip,windows,amd64,$(app))

View file

@ -25,15 +25,25 @@ Here is a list of recorders known to work with [Rdio Scanner](https://github.com
ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rdio-scanner) FROM ITS OFFICIAL REPOSITORY AT **[HTTPS://GITHUB.COM/CHUOT/RDIO-SCANNER](https://github.com/chuot/rdio-scanner)**.
1. Download the the latest precompiled version of [Rdio Scanner](https://github.com/chuot/rdio-scanner) from the [releases tab](https://github.com/chuot/rdio-scanner/releases).
1. Download the latest precompiled version of [Rdio Scanner](https://github.com/chuot/rdio-scanner) from the [releases tab](https://github.com/chuot/rdio-scanner/releases).
| Operating system | Architecture | Use package |
| -----------------| ------------ | ------------------------------------- |
| FreeBSD | amd64 | rdio-scanner-freebsd-amd64-v6.6.0.zip |
| Linux | 386 | rdio-scanner-linux-386-v6.6.0.zip |
| Linux | amd64 | rdio-scanner-linux-amd64-v6.6.0.zip |
| Linux | arm | rdio-scanner-linux-arm-v6.6.0.zip |
| Linux | arm64 | rdio-scanner-linux-arm64-v6.6.0.zip |
| macOS | amd64 | rdio-scanner-macos-amd64-v6.6.0.zip |
| macOS | arm64 | rdio-scanner-macos-arm64-v6.6.0.zip |
| Windows | amd64 | rdio-scanner-macos-amd64-v6.6.0.zip |
2. Extract the contents of the archive somewhere on your computer.
3. Run the [Rdio Scanner](https://github.com/chuot/rdio-scanner) executable.
4. Access the administrative dashboard to finalize the configuration.
More detailed instructions are available in the `rdio-scanner.pdf` file provided in the precompiled archives.
If you are updating from version 5, please refer to [docs/update-from-v5.md](docs/update-from-v5.md) before proceeding.
# Docker
As a courtesy to Docker users, [Rdio Scanner](https://github.com/chuot/rdio-scanner) is also distributed as a Docker image where a new version is generated with each new release. More information available at **[https://hub.docker.com/repository/docker/chuot/rdio-scanner](https://hub.docker.com/repository/docker/chuot/rdio-scanner)**.

1316
client/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -38,5 +38,5 @@
"build": "ng build --base-href ./ --configuration production",
"start": "ng serve"
},
"version": "6.5.6"
"version": "6.6.0"
}

View file

@ -82,9 +82,9 @@
</mat-expansion-panel>
</mat-accordion>
<div class="row bottom">
<button type="button" mat-raised-button [disabled]="form?.disabled || form?.pristine"
<button type="button" mat-raised-button [disabled]="form.disabled || form.pristine"
(click)="reset()">Reset</button>
<button type="submit" mat-raised-button color="primary"
[disabled]="form?.disabled || form?.pristine || !form?.valid">Save</button>
[disabled]="form.disabled || form.pristine || !form.valid">Save</button>
</div>
</form>

View file

@ -30,7 +30,7 @@ import { AdminEvent, RdioScannerAdminService, Config } from '../admin.service';
templateUrl: './config.component.html',
})
export class RdioScannerAdminConfigComponent implements OnDestroy, OnInit {
docker: boolean = false;
docker = false;
form: FormGroup | undefined;
@ -84,7 +84,7 @@ export class RdioScannerAdminConfigComponent implements OnDestroy, OnInit {
}
if ('docker' in event) {
this.docker = event.docker!;
this.docker = event.docker ?? false;
}
});

View file

@ -35,8 +35,6 @@ import {
import { RdioScannerService } from '../rdio-scanner.service';
import { RdioScannerSupportComponent } from './support/support.component';
const LOCAL_STORAGE_KEY = RdioScannerService.LOCAL_STORAGE_KEY + '-pin';
@Component({
selector: 'rdio-scanner-main',
styleUrls: [
@ -368,15 +366,7 @@ export class RdioScannerMainComponent implements OnDestroy, OnInit {
private eventHandler(event: RdioScannerEvent): void {
if ('auth' in event && event.auth) {
let password: string | null = null;
password = window?.localStorage?.getItem(LOCAL_STORAGE_KEY);
if (password) {
password = window.atob(password);
window.localStorage.removeItem(LOCAL_STORAGE_KEY);
}
const password = this.rdioScannerService.readPin();
if (password) {
this.authForm.get('password')?.setValue(password);
@ -420,7 +410,7 @@ export class RdioScannerMainComponent implements OnDestroy, OnInit {
const password = this.authForm.get('password')?.value;
if (password) {
window?.localStorage?.setItem(LOCAL_STORAGE_KEY, window.btoa(password));
this.rdioScannerService.savePin(password);
this.authForm.reset();
}

View file

@ -70,7 +70,7 @@ export class RdioScannerComponent implements OnDestroy, OnInit {
*
*/
timer(10000).subscribe(() => {
const ua: String = navigator.userAgent;
const ua: string = navigator.userAgent;
if (ua.includes('Android') || ua.includes('iPad') || ua.includes('iPhone')) {
this.matSnackBar.openFromComponent(RdioScannerNativeComponent, { panelClass: 'snackbar-white' });

View file

@ -19,6 +19,7 @@
import { DOCUMENT } from '@angular/common';
import { EventEmitter, Inject, Injectable, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { interval, Subscription, timer } from 'rxjs';
import { takeWhile } from 'rxjs/operators';
import { AppUpdateService } from '../../shared/update/update.service';
@ -63,7 +64,9 @@ enum WebsocketCommand {
@Injectable()
export class RdioScannerService implements OnDestroy {
static LOCAL_STORAGE_KEY = 'rdio-scanner';
static LOCAL_STORAGE_KEY_LEGACY = 'rdio-scanner';
static LOCAL_STORAGE_KEY_LFM = 'rdio-scanner-lfm';
static LOCAL_STORAGE_KEY_PIN = 'rdio-scanner-pin';
event = new EventEmitter<RdioScannerEvent>();
@ -92,6 +95,8 @@ export class RdioScannerService implements OnDestroy {
time12hFormat: false,
};
private instanceId = 'default';
private livefeedMap = {} as RdioScannerLivefeedMap;
private livefeedMapPriorToHoldSystem: RdioScannerLivefeedMap | undefined;
private livefeedMapPriorToHoldTalkgroup: RdioScannerLivefeedMap | undefined;
@ -108,11 +113,14 @@ export class RdioScannerService implements OnDestroy {
constructor(
appUpdateService: AppUpdateService,
private router: Router,
@Inject(DOCUMENT) private document: Document,
) {
this.bootstrapAudio();
this.restoreLivefeed();
this.initializeInstanceId();
this.readLivefeedMap();
this.openWebsocket();
}
@ -136,7 +144,7 @@ export class RdioScannerService implements OnDestroy {
lfm.timer = undefined;
this.rebuildCategories();
this.storeLivefeedMap();
this.saveLivefeedMap();
this.event.emit({
categories: this.categories,
@ -198,7 +206,7 @@ export class RdioScannerService implements OnDestroy {
this.rebuildCategories();
this.storeLivefeedMap();
this.saveLivefeedMap();
if (this.livefeedMode === RdioScannerLivefeedMode.Online) {
this.startLivefeed();
@ -251,6 +259,12 @@ export class RdioScannerService implements OnDestroy {
});
}
ngOnDestroy(): void {
this.closeWebsocket();
this.stop();
}
holdSystem(options?: { resubscribe?: boolean }): void {
const call = this.call || this.callPrevious;
@ -427,12 +441,6 @@ export class RdioScannerService implements OnDestroy {
this.getCall(id, WebsocketCallFlag.Play);
}
ngOnDestroy(): void {
this.closeWebsocket();
this.stop();
}
pause(status = !this.livefeedPaused): void {
this.livefeedPaused = status;
@ -538,6 +546,16 @@ export class RdioScannerService implements OnDestroy {
this.play(this.call || this.callPrevious);
}
readPin(): string | undefined {
const pin = window?.localStorage?.getItem(`${RdioScannerService.LOCAL_STORAGE_KEY_PIN}`);
return pin ? window.atob(pin) : undefined;
}
savePin(pin: string): void {
window?.localStorage?.setItem(`${RdioScannerService.LOCAL_STORAGE_KEY_PIN}`, window.btoa(pin));
}
searchCalls(options: RdioScannerSearchOptions): void {
this.sendtoWebsocket(WebsocketCommand.ListCall, options);
}
@ -675,7 +693,7 @@ export class RdioScannerService implements OnDestroy {
this.startLivefeed();
}
this.storeLivefeedMap();
this.saveLivefeedMap();
this.cleanQueue();
@ -819,6 +837,10 @@ export class RdioScannerService implements OnDestroy {
return queueCount;
}
private initializeInstanceId(): void {
this.instanceId = this.router.parseUrl(this.router.url).queryParams['id'] || this.instanceId;
}
private openWebsocket(): void {
const websocketUrl = window.location.href.replace(/^http/, 'ws');
@ -1037,6 +1059,36 @@ export class RdioScannerService implements OnDestroy {
}
}
private readLivefeedMap(): void {
try {
let lfm: { [key: number]: { [key: number]: boolean } } = {};
let store = window?.localStorage?.getItem(`${RdioScannerService.LOCAL_STORAGE_KEY_LFM}-${this.instanceId}`);
if (store !== null) {
lfm = JSON.parse(store);
} else {
store = window?.localStorage?.getItem(RdioScannerService.LOCAL_STORAGE_KEY_LEGACY);
if (store !== null) {
lfm = JSON.parse(store);
}
}
Object.keys(lfm ?? {}).forEach((sys: string) => {
Object.keys(lfm[+sys]).forEach((tg) => {
if (!this.livefeedMap[+sys]) this.livefeedMap[+sys] = {};
if (!this.livefeedMap[+sys][+tg]) this.livefeedMap[+sys][+tg] = {} as RdioScannerLivefeed;
this.livefeedMap[+sys][+tg].active = lfm[+sys][+tg];
});
});
} catch (_) {
//
}
}
private rebuildCategories(): void {
this.categories = Object.keys(this.config.groups || []).map((label) => {
const allOff = Object.keys(this.config.groups[label]).map((sys) => +sys)
@ -1096,7 +1148,7 @@ export class RdioScannerService implements OnDestroy {
this.livefeedMap = lfm;
}
this.storeLivefeedMap();
this.saveLivefeedMap();
this.rebuildCategories();
}
@ -1107,20 +1159,16 @@ export class RdioScannerService implements OnDestroy {
this.openWebsocket();
}
private restoreLivefeed(): void {
try {
const lfm = JSON.parse(window?.localStorage?.getItem(RdioScannerService.LOCAL_STORAGE_KEY) || "{}");
private saveLivefeedMap(): void {
const lfm = Object.keys(this.livefeedMap).reduce((sysMap: { [key: number]: { [key: number]: boolean } }, sys: string) => {
sysMap[+sys] = Object.keys(this.livefeedMap[+sys]).reduce((tgMap: { [key: number]: boolean }, tg: string) => {
tgMap[+tg] = this.livefeedMap[+sys][+tg].active;
return tgMap;
}, {});
return sysMap;
}, {});
Object.keys(lfm).forEach((sys) => {
Object.keys(lfm[sys]).forEach((tg) => {
if (!this.livefeedMap[+sys]) this.livefeedMap[+sys] = {};
if (!this.livefeedMap[+sys][+tg]) this.livefeedMap[+sys][+tg] = {} as RdioScannerLivefeed;
this.livefeedMap[+sys][+tg].active = lfm[sys][tg];
});
});
} catch (_) {
//
}
window?.localStorage?.setItem(`${RdioScannerService.LOCAL_STORAGE_KEY_LFM}-${this.instanceId}`, JSON.stringify(lfm));
}
private sendtoWebsocket(command: string, payload?: unknown, flags?: string): void {
@ -1139,17 +1187,6 @@ export class RdioScannerService implements OnDestroy {
}
}
private storeLivefeedMap(): void {
const lfm = Object.keys(this.livefeedMap).reduce((sysMap: { [key: number]: { [key: number]: boolean } }, sys: string) => {
sysMap[+sys] = Object.keys(this.livefeedMap[+sys]).reduce((tgMap: { [key: number]: boolean }, tg: string) => {
tgMap[+tg] = this.livefeedMap[+sys][+tg].active;
return tgMap;
}, {});
return sysMap;
}, {});
window?.localStorage?.setItem(RdioScannerService.LOCAL_STORAGE_KEY, JSON.stringify(lfm));
}
private transformCall(call: RdioScannerCall): RdioScannerCall {
if (call && Array.isArray(this.config?.systems)) {

View file

@ -17,7 +17,7 @@
* ****************************************************************************
*/
import { ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ChangeDetectorRef, Component, OnDestroy, ViewChild } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { BehaviorSubject } from 'rxjs';
@ -38,7 +38,7 @@ import { RdioScannerService } from '../rdio-scanner.service';
styleUrls: ['./search.component.scss'],
templateUrl: './search.component.html',
})
export class RdioScannerSearchComponent implements OnDestroy, OnInit {
export class RdioScannerSearchComponent implements OnDestroy {
call: RdioScannerCall | undefined;
callPending: number | undefined;
@ -104,10 +104,6 @@ export class RdioScannerSearchComponent implements OnDestroy, OnInit {
this.eventSubscription.unsubscribe();
}
ngOnInit(): void {
}
play(id: number): void {
this.rdioScannerService.loadAndPlay(id);
}
@ -234,14 +230,14 @@ export class RdioScannerSearchComponent implements OnDestroy, OnInit {
const options: RdioScannerSearchOptions = {
limit: this.limit,
offset: this.offset,
sort: this.form.value.sort,
sort: this.form.value.sort ?? -1,
};
if (typeof this.form.value.date === 'string') {
options.date = new Date(Date.parse(this.form.value.date));
}
if (this.form.value.group >= 0) {
if (this.form.value.group ?? 0 >= 0) {
const group = this.getSelectedGroup();
if (group) {
@ -249,7 +245,7 @@ export class RdioScannerSearchComponent implements OnDestroy, OnInit {
}
}
if (this.form.value.system >= 0) {
if (this.form.value.system ?? 0 >= 0) {
const system = this.getSelectedSystem();
if (system) {
@ -257,7 +253,7 @@ export class RdioScannerSearchComponent implements OnDestroy, OnInit {
}
}
if (this.form.value.tag >= 0) {
if (this.form.value.tag ?? 0 >= 0) {
const tag = this.getSelectedTag();
if (tag) {
@ -265,7 +261,7 @@ export class RdioScannerSearchComponent implements OnDestroy, OnInit {
}
}
if (this.form.value.talkgroup >= 0) {
if (this.form.value.talkgroup ?? 0 >= 0) {
const talkgroup = this.getSelectedTalkgroup();
if (talkgroup) {
@ -349,22 +345,22 @@ export class RdioScannerSearchComponent implements OnDestroy, OnInit {
}
private getSelectedGroup(): string | undefined {
return this.optionsGroup[this.form.value.group];
return this.optionsGroup[this.form.value.group ?? 0];
}
private getSelectedSystem(): RdioScannerSystem | undefined {
return this.config?.systems.find((system) => system.label === this.optionsSystem[this.form.value.system]);
return this.config?.systems.find((system) => system.label === this.optionsSystem[this.form.value.system ?? 0]);
}
private getSelectedTag(): string | undefined {
return this.optionsTag[this.form.value.tag];
return this.optionsTag[this.form.value.tag ?? 0];
}
private getSelectedTalkgroup(): RdioScannerTalkgroup | undefined {
const system = this.getSelectedSystem();
return system
? system.talkgroups.find((talkgroup) => talkgroup.label === this.optionsTalkgroup[this.form.value.talkgroup])
? system.talkgroups.find((talkgroup) => talkgroup.label === this.optionsTalkgroup[this.form.value.talkgroup ?? 0])
: undefined;
}
}

View file

@ -19,7 +19,7 @@
</legend>
<div>
<button *ngFor="let talkgroup of system.talkgroups" class="rdio-button"
[ngClass]="{ off: !(map[system.id] && map[system.id][talkgroup.id])?.active, on: map[system.id] && map[system.id][talkgroup.id]?.active, blink: map[system.id][talkgroup.id]?.minutes }"
[ngClass]="{ off: !(map[system.id] && map[system.id][talkgroup.id]).active, on: map[system.id] && map[system.id][talkgroup.id].active, blink: map[system.id][talkgroup.id].minutes }"
(click)="avoid({ system: system, talkgroup: talkgroup })">
{{ talkgroup.label }}
</button>

View file

@ -53,12 +53,12 @@ $ docker run --detach --env TZ=America/Toronto --name rdio-scanner --publish 300
520cdbf51fca11d8bacea12d81245f1cb4d984f80d2be2e3039727b59533a6a9
$ docker logs rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:57:23 server started
2022/09/19 08:57:23 base folder is /app/data
2022/09/19 08:57:23 main interface at http://6d87e8dc37a0:3000
2022/09/19 08:57:23 admin interface at http://6d87e8dc37a0:3000/admin
2022/10/04 08:57:23 server started
2022/10/04 08:57:23 base folder is /app/data
2022/10/04 08:57:23 main interface at http://6d87e8dc37a0:3000
2022/10/04 08:57:23 admin interface at http://6d87e8dc37a0:3000/admin
```
You can also use docker-compose to start the server with this simple `docker-compose.yml`:

View file

@ -10,8 +10,8 @@ See the `rtl_airband.conf` file for an example.
In you Rdio Scanner dirwatch configuration, use those parameters:
- Directory: `/tmp/radio/CYMX`
- Directory: `/tmp/radio/Laurentides`
- Extension: `mp3`
- Type: `Default`
- System: _choose the appropriate one_
- Mask: `cymx_#TG_#DATE_#TIME_#HZ`
- Mask: `laurentides_#DATE_#TIME_#TGHZ`

View file

@ -5,42 +5,128 @@ devices: (
{
type = "rtlsdr";
serial = "00000081";
gain = 38.6;
centerfreq = 119.4;
correction = 0;
gain = 22.9;
disable = false;
centerfreq = 119.1;
channels:
(
{
freq = 118.9;
outputs: (
{
type = "file";
directory = "/tmp/radio/CYMX";
filename_template = "cymx_118900";
split_on_transmission = true;
include_freq = true;
}
);
},
{
freq = 119.1;
lowpass = 2500;
highpass = 250;
modulation = "am";
outputs: (
{
type = "file";
directory = "/tmp/radio/CYMX";
filename_template = "cymx_119100";
directory = "/tmp/recorders/Laurentides";
filename_template = "laurentides";
split_on_transmission = true;
include_freq = true;
}
);
}
);
},
{
type = "rtlsdr";
serial = "00000082";
gain = 22.9;
disable = false;
centerfreq = 121.8;
channels:
(
{
freq = 121.8;
lowpass = 2500;
highpass = 250;
modulation = "am";
outputs: (
{
type = "file";
directory = "/tmp/recorders/Laurentides";
filename_template = "laurentides";
split_on_transmission = true;
include_freq = true;
}
);
}
);
},
{
type = "rtlsdr";
serial = "00000083";
gain = 12.5;
disable = false;
centerfreq = 154.61;
channels:
(
{
freq = 154.085;
squelch_threshold = -28;
highpass = 250;
modulation = "nfm";
notch = 94.8;
outputs: (
{
type = "file";
directory = "/tmp/recorders/Laurentides";
filename_template = "laurentides";
split_on_transmission = true;
include_freq = true;
}
);
},
{
freq = 119.9;
freq = 154.370;
squelch_threshold = -28;
highpass = 250;
modulation = "nfm";
outputs: (
{
type = "file";
directory = "/tmp/radio/CYMX";
filename_template = "cymx_119900";
directory = "/tmp/recorders/Laurentides";
filename_template = "laurentides";
split_on_transmission = true;
include_freq = true;
}
);
},
{
freq = 155.490;
squelch_threshold = -28;
highpass = 250;
modulation = "nfm";
outputs: (
{
type = "file";
directory = "/tmp/recorders/Laurentides";
filename_template = "laurentides";
split_on_transmission = true;
include_freq = true;
}
);
}
);
},
{
type = "rtlsdr";
serial = "00000084";
gain = 16.6;
disable = false;
centerfreq = 411.2125;
channels:
(
{
freq = 412.2625;
squelch_threshold = -30;
highpass = 250;
modulation = "nfm";
notch = 123.0;
outputs: (
{
type = "file";
directory = "/tmp/recorders/Laurentides";
filename_template = "laurentides";
split_on_transmission = true;
include_freq = true;
}
@ -48,4 +134,4 @@ devices: (
}
);
}
);
);

View file

@ -20,6 +20,14 @@ A: Please follow instructions at this address: [https://www.wikihow.com/Install-
A: There are so many reverse proxy technologies out there that it's hard the cover them all. One thing to keep in mind is that Rdio Scanner works with websockets, so the reverse proxy must also supports websockets to work properly with Rdio Scanner. For some examples, take a look at the [https://github.com/chuot/rdio-scanner/tree/master/docs/examples/apache](https://github.com/chuot/rdio-scanner/tree/master/docs/examples/apache) for `Apache HTTP` or [https://github.com/chuot/rdio-scanner/tree/master/docs/examples/nginx](https://github.com/chuot/rdio-scanner/tree/master/docs/examples/nginx) for `nginx`.
**Q: How do I get notified when a new release is available**
A: Use the GitHub `watch` feature. This requires you to have a GitHub account, which you can create for free. Go to the Rdio Scanner repository at [https://github.com/chuot/rdio-scanner](https://github.com/chuot/rdio-scanner) and select the `watch` button. You can be notified of every change made to the repository, or simply be notified when a new release is available.
**Q: How can I listen to multiple instances from the same server**
A: Simply open a new browser tab to the same URL with a special `id` parameter that will distinguish each instance from the other. This allows you to remember the selection of talkgroups for each of the instances. Without the `id` parameter, only the last talkgroups selection is remembered across all instances. For example: `http://localhost:3000/?id=instance2`.
**Q: I did not find an answer to my question in this FAQ**
A: No problem, just drop us a line at [rdio-scanner@saubeo.solutions](mailto:rdio-scanner@saubeo.solutions) and we'll make sure to add the relevant information in this document in the next release. In the meantime, You can ask your questions on the [Rdio Scanner Discussions](https://github.com/chuot/rdio-scanner/discussions) at [https://github.com/chuot/rdio-scanner/discussions](https://github.com/chuot/rdio-scanner/discussions).

View file

@ -43,8 +43,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@pc-freebsd:~ $ mkdir rdio-scanner
rdio@pc-freebsd:~ $ cd rdio-scanner
rdio@pc-freebsd:~/rdio-scanner $ unzip \
> ~/rdio-scanner-freebsd-amd64-v6.5.6.zip
Archive: ../rdio-scanner-freebsd-amd64-v6.5.6.zip
> ~/rdio-scanner-freebsd-amd64-v6.6.0.zip
Archive: ../rdio-scanner-freebsd-amd64-v6.6.0.zip
extracting: rdio-scanner
extracting: rdio-scanner.pdf
@ -52,11 +52,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@pc-freebsd:~/rdio-scanner $ ./rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:16:36 server started
2022/09/19 08:16:36 main interface at http://pc-freebsd:3000
2022/09/19 08:16:36 admin interface at http://pc-freebsd:3000/admin
2022/10/04 08:16:36 server started
2022/10/04 08:16:36 main interface at http://pc-freebsd:3000
2022/10/04 08:16:36 admin interface at http://pc-freebsd:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -82,11 +82,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
Password:
root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner -listen :80
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:19:38 server started
2022/09/19 08:19:38 main interface at http://pc-freebsd
2022/09/19 08:19:38 admin interface at http://pc-freebsd/admin
2022/10/04 08:19:38 server started
2022/10/04 08:19:38 main interface at http://pc-freebsd
2022/10/04 08:19:38 admin interface at http://pc-freebsd/admin
## Listening on a SSL port
@ -102,12 +102,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
> -ssl_key_file mykey.key \
> -ssl_listen :443
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 10:34:29 server started
2022/09/19 10:34:29 main interface at http://pc-freebsd
2022/09/19 10:34:29 main interface at https://pc-freebsd
2022/09/19 10:34:29 admin interface at https://pc-freebsd/admin
2022/10/04 10:34:29 server started
2022/10/04 10:34:29 main interface at http://pc-freebsd
2022/10/04 10:34:29 main interface at https://pc-freebsd
2022/10/04 10:34:29 admin interface at https://pc-freebsd/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -127,7 +127,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_auto_cert mydomain.com \
> -ssl_listen :443 \
> -config_save
2022/09/19 10:37:00 rdio-scanner.ini file created
2022/10/04 10:37:00 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -143,12 +143,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
Password:
root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 10:38:28 server started
2022/09/19 10:38:29 main interface at http://pc-freebsd
2022/09/19 10:38:29 main interface at https://pc-freebsd
2022/09/19 10:38:29 admin interface at https://pc-freebsd/admin
2022/10/04 10:38:28 server started
2022/10/04 10:38:29 main interface at http://pc-freebsd
2022/10/04 10:38:29 main interface at https://pc-freebsd
2022/10/04 10:38:29 admin interface at https://pc-freebsd/admin
## Install Rdio Scanner as a service

View file

@ -43,8 +43,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
[rdio@pc-linux ~]$ mkdir rdio-scanner
[rdio@pc-linux ~]$ cd rdio-scanner
[rdio@pc-linux rdio-scanner]$ unzip \
> ~/Downloads/rdio-scanner-linux-amd64-v6.5.6.zip
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.5.6.zip
> ~/Downloads/rdio-scanner-linux-amd64-v6.6.0.zip
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.6.0.zip
inflating: rdio-scanner
inflating: rdio-scanner.pdf
@ -52,11 +52,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
[rdio@pc-linux rdio-scanner]$ ./rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 09:11:48 server started
2022/09/19 09:11:48 main interface at http://pc-linux:3000
2022/09/19 09:11:48 admin interface at http://pc-linux:3000/admin
2022/10/04 09:11:48 server started
2022/10/04 09:11:48 main interface at http://pc-linux:3000
2022/10/04 09:11:48 admin interface at http://pc-linux:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -79,11 +79,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
[rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner -listen :80
[sudo] password for rdio:
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 09:14:00 server started
2022/09/19 09:14:00 main interface at http://pc-linux
2022/09/19 09:14:00 admin interface at http://pc-linux/admin
2022/10/04 09:14:00 server started
2022/10/04 09:14:00 main interface at http://pc-linux
2022/10/04 09:14:00 admin interface at http://pc-linux/admin
## Listening on a SSL port
@ -98,12 +98,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
> -ssl_listen :443
[sudo] password for rdio:
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 09:16:47 server started
2022/09/19 09:16:47 main interface at http://pc-linux
2022/09/19 09:16:47 main interface at https://pc-linux
2022/09/19 09:16:47 admin interface at https://pc-linux/admin
2022/10/04 09:16:47 server started
2022/10/04 09:16:47 main interface at http://pc-linux
2022/10/04 09:16:47 main interface at https://pc-linux
2022/10/04 09:16:47 admin interface at https://pc-linux/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -121,7 +121,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_auto_cert mydomain.com \
> -ssl_listen :443 \
> -config_save
2022/09/19 09:19:29 rdio-scanner.ini file created
2022/10/04 09:19:29 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -136,12 +136,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
[rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner
[sudo] Mot de passe de rdio :
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 09:20:40 server started
2022/09/19 09:20:40 main interface at http://pc-linux
2022/09/19 09:20:40 main interface at https://pc-linux
2022/09/19 09:20:40 admin interface at https://pc-linux/admin
2022/10/04 09:20:40 server started
2022/10/04 09:20:40 main interface at http://pc-linux
2022/10/04 09:20:40 main interface at https://pc-linux
2022/10/04 09:20:40 admin interface at https://pc-linux/admin
## Install Rdio Scanner as a service

View file

@ -43,8 +43,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@macos ~ % mkdir rdio-scanner
rdio@macos ~ % cd rdio-scanner
rdio@macos rdio-scanner % unzip \
> ~/Downloads/rdio-scanner-darwin-arm64-v6.5.6.zip
Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.5.6.zip
> ~/Downloads/rdio-scanner-macos-arm64-v6.6.0.zip
Archive: /Users/rdio/Downloads/rdio-scanner-macos-arm64-v6.6.0.zip
inflating: rdio-scanner
inflating: rdio-scanner.pdf
@ -52,11 +52,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@macos rdio-scanner % ./rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:38:06 server started
2022/09/19 08:38:06 main interface at http://macos.local:3000
2022/09/19 08:38:06 admin interface at http://macos.local:3000/admin
2022/10/04 08:38:06 server started
2022/10/04 08:38:06 main interface at http://macos.local:3000
2022/10/04 08:38:06 admin interface at http://macos.local:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -78,11 +78,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
rdio@macos rdio-scanner % ./rdio-scanner --listen :80
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:48:03 server started
2022/09/19 08:48:03 main interface at http://macos.local
2022/09/19 08:48:03 admin interface at http://macos.local/admin
2022/10/04 08:48:03 server started
2022/10/04 08:48:03 main interface at http://macos.local
2022/10/04 08:48:03 admin interface at http://macos.local/admin
## Listening on a SSL port
@ -96,12 +96,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
> -ssl_key_file mykey.key \
> -ssl_listen :443
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:50:58 server started
2022/09/19 08:50:58 main interface at http://macos.local
2022/09/19 08:50:58 main interface at https://macos.local
2022/09/19 08:50:58 admin interface at https://macos.local/admin
2022/10/04 08:50:58 server started
2022/10/04 08:50:58 main interface at http://macos.local
2022/10/04 08:50:58 main interface at https://macos.local
2022/10/04 08:50:58 admin interface at https://macos.local/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -119,7 +119,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_auto_cert mydomain.com \
> -ssl_listen :443 \
> -config_save
2022/09/19 08:52:24 rdio-scanner.ini file created
2022/10/04 08:52:24 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -133,12 +133,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
rdio@macos rdio-scanner % ./rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 08:54:08 server started
2022/09/19 08:54:08 main interface at http://macos.local
2022/09/19 08:54:08 main interface at https://macos.local
2022/09/19 08:54:08 admin interface at https://macos.local/admin
2022/10/04 08:54:08 server started
2022/10/04 08:54:08 main interface at http://macos.local
2022/10/04 08:54:08 main interface at https://macos.local
2022/10/04 08:54:08 admin interface at https://macos.local/admin
## Install Rdio Scanner as a service

View file

@ -45,7 +45,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
C:\Users\rdio> cd rdio-scanner
C:\Users\rdio\rdio-scanner> tar -xvf ^
..\downloads\rdio-scanner-windows-amd64-v6.5.6.zip
..\downloads\rdio-scanner-windows-amd64-v6.6.0.zip
x rdio-scanner.exe
x rdio-scanner.pdf
@ -53,11 +53,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
C:\Users\rdio\rdio-scanner>rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 13:48:48 server started
2022/09/19 13:48:48 main interface at http://pc-windows:3000
2022/09/19 13:48:48 admin interface at http://pc-windows:3000/admin
2022/10/04 13:48:48 server started
2022/10/04 13:48:48 main interface at http://pc-windows:3000
2022/10/04 13:48:48 admin interface at http://pc-windows:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -79,11 +79,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
C:\Users\rdio\rdio-scanner>rdio-scanner -listen :80
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 10:53:31 server started
2022/09/19 10:53:31 main interface at http://pc-windows
2022/09/19 10:53:31 admin interface at http://pc-windows/admin
2022/10/04 10:53:31 server started
2022/10/04 10:53:31 main interface at http://pc-windows
2022/10/04 10:53:31 admin interface at http://pc-windows/admin
## Listening on a SSL port
@ -97,12 +97,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
-ssl_key_file meykey.key ^
-ssl_listen :443
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 11:05:43 server started
2022/09/19 11:05:43 main interface at http://pc-windows
2022/09/19 11:05:43 main interface at https://pc-windows
2022/09/19 11:05:43 admin interface at https://pc-windows/admin
2022/10/04 11:05:43 server started
2022/10/04 11:05:43 main interface at http://pc-windows
2022/10/04 11:05:43 main interface at https://pc-windows
2022/10/04 11:05:43 admin interface at https://pc-windows/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -120,7 +120,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
-ssl_auto_cert mydomain.com ^
-ssl_listen :443 ^
-config_save
2022/09/19 11:08:28 rdio-scanner.ini file created
2022/10/04 11:08:28 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -134,12 +134,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
C:\Users\rdio\rdio-scanner>rdio-scanner
Rdio Scanner v6.5.6
Rdio Scanner v6.6.0
----------------------------------
2022/09/19 11:11:28 server started
2022/09/19 11:11:28 main interface at http://pc-windows
2022/09/19 11:11:28 main interface at https://pc-windows
2022/09/19 11:11:28 admin interface at https://pc-windows/admin
2022/10/04 11:11:28 server started
2022/10/04 11:11:28 main interface at http://pc-windows
2022/10/04 11:11:28 main interface at https://pc-windows
2022/10/04 11:11:28 admin interface at https://pc-windows/admin
\pagebreak{}

View file

@ -338,14 +338,13 @@ func (admin *Admin) LogsHandler(w http.ResponseWriter, r *http.Request) {
return
}
logOptions := LogsSearchOptions{}
err = logOptions.FromMap(m)
logOptions := NewLogSearchOptions().FromMap(m)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
r, err := admin.Controller.Logs.Search(&logOptions, admin.Controller.Database)
r, err := admin.Controller.Logs.Search(logOptions, admin.Controller.Database)
if err != nil {
admin.Controller.Logs.LogEvent(LogLevelError, err.Error())
w.WriteHeader(http.StatusExpectationFailed)

View file

@ -60,7 +60,7 @@ func (client *Client) Init(controller *Controller, request *http.Request, conn *
client.Controller = controller
client.Conn = conn
client.Livefeed = NewLivefeed()
client.Send = make(chan *Message, 4096)
client.Send = make(chan *Message, 8192)
client.request = request
go func() {

View file

@ -65,9 +65,9 @@ func NewController(config *Config) *Controller {
Systems: NewSystems(),
Tags: NewTags(),
Clients: NewClients(),
Register: make(chan *Client, 4096),
Unregister: make(chan *Client, 4096),
Ingest: make(chan *Call, 4096),
Register: make(chan *Client, 8192),
Unregister: make(chan *Client, 8192),
Ingest: make(chan *Call, 8192),
}
controller.Admin = NewAdmin(controller)
@ -528,15 +528,29 @@ func (controller *Controller) Start() error {
}()
go func() {
var timer *time.Timer
const (
minTimeout = 3
maxTimeout = 15
)
var (
timeout time.Duration = minTimeout
timer *time.Timer
)
doClientsCount := func() {
if timer != nil {
timer.Stop()
timeout++
if timeout > maxTimeout {
timeout = maxTimeout
}
}
timer = time.AfterFunc(time.Second, func() {
timer = time.AfterFunc(timeout*time.Second, func() {
timer = nil
timeout = minTimeout
controller.LogClientsCount()

View file

@ -6,32 +6,32 @@ require (
github.com/dhowden/tag v0.0.0-20220618230019-adf36e896086
github.com/fsnotify/fsnotify v1.5.4
github.com/go-sql-driver/mysql v1.6.0
github.com/golang-jwt/jwt/v4 v4.4.1
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.5.0
github.com/kardianos/service v1.2.1
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
gopkg.in/ini.v1 v1.66.6
modernc.org/sqlite v1.17.3
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be
gopkg.in/ini.v1 v1.67.0
modernc.org/sqlite v1.19.1
)
require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20220927061507-ef77025ab5aa // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
golang.org/x/net v0.0.0-20221002022538-bcab6841153b // indirect
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.11 // indirect
golang.org/x/tools v0.1.12 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.36.0 // indirect
modernc.org/ccgo/v3 v3.16.6 // indirect
modernc.org/libc v1.16.10 // indirect
modernc.org/mathutil v1.4.1 // indirect
modernc.org/memory v1.1.1 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.9 // indirect
modernc.org/libc v1.20.0 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.4.0 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/strutil v1.1.2 // indirect
modernc.org/token v1.0.0 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
)

View file

@ -1,7 +1,5 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dhowden/tag v0.0.0-20220530110423-77907a30b7f1 h1:jD1A7flCBuwFb5PvK3B2u/jmUUZ2j3n3puR0F7peZWM=
github.com/dhowden/tag v0.0.0-20220530110423-77907a30b7f1/go.mod h1:SniNVYuaD1jmdEEvi+7ywb1QFR7agjeTdGKyFb0p7Rw=
github.com/dhowden/tag v0.0.0-20220618230019-adf36e896086 h1:ORubSQoKnncsBnR4zD9CuYFJCPOCuSNEpWEZrDdBXkc=
github.com/dhowden/tag v0.0.0-20220618230019-adf36e896086/go.mod h1:Z3Lomva4pyMWYezjMAU5QWRh0p1VvO4199OHlFnyKkM=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
@ -10,10 +8,10 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ=
github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
@ -23,115 +21,93 @@ github.com/kardianos/service v1.2.1/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0=
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20220927061507-ef77025ab5aa h1:tEkEyxYeZ43TR55QU/hsIt9aRGBxbgGuz9CGykjvogY=
github.com/remyoudompheng/bigfft v0.0.0-20220927061507-ef77025ab5aa/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A=
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc=
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20221002022538-bcab6841153b h1:6e93nYa3hNqAvLr0pD4PN1fFS+gKzp2zAXqrnTCstqU=
golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d h1:Zu/JngovGLVi6t2J3nmAf3AoTDwuzw85YZ3b9o4yU7s=
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY=
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI=
gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.36.0 h1:0kmRkTmqNidmu3c7BNDSdVHCxXCkWLmWmCIVX4LUboo=
modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc=
modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw=
modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ=
modernc.org/ccgo/v3 v3.16.6 h1:3l18poV+iUemQ98O3X5OMr97LOqlzis+ytivU4NqGhA=
modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ=
modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
modernc.org/ccgo/v3 v3.16.9 h1:AXquSwg7GuMk11pIdw7fmO1Y/ybgazVkMhsZWCV0mHM=
modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo=
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA=
modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A=
modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU=
modernc.org/libc v1.16.7/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU=
modernc.org/libc v1.16.10 h1:SRBpcdFf2eYY6B+MAJ4B5SbstLkd2y58ljZTLmAPLxU=
modernc.org/libc v1.16.10/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU=
modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0=
modernc.org/libc v1.20.0 h1:MEbCfCKpuDC/LRb3HOCM9fZOqnPx8le3kzTJVmUGDbU=
modernc.org/libc v1.20.0/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0=
modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8=
modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU=
modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw=
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw=
modernc.org/memory v1.4.0 h1:crykUfNSnMAXaOJnnxcSzbUGMqkLWjklJKkBK2nwZwk=
modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/sqlite v1.17.3 h1:iE+coC5g17LtByDYDWKpR6m2Z9022YrSh3bumwOnIrI=
modernc.org/sqlite v1.17.3/go.mod h1:10hPVYar9C0kfXuTWGz8s0XtB8uAGymUy51ZzStYe3k=
modernc.org/sqlite v1.19.1 h1:8xmS5oLnZtAK//vnd4aTVj8VOeTAccEFOtUnIzfSw+4=
modernc.org/sqlite v1.19.1/go.mod h1:UfQ83woKMaPW/ZBruK0T7YaFCrI+IE0LeWVY6pmnVms=
modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=
modernc.org/strutil v1.1.2 h1:iFBDH6j1Z0bN/Q9udJnnFoFpENA4252qe/7/5woE5MI=
modernc.org/strutil v1.1.2/go.mod h1:OYajnUAcI/MX+XD/Wx7v1bbdvcQSvxgtb0gC+u3d3eg=
modernc.org/tcl v1.13.1 h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao=
modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw=
modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk=
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
modernc.org/tcl v1.14.0 h1:cO7oyRWEXweSJmjdbs1L86P52D9QmBy/CPFKmFvNYTU=
modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM=
modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8=
modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/z v1.6.0 h1:gLwAw6aS973K/k9EOJGlofauyMk4YOUiPDYzWnq/oXo=

View file

@ -175,10 +175,6 @@ func (logs *Logs) Search(searchOptions *LogsSearchOptions, db *Database) (*LogsS
return nil, formatError(fmt.Errorf("%v, %v", err, query))
}
if dateTime == nil {
return nil, nil
}
if t, err := db.ParseDateTime(dateTime); err == nil {
logResults.DateStart = t
}
@ -247,7 +243,11 @@ type LogsSearchOptions struct {
Sort any `json:"sort,omitempty"`
}
func (searchOptions *LogsSearchOptions) FromMap(m map[string]any) error {
func NewLogSearchOptions() *LogsSearchOptions {
return &LogsSearchOptions{}
}
func (searchOptions *LogsSearchOptions) FromMap(m map[string]any) *LogsSearchOptions {
switch v := m["date"].(type) {
case string:
if t, err := time.Parse(time.RFC3339, v); err == nil {
@ -275,7 +275,7 @@ func (searchOptions *LogsSearchOptions) FromMap(m map[string]any) error {
searchOptions.Sort = int(v)
}
return nil
return searchOptions
}
type LogsSearchResults struct {

View file

@ -83,7 +83,7 @@ func main() {
hostname = defaultAddr
}
if s := strings.Split(controller.Config.Listen, ":"); len(s) > 1 {
if s := strings.Split(config.Listen, ":"); len(s) > 1 {
addr = s[0]
port = s[1]
} else {
@ -94,7 +94,7 @@ func main() {
addr = defaultAddr
}
if s := strings.Split(controller.Config.SslListen, ":"); len(s) > 1 {
if s := strings.Split(config.SslListen, ":"); len(s) > 1 {
sslAddr = s[0]
sslPort = s[1]
} else {
@ -206,12 +206,12 @@ func main() {
return s
}
if len(controller.Config.SslCertFile) > 0 && len(controller.Config.SslKeyFile) > 0 {
if len(config.SslCertFile) > 0 && len(config.SslKeyFile) > 0 {
go func() {
sslPrintInfo()
sslCert := controller.Config.GetSslCertFilePath()
sslKey := controller.Config.GetSslKeyFilePath()
sslCert := config.GetSslCertFilePath()
sslKey := config.GetSslKeyFilePath()
server := newServer(fmt.Sprintf("%s:%s", sslAddr, sslPort), nil)
@ -220,14 +220,14 @@ func main() {
}
}()
} else if controller.Config.SslAutoCert != "" {
} else if config.SslAutoCert != "" {
go func() {
sslPrintInfo()
manager := &autocert.Manager{
Cache: autocert.DirCache("autocert"),
Prompt: autocert.AcceptTOS,
HostPolicy: autocert.HostWhitelist(controller.Config.SslAutoCert),
HostPolicy: autocert.HostWhitelist(config.SslAutoCert),
}
server := newServer(fmt.Sprintf("%s:%s", sslAddr, sslPort), manager.TLSConfig())

View file

@ -147,7 +147,7 @@ func ParseSdrTrunkMeta(call *Call, controller *Controller) error {
s = regexp.MustCompile(`^([0-9]+) ?(.*)$`).FindStringSubmatch(m.Artist())
if len(s) >= 2 {
if i, err = strconv.Atoi(s[1][0:1]); err != nil {
if i, err = strconv.Atoi(s[1]); err != nil {
return err
}
if i > 0 {

View file

@ -15,4 +15,4 @@
package main
const Version = "6.5.6"
const Version = "6.6.0"