Changeset View
Changeset View
Standalone View
Standalone View
js_modules/dagit/packages/core/src/partitions/PartitionView.tsx
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | const {loading, loadingPercent, partitions, paginationProps} = useChunkedPartitionsQuery( | ||||
partitionSet.name, | partitionSet.name, | ||||
pageSize, | pageSize, | ||||
runTags, | runTags, | ||||
repoAddress, | repoAddress, | ||||
); | ); | ||||
const onSubmit = React.useCallback(() => setBlockDialog(true), []); | const onSubmit = React.useCallback(() => setBlockDialog(true), []); | ||||
const allStepKeys = {}; | const allStepKeys = new Set<string>(); | ||||
partitions.forEach((partition) => { | partitions.forEach((partition) => { | ||||
partition.runs?.forEach((run) => { | partition.runs.forEach((run) => { | ||||
if (!run) { | |||||
return; | |||||
} | |||||
run.stepStats.forEach((stat) => { | run.stepStats.forEach((stat) => { | ||||
allStepKeys[stat.stepKey] = true; | allStepKeys.add(stat.stepKey); | ||||
}); | }); | ||||
}); | }); | ||||
}); | }); | ||||
return ( | return ( | ||||
<div> | <div> | ||||
<Dialog | <Dialog | ||||
canEscapeKeyClose={!blockDialog} | canEscapeKeyClose={!blockDialog} | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | <div> | ||||
partitions={partitions} | partitions={partitions} | ||||
pipelineName={pipelineName} | pipelineName={pipelineName} | ||||
repoAddress={repoAddress} | repoAddress={repoAddress} | ||||
runTags={runTags} | runTags={runTags} | ||||
setRunTags={setRunTags} | setRunTags={setRunTags} | ||||
stepQuery={stepQuery} | stepQuery={stepQuery} | ||||
setStepQuery={setStepQuery} | setStepQuery={setStepQuery} | ||||
/> | /> | ||||
<PartitionGraphSet partitions={partitions} allStepKeys={Object.keys(allStepKeys)} /> | <PartitionGraphSet partitions={partitions} allStepKeys={Array.from(allStepKeys).sort()} /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
); | ); | ||||
}; | }; | ||||
const PartitionPagerContainer = styled.div` | const PartitionPagerContainer = styled.div` | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
margin-bottom: 10px; | margin-bottom: 10px; | ||||
`; | `; |