-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add troubleshooting script button to dashboard #844
Comments
Can you provide more details on this? |
This is something Kiah had suggested in Slack: "It would be possible to add a few buttons in the UI that would trigger these commands, which would make it possible for tenant admins to run these 'data repair' tasks. We’d probably want to add a paragraph near each button explaining what it does and when you’d need to use it, but actually hooking the button up to the code would be very simple." |
Existing "scripts" that I believe would be good candidates for this ticket:
I don't think this is relevant for this task, but for visibility, these all have corresponding rake tasks here (which is why I originally called them "scripts") |
Adds a new menu, `Data Repair` which contains buttons to submit RolesService repair tasks as jobs. Jobs included are: * CreateCollectionAccessesJob, * CreateAdminSetAccessesJob, * CreateCollectionTypeParticipantsJob, * GrantWorkflowRolesForAllAdminSetsJob Refs: #844
Adds a new menu, `Data Repair` which contains buttons to submit RolesService repair tasks as jobs. Jobs included are: * CreateCollectionAccessesJob, * CreateAdminSetAccessesJob, * CreateCollectionTypeParticipantsJob, * GrantWorkflowRolesForAllAdminSetsJob Refs: #844
QA Results: Pass ✅@ndroark This is ready for your review Tested on: Staging TestingNavigate to dashboard and select Data Repair menu.
Acceptance Criteria
ScreenshotsCreate Collection Accesses ✅Create Admin Set Accesses ✅Creation Collection Type Participants ✅Admin Set Workflow RolesNOTE: |
Contribute back the following features: - scientist-softserv/palni-palci#445 - scientist-softserv/palni-palci#659 - scientist-softserv/palni-palci#740 - scientist-softserv/palni-palci#748 - scientist-softserv/palni-palci#823 - scientist-softserv/palni-palci#843 - scientist-softserv/palni-palci#844 - scientist-softserv/palni-palci#911 Which were resolved via the following PRs: - scientist-softserv/palni-palci#920 - scientist-softserv/palni-palci#704 - scientist-softserv/palni-palci#706 - scientist-softserv/palni-palci#790 - scientist-softserv/palni-palci#867 - scientist-softserv/palni-palci#874 - scientist-softserv/palni-palci#893 - scientist-softserv/palni-palci#898 - scientist-softserv/palni-palci#824 - scientist-softserv/palni-palci#923 - scientist-softserv/palni-palci#939 - scientist-softserv/palni-palci#922 - scientist-softserv/palni-palci#926 - scientist-softserv/palni-palci#927 - scientist-softserv/palni-palci#928 - scientist-softserv/palni-palci#929 - scientist-softserv/palni-palci#930 - scientist-softserv/palni-palci#931 - scientist-softserv/palni-palci#943 - scientist-softserv/palni-palci#945 - scientist-softserv/palni-palci#954 Co-authored-by: Lea Ann Bradford <ltrammer@gmail.com> Co-authored-by: LaRita Robinson <larita@scientist.com> Co-authored-by: Kirk Wang <kirk.wang@scientist.com> Co-authored-by: Shana Moore <shana@scientist.com>
Contribute back the following features: - scientist-softserv/palni-palci#445 - scientist-softserv/palni-palci#659 - scientist-softserv/palni-palci#740 - scientist-softserv/palni-palci#748 - scientist-softserv/palni-palci#823 - scientist-softserv/palni-palci#843 - scientist-softserv/palni-palci#844 - scientist-softserv/palni-palci#911 Which were resolved via the following PRs: - scientist-softserv/palni-palci#920 - scientist-softserv/palni-palci#704 - scientist-softserv/palni-palci#706 - scientist-softserv/palni-palci#790 - scientist-softserv/palni-palci#867 - scientist-softserv/palni-palci#874 - scientist-softserv/palni-palci#893 - scientist-softserv/palni-palci#898 - scientist-softserv/palni-palci#824 - scientist-softserv/palni-palci#923 - scientist-softserv/palni-palci#939 - scientist-softserv/palni-palci#922 - scientist-softserv/palni-palci#926 - scientist-softserv/palni-palci#927 - scientist-softserv/palni-palci#928 - scientist-softserv/palni-palci#929 - scientist-softserv/palni-palci#930 - scientist-softserv/palni-palci#931 - scientist-softserv/palni-palci#943 - scientist-softserv/palni-palci#945 - scientist-softserv/palni-palci#954 Co-authored-by: Lea Ann Bradford <ltrammer@gmail.com> Co-authored-by: LaRita Robinson <larita@scientist.com> Co-authored-by: Kirk Wang <kirk.wang@scientist.com> Co-authored-by: Shana Moore <shana@scientist.com>
Contribute back the following features: - scientist-softserv/palni-palci#445 - scientist-softserv/palni-palci#659 - scientist-softserv/palni-palci#740 - scientist-softserv/palni-palci#748 - scientist-softserv/palni-palci#823 - scientist-softserv/palni-palci#843 - scientist-softserv/palni-palci#844 - scientist-softserv/palni-palci#911 Which were resolved via the following PRs: - scientist-softserv/palni-palci#920 - scientist-softserv/palni-palci#704 - scientist-softserv/palni-palci#706 - scientist-softserv/palni-palci#790 - scientist-softserv/palni-palci#867 - scientist-softserv/palni-palci#874 - scientist-softserv/palni-palci#893 - scientist-softserv/palni-palci#898 - scientist-softserv/palni-palci#824 - scientist-softserv/palni-palci#923 - scientist-softserv/palni-palci#939 - scientist-softserv/palni-palci#922 - scientist-softserv/palni-palci#926 - scientist-softserv/palni-palci#927 - scientist-softserv/palni-palci#928 - scientist-softserv/palni-palci#929 - scientist-softserv/palni-palci#930 - scientist-softserv/palni-palci#931 - scientist-softserv/palni-palci#943 - scientist-softserv/palni-palci#945 - scientist-softserv/palni-palci#954 Co-authored-by: Lea Ann Bradford <ltrammer@gmail.com> Co-authored-by: LaRita Robinson <larita@scientist.com> Co-authored-by: Kirk Wang <kirk.wang@scientist.com> Co-authored-by: Shana Moore <shana@scientist.com>
Contribute back the following features: - scientist-softserv/palni-palci#445 - scientist-softserv/palni-palci#659 - scientist-softserv/palni-palci#740 - scientist-softserv/palni-palci#748 - scientist-softserv/palni-palci#823 - scientist-softserv/palni-palci#843 - scientist-softserv/palni-palci#844 - scientist-softserv/palni-palci#911 Which were resolved via the following PRs: - scientist-softserv/palni-palci#920 - scientist-softserv/palni-palci#704 - scientist-softserv/palni-palci#706 - scientist-softserv/palni-palci#790 - scientist-softserv/palni-palci#867 - scientist-softserv/palni-palci#874 - scientist-softserv/palni-palci#893 - scientist-softserv/palni-palci#898 - scientist-softserv/palni-palci#824 - scientist-softserv/palni-palci#923 - scientist-softserv/palni-palci#939 - scientist-softserv/palni-palci#922 - scientist-softserv/palni-palci#926 - scientist-softserv/palni-palci#927 - scientist-softserv/palni-palci#928 - scientist-softserv/palni-palci#929 - scientist-softserv/palni-palci#930 - scientist-softserv/palni-palci#931 - scientist-softserv/palni-palci#943 - scientist-softserv/palni-palci#945 - scientist-softserv/palni-palci#954 Co-authored-by: Lea Ann Bradford <ltrammer@gmail.com> Co-authored-by: LaRita Robinson <larita@scientist.com> Co-authored-by: Kirk Wang <kirk.wang@scientist.com> Co-authored-by: Shana Moore <shana@scientist.com>
Summary
https://assaydepot.slack.com/archives/C0313NKC08L/p1678912353694389?thread_ts=1678804802.634039&cid=C0313NKC08L
Pals would like to add a few buttons in the UI that would trigger commands that allow tenant admins to run 'data repair' tasks. They would like a paragraph near each button explaining what it does and when you'd need to us it.
Scripts to include:
Tasks
RoleService
methods should be extracted to anApplicationJob#perform
method; these jobs should be an inner class within the existingRoleService
(e.g.RoleService::CreateAdminSetAccessesJob
). The existing methods (e.g.RolesService.grant_workflow_roles_for_all_admin_sets!
) should call#perform_now
on their corresponding job (this is to preserve existing method interfaces).RolesService.grant_workflow_roles_for_all_admin_sets!
RolesService.create_collection_accesses!
RolesService.create_admin_set_accesses!
RolesService.create_collection_type_participants!
authorize! :update, RoleService
/admin/role_services/:job_name_key
); thus requiring only one controller action.POST
request.notice
of the job submitted.can :update, RoleService
can! :update, RoleService
:update RoleService
?Consideration; the rake tasks loop through each tenant and for each tenant call the corresponding
RoleService
method. Put another way, these administrative actions may need to consider per tenant basis and/or proprietor.Acceptance Criteria
Caveats
Given that there is a request for a "paragraph of text explaining each button"; we want to consider that a drop down menu option might not be ideal. This might mean a full page for administrative tasks.
Testing
Navigate to dashboard and select Data Repair menu.
Click button
Verify that appropriate job was submitted to job queue
The text was updated successfully, but these errors were encountered: