Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added home page & dashboard to console app #498

Merged
merged 22 commits into from
May 31, 2023
Merged

Conversation

jongpie
Copy link
Owner

@jongpie jongpie commented May 24, 2023

This PR is focused on some related enhancements to help improve the usability & usefulness of the included lightning console app, including:

  • Streamline access to some of Nebula Logger's features (namely, some of the included custom LWCs)
  • Make it easier for admins & developers to find helpful resources for using/configuring Nebula Logger
  • Provide admins & developers with a pre-built dashboard (and more reports) within the core package

These enhancements have culminated in a new home page, available in the console app

image

Console app changes

  • Changed label of console app from "Logger Console" to "Nebula Logger". The API name of the app, LoggerConsole, is not changing - this is just a label change.

    image

  • Added new home page LoggerHomePage.flexipage-meta.xml to the console app (configured as the app's default home page). It includes:

    • A new custom header component, loggerHomeHeader, that provides quick access to information about the current environment & quick access to the latest release notes for Nebula Logger
      image

    • A tab set that includes 4 tabs:

      1. Dashboard: the first & default tab, this displays the new LoggerAdmin dashboard that is now included (previously, this dashboard was available as a separate plugin package)
      2. Settings: this displays the existing LWC loggerSettings, which was previously available via the custom tab "Logger Settings"
      3. Event Stream: this displays the existing LWC logEntryEventStream, which was previously available via the custom tab "Log Entry Event Stream"
      4. Batch Purge: this displays the existing LWC logBatchPurge, which was previously available via the custom tab "Log Batch Purge"
  • Removed several custom tabs from the console app's navigation menu. Since the new home page displays several custom LWCs, their corresponding customs tabs are no longer included in the console app's navigation

    image

    • ⚠For orgs that use the unlocked package & are upgrading: by default, you will still see the old navigation options. You can either leave them as-is, or you can reset the tabs to use the new defaults. To reset & see the new navigation options, open the console app:

      1. In the console's navigation dropdown menu, select the "Edit" option at the bottom
      2. In the modal that opens, select the "Reset Navigation to Default" option at the bottom and click "Save"

      image

Reports & Dashboard Changes

  • The core package now includes a dashboard out of the box, LoggerAdmin. The dashboard is based on 7 new reports that are also included:
    • LogEntryDailyRetentionSummary
    • LogEntryDailySummary
    • LogEntryDetails
    • LogEntryOriginSummary
    • LogEntryScenarioSummary
    • LogEntrySummary
    • LogEntryTagDetails

LWC Changes

  • logBatchPurge LWC

    • Updated the LWC's config to make isExposed = true and added the target lightning__HomePage so that the component can be added in App Builder to the new home page
    • Added a confirmation prompt to the "Run Batch Purge" button to help prevent accidentally starting the job
    • Moved the spinner to only overlay on the lightning-datatable (when refreshing the data), instead of the spinner overlaying the entire page
    • Cleaned up some various code bits in the HTML and JS files (mostly to make some function names & terminology more consistent)
  • logEntryEventStream LWC Enhancements

    • Updated the LWC's config to make isExposed = true and added the target lightning__HomePage so that the component can be added in App Builder to the new home page
    • Removed a line in connectedCallback() that was setting document.title
    • Minor CSS changes to improve the layout of the component within the home page's tab set
  • loggerSettings LWC Enhancements

    • Updated the LWC's config to make isExposed = true and added the target lightning__HomePage so that the component can be added in App Builder to the new home page
    • Removed a line in connectedCallback() that was setting document.title
  • loggerHomeHeader LWC - New!

    • Added new component that's used by the new home page. It provides a link to the current release's release notes, as well as a modal that provides environment details, using a combination of information from the Organization object and from making a callout to Salesforce's Status API, https://api.status.salesforce.com/v1/instances/.
      image

Backend Changes

  • Bugfix: fixed the instance method LogEntryEventBuilder.setExceptionDetails(System.Exception apexException) so it properly handles null values
  • Bugfix: fixed the instance method LogManagementDataSelector.getUsersByNameSearch(String searchTerm) to use LIMIT 20 so it doesn't hit a SOQL query limit in large orgs 😨
  • Added public method Logger.callStatusApi(), used to centralize some existing code that is used to retrieve additional orgs details from Salesforce's Status API, https://api.status.salesforce.com/v1/instances/. Note that this method is only intended to be used internally by Nebula Logger and could change in future releases.

Logger Admin Dashboard Plugin - Now Deprecated! ⚠️

The Logger Admin Dashboard plugin is now deprecated, and will need to be uninstalled prior to upgrading to v4.10.4. The same dashboard & reports are now included in the core package, with one change: the dashboard is no longer a dynamic dashboard (due to the org limit of 5 dynamic dashboards).

…lag in build.yml when using the namespace is not needed
…ackage (namespaces are the worst), and updated some package.json scripts to use the new sfdx syntax for assigning permission sets
…gerSettings lwc, logEntryEventStream lwc, and logBatchPurge lwc
…istent with LogReports

LogReports has been in the codebase for a few years, and renaming folders from 'Log' to 'Logger' would cause orgs to need to re-assign any custom folder permissions, which isn't worth it right now
@jongpie jongpie added Type: Enhancement New feature or request Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Salesforce Feature: Platform Events Items related to how platform events are leveraged by Nebula Logger Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler Plugin: Logger Admin Dashboard Items related to the plugin Logger Admin Dashboard labels May 24, 2023
@jongpie jongpie temporarily deployed to Base Scratch Org May 24, 2023 20:56 — with GitHub Actions Inactive
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org May 24, 2023 20:56 — with GitHub Actions Failure
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org May 24, 2023 21:35 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org May 24, 2023 21:35 — with GitHub Actions Inactive
@jongpie jongpie force-pushed the feature/logger-home-page branch 3 times, most recently from d955741 to aeab760 Compare May 25, 2023 02:54
@jongpie jongpie temporarily deployed to Base Scratch Org May 25, 2023 03:00 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org May 25, 2023 03:00 — with GitHub Actions Inactive
…s, based on data retrieved from the Status API and from querying the Organization object
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org May 26, 2023 18:22 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org May 26, 2023 18:22 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Demo Org May 26, 2023 18:30 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Demo Org May 26, 2023 18:42 — with GitHub Actions Inactive
@jongpie jongpie force-pushed the feature/logger-home-page branch 3 times, most recently from fb8842a to 050d232 Compare May 30, 2023 02:27
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org May 30, 2023 02:44 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org May 30, 2023 02:44 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Demo Org May 30, 2023 02:52 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Demo Org May 30, 2023 03:03 — with GitHub Actions Inactive
@jongpie jongpie marked this pull request as ready for review May 30, 2023 16:15
…ave a more consistent naming convention--no-verify
@jongpie jongpie temporarily deployed to Base Scratch Org May 30, 2023 18:14 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org May 30, 2023 18:14 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Demo Org May 30, 2023 18:26 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Demo Org May 30, 2023 18:39 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Patch coverage: 95.23% and project coverage change: -0.03 ⚠️

Comparison is base (0ba55c3) 95.09% compared to head (dad3e32) 95.07%.

❗ Current head dad3e32 differs from pull request most recent head 44426b1. Consider uploading reports for the commit 44426b1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
- Coverage   95.09%   95.07%   -0.03%     
==========================================
  Files          57       59       +2     
  Lines        5835     5944     +109     
  Branches      118      129      +11     
==========================================
+ Hits         5549     5651     +102     
- Misses        281      288       +7     
  Partials        5        5              
Flag Coverage Δ
Apex 95.49% <96.70%> (-0.01%) ⬇️
LWC 92.83% <92.85%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ent/lwc/logEntryEventStream/logEntryEventStream.js 93.61% <ø> (ø)
...og-management/lwc/loggerSettings/loggerSettings.js 91.56% <ø> (+0.07%) ⬆️
...in/log-management/classes/LogEntryEventHandler.cls 90.04% <66.66%> (-0.54%) ⬇️
...g-management/classes/LogManagementDataSelector.cls 99.00% <66.66%> (-1.00%) ⬇️
...anagement/lwc/loggerHomeHeader/loggerHomeHeader.js 90.90% <90.90%> (ø)
.../log-management/lwc/logBatchPurge/logBatchPurge.js 92.85% <95.45%> (-0.74%) ⬇️
...-logger/core/main/logger-engine/classes/Logger.cls 96.11% <97.14%> (+0.01%) ⬆️
...log-management/classes/LogBatchPurgeController.cls 100.00% <100.00%> (ø)
...-management/classes/LoggerHomeHeaderController.cls 100.00% <100.00%> (ø)
...ain/logger-engine/classes/LogEntryEventBuilder.cls 94.57% <100.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jongpie jongpie merged commit da3bbaa into main May 31, 2023
@jongpie jongpie deleted the feature/logger-home-page branch May 31, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Plugin: Logger Admin Dashboard Items related to the plugin Logger Admin Dashboard Salesforce Feature: Platform Events Items related to how platform events are leveraged by Nebula Logger Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants