mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
ensure unique ids on jobs list
This commit is contained in:
@@ -30,6 +30,7 @@ function ExecutionEnvironmentDetail({
|
||||
virtualEnvironment,
|
||||
verifyMissingVirtualEnv,
|
||||
helpText,
|
||||
dataCy,
|
||||
}) {
|
||||
const config = useConfig();
|
||||
const docsLink = `${getDocsBaseUrl(
|
||||
@@ -51,7 +52,7 @@ function ExecutionEnvironmentDetail({
|
||||
</Link>
|
||||
}
|
||||
helpText={helpText}
|
||||
dataCy="execution-environment-detail"
|
||||
dataCy={dataCy}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -89,7 +90,7 @@ function ExecutionEnvironmentDetail({
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
dataCy="missing-execution-environment-detail"
|
||||
dataCy={`missing-${dataCy}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -113,7 +114,7 @@ function ExecutionEnvironmentDetail({
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
dataCy="execution-environment-detail"
|
||||
dataCy={dataCy}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -127,6 +128,7 @@ ExecutionEnvironmentDetail.propTypes = {
|
||||
virtualEnvironment: string,
|
||||
verifyMissingVirtualEnv: bool,
|
||||
helpText: string,
|
||||
dataCy: string,
|
||||
};
|
||||
|
||||
ExecutionEnvironmentDetail.defaultProps = {
|
||||
@@ -135,6 +137,7 @@ ExecutionEnvironmentDetail.defaultProps = {
|
||||
virtualEnvironment: '',
|
||||
verifyMissingVirtualEnv: true,
|
||||
helpText: '',
|
||||
dataCy: 'execution-environment-detail',
|
||||
};
|
||||
|
||||
export default ExecutionEnvironmentDetail;
|
||||
|
||||
@@ -124,6 +124,7 @@ function JobListItem({
|
||||
<ReLaunchDropDown
|
||||
handleRelaunch={handleRelaunch}
|
||||
isLaunching={isLaunching}
|
||||
id={`relaunch-job-${job.id}`}
|
||||
/>
|
||||
)}
|
||||
</LaunchButton>
|
||||
@@ -214,6 +215,7 @@ function JobListItem({
|
||||
<ExecutionEnvironmentDetail
|
||||
executionEnvironment={execution_environment}
|
||||
verifyMissingVirtualEnv={false}
|
||||
dataCy={`execution-environment-detail-${job.id}`}
|
||||
/>
|
||||
)}
|
||||
{credentials && credentials.length > 0 && (
|
||||
|
||||
@@ -15,7 +15,7 @@ function ReLaunchDropDown({
|
||||
isPrimary = false,
|
||||
handleRelaunch,
|
||||
isLaunching,
|
||||
|
||||
id = 'relaunch-job',
|
||||
ouiaId,
|
||||
}) {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
@@ -75,7 +75,7 @@ function ReLaunchDropDown({
|
||||
toggleIndicator={null}
|
||||
onToggle={onToggle}
|
||||
aria-label={t`relaunch jobs`}
|
||||
id="relaunch_jobs"
|
||||
id={id}
|
||||
isPrimary
|
||||
>
|
||||
{t`Relaunch`}
|
||||
@@ -97,7 +97,7 @@ function ReLaunchDropDown({
|
||||
toggleIndicator={null}
|
||||
onToggle={onToggle}
|
||||
aria-label={t`relaunch jobs`}
|
||||
id="relaunch_jobs"
|
||||
id={id}
|
||||
>
|
||||
<RocketIcon />
|
||||
</DropdownToggle>
|
||||
|
||||
Reference in New Issue
Block a user