docbrown/spec/requests/admin
Ridhwana 530e927060
Add ability to re-run a data script from the the data update script page (#12424)
* feat: add an error column to the data update script

* feat: save the error to the error field

* feat: save the error when the script fails

* feat: show the script error on the data update script page

* chore: pass the error to mark_as_failed instead of having its own function

* refactor: use presence

* test: ensure that we test an error case of a data update script

* chore: rename errorneous to failing

* test: update some specs, working on the others

* chore: update tests now that there are two files

* chore: change error from a string to a text to allow for more char

* feat: order the data update scripts by the latest script that ran

* feat: when the script has succeeded reset error to nil

* feat: create a model function that will allow the script to be force run

* chore: oops remove the functions form the worker to the model so it can be re-used

* feat: create an endpoint that will call the model method force run when we hit the api by clicking the button

* feat: ensure that the we add an ajax call that calls the controller endpoint

* chore: remove newline

* refactor: change to a more Restful route

* refactor: use Stimulus

* fix: move the code from the model back into the worker so that we can reuse it in the controller

* feat:call the worker in the force_run action and create a show route

* feat: very first draft of using a polling mechanism on the show method after we kickoff the sidekiq job (still need to error handle)

* chore: some syntax changes and unused variables

* fix: call the method correctly with the paramters

* feat: do some error handling

* feat: error handing on the frontend

* chore: use e instead of err

* refactor: just pass the id instead of the whole script

* chore: remove the button

* fix: allow the id to be passed

* feat: handle errors better

* feat: limit the filename column width

* refactor: use a common function to set the banner error

* test: add a test fro rerun button

* test: v1 of the data update script request

* test: write some specs for the js controller

* Update app/controllers/admin/data_update_scripts_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* tests: update the data worker spec

* chore: clean up the js controller and its tests

* chore: remove whitespaces

* chore: swap the functions based on the controller

* chore: updates to the UI

* chore: remove the standard error catch

* chore: update the alert and error messages

* chore: remove test for error handling for sidekiq run

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-02-02 17:24:39 +02:00
..
tags Add trusted role to new tag moderators (#11242) 2020-11-05 10:36:26 -05:00
users Confirmations that users GDPR data was deleted (#11039) 2020-12-14 12:49:45 +03:00
admin_portals_spec.rb Remove flakey failing test + code on Forem Instance (#12529) 2021-02-02 15:22:34 +02:00
articles_spec.rb Added published date as editable in admin articles list/show (#11124) 2020-11-18 10:40:13 -06:00
badge_achievements_spec.rb Add the Ability to Remove Badge Achievements From Users (#9896) [deploy] 2020-08-25 11:14:47 -06:00
badges_spec.rb Add the Ability to Remove Badge Achievements From Users (#9896) [deploy] 2020-08-25 11:14:47 -06:00
broadcasts_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
buffer_updates_spec.rb Move Bufferizer to services (#12171) 2021-01-08 11:17:20 -05:00
chat_channel_spec.rb [deploy] [Admin Tooling] Allow admins delete empty Connect Channels (#9873) 2020-08-20 14:55:48 +02:00
comments_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
configs_spec.rb generalise sidebar campaign published article timeframe (#12278) 2021-01-19 08:40:39 -06:00
data_update_scripts_spec.rb Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
display_ads_spec.rb Bust sidebar when display ad is updated (#12025) 2020-12-25 11:02:19 -06:00
events_spec.rb Refactor Admin Events Index (#11103) [deploy] 2020-10-29 10:11:15 -06:00
feedback_messages_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
html_variants_spec.rb [deploy] HTML Variant admin dashboard (#10188) 2020-09-28 09:22:13 -06:00
invitations_spec.rb Give Admins Ability to Delete Invitations (#10959) 2020-10-20 12:07:36 -04:00
listings_categories_spec.rb Rename misspelled spec file (#10537) 2020-10-02 17:25:22 +02:00
listings_spec.rb Update bust_listings to service (#12050) 2020-12-29 09:52:34 +01:00
moderator_actions_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
moderator_logs_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
mods_spec.rb Fixes 500 error when viewing the "Tag Mods" page without having the role on the database (#10515) 2020-10-01 12:55:25 -06:00
navigation_link_spec.rb [deploy] Bust caches when navigation links are changed (#10865) 2020-10-21 21:30:31 -04:00
organizations_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
pages_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
permissions_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
podcasts_spec.rb Allow admin to add users as podcast owners (MLH Fellowship) (#11728) [deploy] 2020-12-17 10:55:16 -07:00
privileged_reactions_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
profile_field_groups_spec.rb Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
profile_fields_spec.rb Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
reactions_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
response_templates_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
secrets_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
sidebar_spec.rb Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
sponsorships_spec.rb Adds ability to create new sponsorships from admin dashboard (#10187) 2020-09-03 10:10:37 -06:00
tags_spec.rb Adds ability for admins to create new tags via /admin/tags (#11240) 2020-12-02 08:12:57 -06:00
tools_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
users_manage_spec.rb [EOY 2020] Replace "ban" with "suspend" in Admin (#11581) 2020-11-25 09:15:07 -05:00
users_spec.rb Remove GitHub repositories when GitHub identity is removed (#11951) 2020-12-20 15:15:40 +01:00
welcome_spec.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00