feat(web): clear failed jobs ()

* add clear failed jobs button

* refactor: clean up code

* chore: open api

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Clement Ong 2023-12-05 10:07:20 +08:00 committed by GitHub
parent 933c24ea6f
commit 982183600d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 55 additions and 9 deletions
mobile/openapi/lib/model

View file

@ -27,6 +27,7 @@ class JobCommand {
static const pause = JobCommand._(r'pause');
static const resume = JobCommand._(r'resume');
static const empty = JobCommand._(r'empty');
static const clearFailed = JobCommand._(r'clear-failed');
/// List of all possible values in this [enum][JobCommand].
static const values = <JobCommand>[
@ -34,6 +35,7 @@ class JobCommand {
pause,
resume,
empty,
clearFailed,
];
static JobCommand? fromJson(dynamic value) => JobCommandTypeTransformer().decode(value);
@ -76,6 +78,7 @@ class JobCommandTypeTransformer {
case r'pause': return JobCommand.pause;
case r'resume': return JobCommand.resume;
case r'empty': return JobCommand.empty;
case r'clear-failed': return JobCommand.clearFailed;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');