Beacon Configuration Admin View, with CRUD and Regenerate and Revoke Tokens Actions#585
Open
FionaLMcLaren wants to merge 31 commits intomainfrom
Open
Beacon Configuration Admin View, with CRUD and Regenerate and Revoke Tokens Actions#585FionaLMcLaren wants to merge 31 commits intomainfrom
FionaLMcLaren wants to merge 31 commits intomainfrom
Conversation
…-api-keys - Removed old beacon migration that conflicted with device migrations - Updated BeaconsController to use Beacons::Creator service for API key generation - Changed beacon relationships from direct provider/tags to many-to-many beacon_providers and beacon_topics - Updated forms to use provider_ids and topic_ids multi-selects instead of single provider_id and tag_ids - Updated show page to display API key (when just created) instead of token - Updated index page to show region, language, provider count, and topic count - Removed beacon_tag model and references as we now use beacon_topics - Changed status from online/offline to active/revoked based on revoked_at timestamp
Topics use 'title' column, not 'name'. Updated controller and views to use Topic.active.order(:title)
- Update API key display messaging for admin context - Add regenerate_key action in BeaconsController using KeyRegenerator service - Add 'Regenerate API Key' button on show page with confirmation dialog - Full API key still shown only after creation/regeneration via flash - Clearer messaging that full key is displayed immediately after provisioning
- Added document_count method to Beacon model to count available topics - Added file_count method to count actual attached document files - Updated show page with 4 stat cards: Status, Available Topics, Document Files, and Configured Filters - Logic respects beacon's language, providers (or region if no providers), and topic filters
Resolves #572 Adds actions to revoke and regenerate tokens. Refactors the previous "regenerate" code in the controller to be in a model TODO: - Controller specs for beacons controller - Route for revoking a Token
FionaLMcLaren
commented
Feb 4, 2026
dbac880 to
ca83796
Compare
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add libffi-dev package to Dockerfile.dev for Alpine Linux to support ffi gem (dependency).
Allows Bundler to resolve dependencies for Darwin 25.
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean Marcia <seanmarcia@github.com>
2071a2e to
3954d6e
Compare
devjona
reviewed
Feb 4, 2026
devjona
reviewed
Feb 4, 2026
Collaborator
|
Hey @FionaLMcLaren for a ticket with so many visual elements, it's really helpful to put some screenshots in the PR description, particularly for:
Thanks! Solid work! |
devjona
reviewed
Feb 4, 2026
devjona
reviewed
Feb 4, 2026
81601e1 to
8dd9f8e
Compare
cd9ea07 to
2464541
Compare
Collaborator
|
@FionaLMcLaren thanks for providing screenshots! Please let us know when it's ready for review. |
e2867e3 to
4cc78e3
Compare
4cc78e3 to
c595113
Compare
Author
|
@devjona This is ready for review! 🫶 |
dmitrytrager
requested changes
Feb 26, 2026
| <div class="form-grid-full" data-controller="select-tags" data-select-tags-dropdown-parent-value="body"> | ||
| <%= form.label :topic_ids, "Topics", class: "form-label" %> | ||
| <%= form.select :topic_ids, | ||
| options_from_collection_for_select(@topics, :id, :title, beacon.topic_ids), |
Collaborator
There was a problem hiding this comment.
Do you need help with this part?
* Move Javascript logic for copying API key from view to its own stimulus controller, `beacons_controller` * Have full API key appear for copying on beacon creation or when the key is regenerated * New `Beacon` helper for status string display logic * Other refactors
devjona
reviewed
Mar 14, 2026
devjona
reviewed
Mar 14, 2026
| export default class extends Controller { | ||
| static targets = ["button", "beaconApiKey"] | ||
|
|
||
| copyApiKey() { |
Collaborator
There was a problem hiding this comment.
I'm not sure this copy functionality is working (tried locally).
Collaborator
There was a problem hiding this comment.
We could add to a later ticket, but the user can still see the API Key and manually select, copy.
Collaborator
There was a problem hiding this comment.
What was the outcome in your case?
Collaborator
|
Can we merge master into this branch please? |
* main: (28 commits) chore(deps): bump rails from 8.1.2 to 8.1.2.1 chore(deps): bump active_storage_validations from 3.0.2 to 3.0.4 chore(deps): bump solid_queue from 1.3.2 to 1.4.0 chore(deps): bump aws-sdk-s3 from 1.215.0 to 1.217.0 chore(deps): bump bcrypt from 3.1.20 to 3.1.22 chore(deps): bump kamal from 2.10.1 to 2.11.0 chore(deps): bump reactionview from 0.2.1 to 0.2.2 chore(deps-dev): bump rspec-rails from 8.0.3 to 8.0.4 chore(deps): bump thruster from 0.1.18 to 0.1.19 chore(deps): bump aws-sdk-s3 from 1.213.0 to 1.215.0 chore(deps-dev): bump faker from 3.6.0 to 3.6.1 chore(deps-dev): bump brakeman from 8.0.2 to 8.0.4 chore(deps): bump actions/upload-artifact from 6 to 7 Add file download endpoint for beacon content sync Add accessible_blobs method to Beacon model chore(deps-dev): bump web-console from 4.2.1 to 4.3.0 chore(deps): bump solid_queue from 1.3.0 to 1.3.2 chore(deps-dev): bump rspec-rails from 8.0.2 to 8.0.3 chore(deps): bump reactionview from 0.2.0 to 0.2.1 Bootstrap Mazer cleanup (#591) ...
Replaced `beacons#copyApiKey` with `click->beacons#copyApiKey` to ensure the Stimulus action is reliably wired up with an explicit event type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… and region Add a beacon-form Stimulus controller that fetches filtered options from a new filter_options endpoint whenever language or region selectors change. Topics are filtered by language_id; providers are filtered by region through the branches join table. Previously selected values that remain valid are preserved after each filter update. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 Issue Does This PR Cover, If Any?
Resolves #572
What Changed? And Why Did It Change?
This PR adds the actions to revoke and regenerate tokens. It refactors the previous
"regenerate" code in the controller to be in a model. These actions are accessible to an admin user on their Admin Dashboard, when viewing a Beacon. This PR also does some cleanup on the views here, e.g.: removing the flashes for
:api_key, as the information is already included in the success flashHow Has This Been Tested?
RSpec
Please Provide Screenshots