diff --git a/cypress/integration/host/host_events.ts b/cypress/integration/host/host_events.ts index 582c2fdba1..b09752597a 100644 --- a/cypress/integration/host/host_events.ts +++ b/cypress/integration/host/host_events.ts @@ -160,6 +160,11 @@ describe("Host events", () => { text: "Host modify attempt failed", logsTitle: "Additional details", }, + { + hostType: "host-creation-failed", + text: "Host creation failed.", + logsTitle: "Host creation logs", + }, ]; cy.visit(pathWithEvents); clickOnPageSizeBtnAndAssertURLandTableSize(100, dataCyTableRows); @@ -179,6 +184,7 @@ describe("Host events", () => { it("host events logs do not display when not available", () => { cy.visit(pathWithEvents); + clickOnPageSizeBtnAndAssertURLandTableSize(100, dataCyTableRows); cy.dataCy("host-status-changed") .contains("Status changed from running to stopping") .first() diff --git a/src/pages/host/HostEventString.tsx b/src/pages/host/HostEventString.tsx index 515a628a7a..04aa830710 100644 --- a/src/pages/host/HostEventString.tsx +++ b/src/pages/host/HostEventString.tsx @@ -286,6 +286,15 @@ export const HostEventString: React.FC = ({ )} ); + case HostEvent.HostCreatedError: + return ( + + Host creation failed. + {data.logs && ( + + )} + + ); default: return {eventType}; } diff --git a/src/types/host.ts b/src/types/host.ts index 0f3e1b16aa..8bdf43d200 100644 --- a/src/types/host.ts +++ b/src/types/host.ts @@ -39,6 +39,7 @@ export enum UpdateHostStatus { export enum HostEvent { Created = "HOST_CREATED", + HostCreatedError = "HOST_CREATED_ERROR", AgentDeployFailed = "HOST_AGENT_DEPLOY_FAILED", ProvisionError = "HOST_PROVISION_ERROR", Started = "HOST_STARTED",