Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(graph): add parallelism in target details #27014

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 are run in parallel with other tasks. Setting `"parallelism": false` ensures that the target will not run in parallel with other tasks on the same machine.',
docsUrl: 'https://nx.dev/reference/project-configuration#parallelism',
},
};

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