feat(dashboard): Show license and LICENSE dialog in system info widget - #4121
Merged
Conversation
The system info widget now shows the project's license code next to the Ruby and Rails versions, prefixed with a certificate icon, and links to a dialog that prints the full LICENSE file. The code is read from the gemspec so it stays in sync with the packaged license, and rendered through I18n so it can be localized. This makes the license discoverable from the dashboard without leaving the admin.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4121 +/- ##
=======================================
Coverage 98.27% 98.27%
=======================================
Files 351 351
Lines 9219 9224 +5
=======================================
+ Hits 9060 9065 +5
Misses 159 159 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this pull request for?
The dashboard's system info widget now shows the project's license
(
BSD-3-Clause) next to the Ruby and Rails versions, prefixed with acertificate icon. The code links to a dialog that prints the full
LICENSEfile, so the license is discoverable from the admin without leaving the
dashboard.
The license code is read from the gemspec (
Gem.loaded_specs) so it stays insync with the packaged license, and it is passed through I18n
(
alchemy.licenses.*) so it can be localized later.Notable changes (remove if none)
A new
admin/dashboard/licenseroute and action renders theLICENSEfileinto the Alchemy dialog. Viewing it is authorized for any user who can already
access the dashboard.
Screenshots
Attaching below.
Checklist