Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: New "Processing" task and report status #3838

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/locales/gsa-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,7 @@
"Privacy Password": "Privacy-Passwort",
"Private Key": "Privater Schlüssel",
"Privileges Required": "Benötigte Berechtigungen",
"Processing": "Verarbeiten",
"Product": "Produkt",
"Product Detection Result": "Ergebnis zur Produkterkennung",
"Protocol": "Protokoll",
Expand Down
5 changes: 4 additions & 1 deletion src/gmp/models/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const TASK_STATUS = {
interrupted: 'Interrupted',
container: 'Container',
uploading: 'Uploading',
processing: 'Processing',
done: 'Done',
};

Expand All @@ -82,6 +83,7 @@ const TASK_STATUS_TRANSLATIONS = {
Uploading: _l('Uploading'),
Done: _l('Done'),
Queued: _l('Queued'),
Processing: _l('Processing'),
};
/* eslint-disable quote-props */

Expand All @@ -95,7 +97,8 @@ export const isActive = status =>
status === TASK_STATUS.ultimatedeleterequested ||
status === TASK_STATUS.resumerequested ||
status === TASK_STATUS.requested ||
status === TASK_STATUS.queued;
status === TASK_STATUS.queued ||
status === TASK_STATUS.processing;

class Task extends Model {
static entityType = 'task';
Expand Down
5 changes: 4 additions & 1 deletion src/web/components/bar/statusbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ const StatusBar = ({status = 'Unknown', progress = '0'}) => {
background = 'low';
} else if (status === TASK_STATUS.new) {
background = 'new';
} else if (status === TASK_STATUS.running) {
} else if (
status === TASK_STATUS.processing ||
status === TASK_STATUS.running
) {
background = 'run';
}

Expand Down
2 changes: 2 additions & 0 deletions src/web/pages/tasks/dashboard/statusdisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const taskStatusColorScale = scaleOrdinal()
TASK_STATUS.stoprequested,
TASK_STATUS.stopped,
TASK_STATUS.done,
TASK_STATUS.processing,
'N/A',
])
.range([
Expand All @@ -68,6 +69,7 @@ const taskStatusColorScale = scaleOrdinal()
orange(1.0),
orange(0.0),
blue(0.5),
green(-0.5),
'silver',
]);

Expand Down