docbrown/app/javascript
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
..
.storybook Storybook dropdown should be accessible 11724 (#12295) 2021-01-19 08:51:37 +00:00
actionsPanel Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
admin Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
analytics Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
article-form Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
articles Don't display '0 reactions' on article feed (#12425) 2021-01-27 11:13:10 -05:00
chat Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
CommentSubscription Remove non application files from frontend code coverage (#11752) 2020-12-04 20:00:20 -05:00
common-prop-types Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
contentDisplayPolicy Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
crayons updates article form to have warning modal (#12430) 2021-01-28 11:32:28 -05:00
githubRepos Deprecate old button stylings with Crayons buttons (#10694) [deploy] 2020-10-14 07:28:41 -07:00
icons Storybook: Add DocsPage and test out static content (#11397) 2020-12-02 09:56:38 -08:00
leftSidebar [deploy] Fix tag display bug and crayonsify area (#10868) 2020-10-20 16:07:17 -04:00
listings Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
modCenter Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
onboarding Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
organization Fixed Error: Not implemented: window.computedStyle(elt, pseudoElt) console error in frontend tests. (#11633) 2020-11-26 16:55:33 -05:00
packs Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
podcasts Remove non application files from frontend code coverage (#11752) 2020-12-04 20:00:20 -05:00
profileDropdown Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
readingList Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
responseTemplates Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
Search Storybook: Add DocsPage and test out static content (#11397) 2020-12-02 09:56:38 -08:00
searchableItemList Filter by tags of reading list items not tags you follow (#11394) 2020-11-13 10:45:32 -05:00
shared/components Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
sidebar-widget Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
Snackbar Storybook: Add DocsPage and test out static content (#11397) 2020-12-02 09:56:38 -08:00
topNavigation Header navigation dropdown accessibility (#11509) 2021-01-27 09:39:17 +00:00
utilities Updates ESLint rules to error on default imports (#12512) 2021-02-02 10:24:03 -05:00
.eslintrc.js Added a comment mentioning that index.js overrides are for barrel files (#8978) 2020-06-29 10:52:35 -04:00
netlify.toml Update Netlify config to handle stylesheet changes for Storybook (#9753) 2020-08-12 11:02:14 -04:00