Skip to content

Commit

Permalink
webui: fix job status categories in formatter function
Browse files Browse the repository at this point in the history
Some job states are not categorized properly so the column filter on
the job table does not work as expected. This commit fixes the issue.

The categories are Running, Waiting, Success, Warning and Failure.

Fixes #1300: some job status are not categorized properly
  • Loading branch information
fbergkemper committed Jul 5, 2021
1 parent 66f3655 commit b34b2d1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions webui/public/js/bootstrap-table-formatter.js
Expand Up @@ -3,7 +3,7 @@
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos for the canonical source repository
* @copyright Copyright (c) 2020-2020 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @copyright Copyright (c) 2020-2021 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -294,7 +294,7 @@ function formatJobStatus(data) {
// Created no yet running
case 'C':
jobstatus_C = iJS._("Created but not yet running");
output = '<span class="label label-default" title="' + jobstatus_C + '">' + iJS._("Queued") + '</span>';
output = '<span class="label label-default" title="' + jobstatus_C + '">' + iJS._("Waiting") + '</span>';
break;
// Blocked
case 'B':
Expand Down Expand Up @@ -364,12 +364,12 @@ function formatJobStatus(data) {
// SD despooling attributes
case 'a':
jobstatus_a = iJS._("SD despooling attributes");
output = '<span class="label label-info" title="' + jobstatus_a + '">' + iJS._("SD despooling attributes") + '</span>';
output = '<span class="label label-info" title="' + jobstatus_a + '">' + iJS._("Running") + '</span>';
break;
// Doing batch insert file records
case 'i':
jobstatus_i = iJS._("Doing batch insert file records");
output = '<span class="label label-info" title="' + jobstatus_i + '">' + iJS._("Doing batch insert file records") + '</span>';
output = '<span class="label label-info" title="' + jobstatus_i + '">' + iJS._("Running") + '</span>';
break;
// Incomplete
case 'I':
Expand All @@ -379,7 +379,7 @@ function formatJobStatus(data) {
// Committing data
case 'L':
jobstatus_L = iJS._("Committing data (last despool)");
output = '<span class="label label-info" title="' + jobstatus_L + '">' + iJS._("Committing data") + '</span>';
output = '<span class="label label-info" title="' + jobstatus_L + '">' + iJS._("Running") + '</span>';
break;
// Terminated with warnings
case 'W':
Expand All @@ -389,12 +389,12 @@ function formatJobStatus(data) {
// Doing data despooling
case 'l':
jobstatus_l = iJS._("Doing data despooling");
output = '<span class="label label-info" title="' + jobstatus_l +'">' + iJS._("Doing data despooling") + '</span>';
output = '<span class="label label-info" title="' + jobstatus_l +'">' + iJS._("Running") + '</span>';
break;
// Queued waiting for device
case 'q':
jobstatus_q = iJS._("Queued waiting for device");
output = '<span class="label label-default" title="' + jobstatus_q + '">' + iJS._("Queued waiting for device") + '</span>';
output = '<span class="label label-default" title="' + jobstatus_q + '">' + iJS._("Waiting") + '</span>';
break;
default:
output = '<span class="label label-primary">' + data + '</span>';
Expand Down

0 comments on commit b34b2d1

Please sign in to comment.