mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 06:29:31 -02:30
Fix Each child in a list should have a unique "key" prop warnings in unit tests
This commit is contained in:
@@ -58,13 +58,13 @@ function JobListCancelButton({ i18n, jobsToCancel, onCancel }) {
|
|||||||
one="You do not have permission to cancel the following job:"
|
one="You do not have permission to cancel the following job:"
|
||||||
other="You do not have permission to cancel the following jobs:"
|
other="You do not have permission to cancel the following jobs:"
|
||||||
/>
|
/>
|
||||||
{cannotCancelPermissions.map((job, i) =>
|
{cannotCancelPermissions.map((job, i) => (
|
||||||
i === cannotCancelPermissions.length - 1 ? (
|
<strong key={job}>
|
||||||
<strong> {job}</strong>
|
{' '}
|
||||||
) : (
|
{job}
|
||||||
<strong> {job},</strong>
|
{i !== cannotCancelPermissions.length - 1 ? ',' : ''}
|
||||||
)
|
</strong>
|
||||||
)}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{cannotCancelNotRunning.length > 0 && (
|
{cannotCancelNotRunning.length > 0 && (
|
||||||
@@ -74,13 +74,13 @@ function JobListCancelButton({ i18n, jobsToCancel, onCancel }) {
|
|||||||
one="You cannot cancel the following job because it is not running:"
|
one="You cannot cancel the following job because it is not running:"
|
||||||
other="You cannot cancel the following jobs because they are not running:"
|
other="You cannot cancel the following jobs because they are not running:"
|
||||||
/>
|
/>
|
||||||
{cannotCancelNotRunning.map((job, i) =>
|
{cannotCancelNotRunning.map((job, i) => (
|
||||||
i === cannotCancelNotRunning.length - 1 ? (
|
<strong key={job}>
|
||||||
<strong> {job}</strong>
|
{' '}
|
||||||
) : (
|
{job}
|
||||||
<strong> {job},</strong>
|
{i !== cannotCancelNotRunning.length - 1 ? ',' : ''}
|
||||||
)
|
</strong>
|
||||||
)}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ function ScheduleListItem({
|
|||||||
{Boolean(isMissingInventory || isMissingSurvey) && (
|
{Boolean(isMissingInventory || isMissingSurvey) && (
|
||||||
<span>
|
<span>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={[isMissingInventory, isMissingSurvey].map(message => (
|
content={[isMissingInventory, isMissingSurvey].map(message =>
|
||||||
<div key={message}>{message}</div>
|
message ? <div key={message}>{message}</div> : null
|
||||||
))}
|
)}
|
||||||
position="right"
|
position="right"
|
||||||
>
|
>
|
||||||
<ExclamationTriangleIcon />
|
<ExclamationTriangleIcon />
|
||||||
|
|||||||
Reference in New Issue
Block a user