-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancements for logEntryEventStream LWC (#337)
* Closed #293 - new logEntryEventStream enhancements to add split-view toggling, add full-screen mode, and add a tabular view (with fields configurable via LoggerParameter.LogEntryEventStreamDisplayFields) * Removed some problematic system log entries in LogEntryEventHandler * Updated some GitHub actions in build.yml to use the latest versions
- Loading branch information
Showing
19 changed files
with
622 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...configuration/customMetadata/LoggerParameter.LogEntryEventStreamDisplayFields.md-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<CustomMetadata | ||
xmlns="http://soap.sforce.com/2006/04/metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
> | ||
<label>Log Entry Event Stream Display Fields</label> | ||
<protected>false</protected> | ||
<values> | ||
<field>Description__c</field> | ||
<value xsi:type="xsd:string">Contains the fields to be displayed in the Tabular view of the Log Entry Event Stream Tab under the Logger Console.</value> | ||
</values> | ||
<values> | ||
<field>Value__c</field> | ||
<value | ||
xsi:type="xsd:string" | ||
>["Timestamp__c", "LoggedByUsername__c", "OriginLocation__c", "LoggingLevel__c", "Message__c"]</value> | ||
</values> | ||
</CustomMetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
nebula-logger/core/main/log-management/classes/LogEntryEventStreamController.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//------------------------------------------------------------------------------------------------// | ||
// This file is part of the Nebula Logger project, released under the MIT License. // | ||
// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // | ||
//------------------------------------------------------------------------------------------------// | ||
|
||
/** | ||
* @group Log Management | ||
* @description Controller class for lwc `logEntryEventStream`, used to stream Log Entries in console and Tabular view. | ||
*/ | ||
@SuppressWarnings('PMD.ApexCRUDViolation, PMD.CyclomaticComplexity, PMD.ExcessivePublicCount') | ||
public with sharing class LogEntryEventStreamController { | ||
@TestVisible | ||
private static final String DISPLAY_FIELDS_PARAMETER_NAME = 'LogEntryEventStreamDisplayFields'; | ||
@TestVisible | ||
private static final List<String> DEFAULT_DISPLAY_FIELDS = new List<String>{ | ||
Schema.LogEntryEvent__e.Timestamp__c.getDescribe().getLocalName(), | ||
Schema.LogEntryEvent__e.LoggedByUsername__c.getDescribe().getLocalName(), | ||
Schema.LogEntryEvent__e.OriginLocation__c.getDescribe().getLocalName(), | ||
Schema.LogEntryEvent__e.LoggingLevel__c.getDescribe().getLocalName(), | ||
Schema.LogEntryEvent__e.Message__c.getDescribe().getLocalName() | ||
}; | ||
/** | ||
* @description Returns the list of columns to be displayed in | ||
* LogEntryEventStream Datatable. The fields are configured | ||
* in the Custom Meta Data (LoggerParameter.LogEntryEventStreamDisplayFields). | ||
* @return The instance of `List<String>`, containing the list of columns to be displayed in | ||
* LogEntryEventStream Datatable . | ||
*/ | ||
@AuraEnabled | ||
public static List<String> getDatatableDisplayFields() { | ||
try { | ||
return LoggerParameter.getStringList(DISPLAY_FIELDS_PARAMETER_NAME, DEFAULT_DISPLAY_FIELDS); | ||
} catch (Exception e) { | ||
throw new AuraHandledException(e.getMessage()); | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
nebula-logger/core/main/log-management/classes/LogEntryEventStreamController.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...main/log-management/lwc/logEntryEventStream/__tests__/data/getDatatableDisplayFields.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["Timestamp__c", "LoggedByUsername__c"] |
Oops, something went wrong.