docbrown/app
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
..
assets Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
black_box Small adjustment to blackbox.rb (#10961) 2020-10-20 21:14:56 -04:00
controllers Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
decorators Improve cumulative layout shift on comment reactions + optimizations (#12309) 2021-01-18 19:29:44 -05:00
errors [deploy] Add contexts and permissions to liquid tags (#8917) 2020-06-30 14:53:18 -04:00
helpers Prevent text overflow of follow button (#12422) 2021-01-25 17:29:10 +01:00
javascript Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
lib Cleaning Test Runs for End to End (E2E) Tests (#12143) 2021-01-29 13:34:01 +01:00
liquid_tags Bump liquid from 4.0.3 to 5.0.0 (#12150) 2021-01-15 15:37:42 -06:00
mailers Replace collective_noun with community_name (#11846) [deploy] 2020-12-28 09:34:17 -07:00
middlewares Move TimeZoneSetter middleware in proper place (#11336) 2020-11-09 17:11:10 +01:00
models Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
policies Verify current password on password change (#12174) 2021-01-21 12:40:54 +07:00
queries/admin Filter by a few other roles when adding potential mods (#11187) 2020-11-02 15:05:19 -05:00
refinements Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
sanitizers Video max width (#12436) 2021-01-26 15:12:37 +01:00
serializers Reindex comments' Elasticsearch doc when commentable is updated (#12330) 2021-01-20 09:44:59 -05:00
services Remove last DatadogStatsClient (#12490) 2021-01-29 16:11:51 -05:00
uploaders [deploy] Bug Fix: Validate GIFs Frames and Add MiniMagick Timeout (#9319) 2020-07-15 09:49:24 -05:00
validators Add validations to SiteConfig model (#12341) 2021-01-26 09:12:24 +07:00
view_objects Move GeneratedImage to Images::GenerateSocialmage (#11691) 2020-12-02 11:03:14 +07:00
views Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
workers Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00