Skip to content

Commit

Permalink
WIP Stubbed out a new LWC + controller class + custom tab for viewing…
Browse files Browse the repository at this point in the history
… LogEntryArchive__b as part of #117
  • Loading branch information
jongpie committed Mar 22, 2022
1 parent 68f45a7 commit b21e844
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//------------------------------------------------------------------------------------------------//
// 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. //
//------------------------------------------------------------------------------------------------//

public with sharing class LogEntryArchiveController {
@AuraEnabled
public static List<LogEntryArchive__b> getLogEntryArchives() {
// TODO add more fields, add support for filters (based on index),
// add 'order by' or custom sorting (index limits which fields can be used in sort within SOQL)
return [SELECT LoggedByUsername__c, LoggingLevel__c, Message__c FROM LogEntryArchive__b WITH SECURITY_ENFORCED];
}
}
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>54.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//------------------------------------------------------------------------------------------------//
// 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. //
//------------------------------------------------------------------------------------------------//

@IsTest
private class LogEntryArchiveController_Tests {
@IsTest
static void it_has_tests() {
System.assert(false, 'TODO');
}
}
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>54.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<lightning-card title={title} class="slds-p-around_medium">
<div slot="actions">
<lightning-button-group>
<lightning-button label="TODO" icon-name="utility:delete"></lightning-button>
</lightning-button-group>
</div>
<div>
<!-- TODO datatable :-( -->
<lightning-datatable show-row-number-column> </lightning-datatable>
</div>
</lightning-card>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { LightningElement } from 'lwc';

export default class LogEntryArchives extends LightningElement {
get title() {
return 'Log Entry Archives';
}

async connectedCallback() {
document.title = this.title;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<isExposed>false</isExposed>
<masterLabel>Log Entry Archives</masterLabel>
<targets>
<target>lightning__Tab</target>
</targets>
</LightningComponentBundle>
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,8 @@
<object>LogEntryArchive__b</object>
<viewAllRecords>false</viewAllRecords>
</objectPermissions>
<tabSettings>
<tab>LogEntryArchives</tab>
<visibility>Visible</visibility>
</tabSettings>
</PermissionSet>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<label>Log Entry Archives</label>
<lwcComponent>logEntryArchives</lwcComponent>
<motif>Custom13: Box</motif>
</CustomTab>

0 comments on commit b21e844

Please sign in to comment.