-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mapping][TaskInfo] V.2 - Update Task details to allow check informat…
…ion for child task execution (#467)
- Loading branch information
1 parent
caa222b
commit e4a294a
Showing
32 changed files
with
759 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ges/zapp/console/src/components/Executions/TaskExecutionsList/MapTaskExecutionDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as React from 'react'; | ||
import { MapTaskExecution } from 'models/Execution/types'; | ||
import { TaskExecutionPhase } from 'models/Execution/enums'; | ||
import { PanelSection } from 'components/common/PanelSection'; | ||
import { formatRetryAttempt, getTaskRetryAtemptsForIndex } from './utils'; | ||
import { TaskExecutionLogsCard } from './TaskExecutionLogsCard'; | ||
|
||
interface MapTaskExecutionDetailsProps { | ||
taskExecution: MapTaskExecution; | ||
} | ||
|
||
/** Renders an individual map task execution attempts as part of a list */ | ||
export const MapTaskExecutionDetails: React.FC<MapTaskExecutionDetailsProps> = ({ | ||
taskExecution, | ||
}) => { | ||
const { | ||
closure: { metadata }, | ||
taskIndex, | ||
} = taskExecution; | ||
|
||
const filteredResources = getTaskRetryAtemptsForIndex( | ||
metadata?.externalResources ?? [], | ||
taskIndex, | ||
); | ||
|
||
return ( | ||
<PanelSection> | ||
{filteredResources.map((item) => { | ||
const attempt = item.retryAttempt ?? 0; | ||
const headerText = formatRetryAttempt(attempt); | ||
|
||
return ( | ||
<div key={`card-${attempt}`}> | ||
<TaskExecutionLogsCard | ||
taskExecution={taskExecution} | ||
headerText={headerText} | ||
phase={item.phase ?? TaskExecutionPhase.UNDEFINED} | ||
logs={item.logs ?? []} | ||
/> | ||
</div> | ||
); | ||
})} | ||
</PanelSection> | ||
); | ||
}; |
Oops, something went wrong.