Skip to content

Commit

Permalink
feat(graph): add parallelism in target details
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Jul 19, 2024
1 parent 9410164 commit f0f2b0c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,31 @@ export default function TargetConfigurationDetails({
/>
</FadingCollapsible>
</>
) : (
''
)}
) : null}

{targetConfiguration.parallelism === false ? (
<div className="group mb-4">
<h4 className="mb-4">
<Tooltip
openAction="hover"
content={(<PropertyInfoTooltip type="parallelism" />) as any}
>
<span className="font-medium">
<TooltipTriggerText>Parallelism</TooltipTriggerText>
</span>
</Tooltip>
</h4>
<div className="group/line overflow-hidden whitespace-nowrap pl-5">
<TargetConfigurationProperty data={{ paralelism: false }}>
<TargetSourceInfo
className="min-w-0 flex-1 pl-4 opacity-0 transition-opacity duration-150 ease-in-out group-hover/line:opacity-100"
propertyKey={`targets.${targetName}.parallelism`}
sourceMap={sourceMap}
/>
</TargetConfigurationProperty>
</div>
</div>
) : null}
</div>
)}
</div>
Expand Down
9 changes: 8 additions & 1 deletion graph/ui-tooltips/src/lib/property-info-tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ type PropertyInfoTooltipType =
| 'dependsOn'
| 'options'
| 'configurations'
| 'release';
| 'release'
| 'parallelism';

type PropertyInfoTooltipTypeOptions = {
docsUrl?: string;
Expand Down Expand Up @@ -81,6 +82,12 @@ const PROPERTY_INFO_TOOLTIP_TYPE_OPTIONS: Record<
"The nx-release-publish target is used to publish your project with nxrelease. Don't invoke this directly - use nx release publish instead.",
docsUrl: 'https://nx.dev/nx-api/nx/documents/release',
},
parallelism: {
heading: 'Parallelism',
description:
'By default, tasks can be run in parallel with other tasks. By setting `"parallelism": false` in the target\'s configuration, it ensures that the target will not run in parallel with other tasks.',
docsUrl: 'https://nx.dev/reference/project-configuration',
},
};

export function PropertyInfoTooltip({ type }: PropertyInfoTooltipProps) {
Expand Down

0 comments on commit f0f2b0c

Please sign in to comment.