Updating automation history tab to handle the stopped error status which can occur for CRONs.
This commit is contained in:
parent
9489e309b5
commit
e068e301ff
|
@ -4,11 +4,13 @@
|
|||
|
||||
$: isError = !value || value.toLowerCase() === "error"
|
||||
$: isStoppedError = value?.toLowerCase() === "stopped_error"
|
||||
$: isStopped = value?.toLowerCase() === "stopped" || isStoppedError
|
||||
$: info = getInfo(isError, isStopped)
|
||||
$: isStopped = value?.toLowerCase() === "stopped"
|
||||
$: info = getInfo(isError, isStopped, isStoppedError)
|
||||
|
||||
const getInfo = (error, stopped) => {
|
||||
if (error) {
|
||||
function getInfo(error, stopped, stoppedError) {
|
||||
if (stoppedError) {
|
||||
return { color: "red", message: "Stopped - Error" }
|
||||
} else if (error) {
|
||||
return { color: "red", message: "Error" }
|
||||
} else if (stopped) {
|
||||
return { color: "yellow", message: "Stopped" }
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
const ERROR = "error",
|
||||
SUCCESS = "success",
|
||||
STOPPED = "stopped"
|
||||
STOPPED = "stopped",
|
||||
STOPPED_ERROR = "stopped_error"
|
||||
const sidePanel = getContext("side-panel")
|
||||
|
||||
let pageInfo = createPaginationStore()
|
||||
|
@ -52,6 +53,7 @@
|
|||
{ value: SUCCESS, label: "Success" },
|
||||
{ value: ERROR, label: "Error" },
|
||||
{ value: STOPPED, label: "Stopped" },
|
||||
{ value: STOPPED_ERROR, label: "Stopped - Error" },
|
||||
]
|
||||
|
||||
const runHistorySchema = {
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
AutomationMetadata,
|
||||
AutomationStatus,
|
||||
AutomationStep,
|
||||
AutomationStepStatus,
|
||||
} from "@budibase/types"
|
||||
import {
|
||||
AutomationContext,
|
||||
|
@ -452,7 +453,10 @@ class Orchestrator {
|
|||
this.executionOutput.steps.splice(loopStepNumber + 1, 0, {
|
||||
id: step.id,
|
||||
stepId: step.stepId,
|
||||
outputs: { status: AutomationStatus.NO_ITERATIONS, success: true },
|
||||
outputs: {
|
||||
status: AutomationStepStatus.NO_ITERATIONS,
|
||||
success: true,
|
||||
},
|
||||
inputs: {},
|
||||
})
|
||||
|
||||
|
|
|
@ -179,12 +179,15 @@ export interface AutomationTrigger extends AutomationTriggerSchema {
|
|||
id: string
|
||||
}
|
||||
|
||||
export enum AutomationStepStatus {
|
||||
NO_ITERATIONS = "no_iterations",
|
||||
}
|
||||
|
||||
export enum AutomationStatus {
|
||||
SUCCESS = "success",
|
||||
ERROR = "error",
|
||||
STOPPED = "stopped",
|
||||
STOPPED_ERROR = "stopped_error",
|
||||
NO_ITERATIONS = "no_iterations",
|
||||
}
|
||||
|
||||
export interface AutomationResults {
|
||||
|
|
Loading…
Reference in New Issue