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 4d9d9cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<div class="slds-col slds-size_3-of-4">
<lightning-card title={title} class="slds-p-around_medium" data-id="event-stream-console">
<div slot="actions">
<lightning-button-group >
<lightning-button-group>
<lightning-button label="Clear" icon-name="utility:delete" name="clear" onclick={onClear} variant="destructive"></lightning-button>
<lightning-button-stateful
icon-name-when-off="utility:expand"
Expand Down
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 4d9d9cd

Please sign in to comment.