From 52167a78471a14cf4bb01af52d433604eeb52e78 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:11:07 +0200 Subject: [PATCH 1/9] Fix collection `populated_state` error check The backend returns `failed` and not `error` as `populated_state` --- client/src/mvc/history/job-states-model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/mvc/history/job-states-model.js b/client/src/mvc/history/job-states-model.js index 167650dd339..f6d52f16f87 100644 --- a/client/src/mvc/history/job-states-model.js +++ b/client/src/mvc/history/job-states-model.js @@ -7,6 +7,7 @@ var UPDATE_DELAY = 2000; var NON_TERMINAL_STATES = ["new", "queued", "running", "waiting"]; var ERROR_STATES = ["error", "deleted"]; var TERMINAL_STATES = ["ok"].concat(ERROR_STATES); +const POPULATED_STATE_FAILED = "failed"; /** Fetch state on add or just wait for polling to start. */ var FETCH_STATE_ON_ADD = false; var BATCH_FETCH_STATE = true; @@ -27,7 +28,7 @@ var JobStatesSummary = Backbone.Model.extend({ }, errored: function () { - return this.get("populated_state") === "error" || this.anyWithStates(ERROR_STATES); + return this.get("populated_state") === POPULATED_STATE_FAILED || this.anyWithStates(ERROR_STATES); }, states: function () { From f5d96e8aa69df9279453758e9b3cf511257a8b54 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:55:31 +0200 Subject: [PATCH 2/9] Fix collection error message rendering - Display `populated_state_message` as description when the populated_state is `failed` --- client/src/components/JobStates/CollectionJobStates.vue | 5 ++++- client/src/components/JobStates/mixin.js | 3 +++ client/src/mvc/history/job-states-model.js | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/components/JobStates/CollectionJobStates.vue b/client/src/components/JobStates/CollectionJobStates.vue index cf001d77e4f..c1b211148ca 100644 --- a/client/src/components/JobStates/CollectionJobStates.vue +++ b/client/src/components/JobStates/CollectionJobStates.vue @@ -1,5 +1,5 @@