Commit graph

8 commits

Author SHA1 Message Date
Nick Taylor
e0ee5e71f4
Some eslint fixes. (#14605) 2021-08-27 08:37:09 +01:00
Ridhwana
c5bcb4c021
RFC 50: fix some more hardcoded paths (#13473)
* fix: remove hardcoded paths

* fix: use path helpers

* swap href for link_to

* feat: use path helpers

* feat: use a data path to send through the path that we will be calling

* feat: pass route through to js

* dus index path

* chore: change to use path_helpers

* feat: update DUS controller

* chore: oops remove these paths
2021-04-26 17:49:54 +02:00
Nick Taylor
0beacb19c9
[15 Minute Fix] Added the prefer-const eslint rule (#13098) 2021-03-23 16:29:56 -04:00
Nick Taylor
f222497913
Disabled 'no default exports' rule for Storybook files and Stimulus controllers (#13032) 2021-03-17 21:29:39 -04:00
Ridhwana
d67a259d91
feat: update the messages on the page to use the filename instead of the id. (#12568) 2021-02-04 15:50:02 +02:00
Ridhwana
def4b95616
chore: counter should be 20 not 0 :/ (#12555) 2021-02-03 14:31:41 +02:00
Nick Taylor
4a67d66ec5
Stimulus controllers needed to be default exports. (#12543) 2021-02-02 13:35:28 -05:00
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