Update the dashboard to use the new batch endpoint for closing.
Review Request #12715 — Created Nov. 7, 2022 and submitted
The way that the dashboard currently does batch operations is to iterate
through the entire list of checked items and do an API call for each
one. This works OK but is quite inefficient, and our new batch view
allows doing it all in a single HTTP request.This change moves the close operations (submitted and discarded) over to
that new endpoint. While I was doing this, I updated it a bit to clean
up the code (preferring promises and async/await over callbacks, and
using the_
template string formatter). I also changed the finish
button on the dialog at the end of the process from "Thanks!" to "Close"
because that's always driven me batty.
- Did a bunch of tests with various dashboard states and saw that
everything was closed appropriately. - Set up fake cases where we'd get a subset of closures and a server
error, and saw the expected error messages appear. - Ran unit tests.
- Ran js-tests.