Skip to content

Commit

Permalink
Fixed some issues reported by lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jongpie committed Sep 14, 2021
1 parent 587f935 commit 232640a
Showing 1 changed file with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LightningElement, track, api } from 'lwc';
import { LightningElement } from 'lwc';
import { subscribe, unsubscribe } from 'lightning/empApi';

export default class LogEntryEventStreamer extends LightningElement {
export default class LogEntryEventStream extends LightningElement {
logEntryEvents = [];
isExpanded = false;
isStreamEnabled = true;
Expand Down Expand Up @@ -91,9 +91,9 @@ export default class LogEntryEventStreamer extends LightningElement {
onToggleStream() {
this.isStreamEnabled = !this.isStreamEnabled;
if (this.isStreamEnabled) {
createSubscription();
this.createSubscription();
} else {
cancelSubscription();
this.cancelSubscription();
}
}

Expand Down Expand Up @@ -129,43 +129,38 @@ export default class LogEntryEventStreamer extends LightningElement {
_meetsLoggedByFilter(logEntryEvent) {
if (!this.loggedByFilter || logEntryEvent.LoggedByUsername__c.includes(this.loggedByFilter)) {
return true;
} else {
return false;
}
return false;
}

_meetsLoggingLevelFilter(logEntryEvent) {
if (!this.loggingLevelFilter || Number(logEntryEvent.LoggingLevelOrdinal__c) >= Number(this.loggingLevelFilter)) {
return true;
} else {
return false;
}
return false;
}

_meetsMessageFilter(logEntryEvent) {
// TODO support for regex searches in Message__c
if (!this.messageFilter || logEntryEvent.Message__c.includes(this.messageFilter)) {
return true;
} else {
return false;
}
return false;
}

_meetsOriginLocationFilter(logEntryEvent) {
// TODO support for regex searches in OriginLocation__c
if (!this.originLocationFilter || logEntryEvent.OriginLocation__c.includes(this.originLocationFilter)) {
return true;
} else {
return false;
}
return false;
}

_meetsOriginTypeFilter(logEntryEvent) {
// TODO support for regex searches in Message__c
if (!this.originTypeFilter || logEntryEvent.OriginType__c == this.originTypeFilter) {
return true;
} else {
return false;
}
return false;
}
}

0 comments on commit 232640a

Please sign in to comment.