From b21e844ada24165328b180292a2d9dfce7f4b979 Mon Sep 17 00:00:00 2001 From: Jonathan Gillespie Date: Mon, 21 Mar 2022 22:47:30 -0400 Subject: [PATCH] WIP Stubbed out a new LWC + controller class + custom tab for viewing LogEntryArchive__b as part of #117 --- .../plugin/classes/LogEntryArchiveController.cls | 13 +++++++++++++ .../classes/LogEntryArchiveController.cls-meta.xml | 5 +++++ .../classes/LogEntryArchiveController_Tests.cls | 12 ++++++++++++ .../LogEntryArchiveController_Tests.cls-meta.xml | 5 +++++ .../lwc/logEntryArchives/logEntryArchives.html | 13 +++++++++++++ .../plugin/lwc/logEntryArchives/logEntryArchives.js | 11 +++++++++++ .../logEntryArchives/logEntryArchives.js-meta.xml | 9 +++++++++ ...oggerLogEntryArchiveAdmin.permissionset-meta.xml | 4 ++++ .../plugin/tabs/LogEntryArchives.tab-meta.xml | 6 ++++++ 9 files changed, 78 insertions(+) create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls-meta.xml create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls-meta.xml create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.html create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js-meta.xml create mode 100644 nebula-logger/plugins/big-object-archiving/plugin/tabs/LogEntryArchives.tab-meta.xml diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls new file mode 100644 index 000000000..3c58d0093 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls @@ -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 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]; + } +} diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls-meta.xml new file mode 100644 index 000000000..40d67933d --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls new file mode 100644 index 000000000..4f6c5cda9 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls @@ -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'); + } +} diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveController_Tests.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.html b/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.html new file mode 100644 index 000000000..fd9326a8e --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.html @@ -0,0 +1,13 @@ + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js b/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js new file mode 100644 index 000000000..24b749b6b --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js @@ -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; + } +} diff --git a/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js-meta.xml new file mode 100644 index 000000000..250bdecf9 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/lwc/logEntryArchives/logEntryArchives.js-meta.xml @@ -0,0 +1,9 @@ + + + 54.0 + false + Log Entry Archives + + lightning__Tab + + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml index 55126465e..1c63b6ec0 100644 --- a/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml +++ b/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml @@ -517,4 +517,8 @@ LogEntryArchive__b false + + LogEntryArchives + Visible + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/tabs/LogEntryArchives.tab-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/tabs/LogEntryArchives.tab-meta.xml new file mode 100644 index 000000000..713f40dd2 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/tabs/LogEntryArchives.tab-meta.xml @@ -0,0 +1,6 @@ + + + + logEntryArchives + Custom13: Box +