startDate: string
level: LogLevel
logType: 'audit' | 'standard'
+ tagsOneOf: string[] = []
constructor (
private logsService: LogsService,
load () {
this.loading = true
- this.logsService.getLogs({ isAuditLog: this.isAuditLog(), level: this.level, startDate: this.startDate })
- .subscribe({
- next: logs => {
- this.logs = logs
-
- setTimeout(() => {
- this.logsElement.nativeElement.scrollIntoView({ block: 'end', inline: 'nearest' })
- })
- },
+ const tagsOneOf = this.tagsOneOf.length !== 0
+ ? this.tagsOneOf
+ : undefined
+
+ this.logsService.getLogs({
+ isAuditLog: this.isAuditLog(),
+ level: this.level,
+ startDate: this.startDate,
+ tagsOneOf
+ }).subscribe({
+ next: logs => {
+ this.logs = logs
+
+ setTimeout(() => {
+ this.logsElement.nativeElement.scrollIntoView({ block: 'end', inline: 'nearest' })
+ })
+ },
- error: err => this.notifier.error(err.message),
+ error: err => this.notifier.error(err.message),
- complete: () => this.loading = false
- })
+ complete: () => this.loading = false
+ })
}
isAuditLog () {