mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Merge pull request #11489 from nixocio/ui_issue_11452
Fix relaunch of jobs
This commit is contained in:
commit
afc210a70d
@ -135,7 +135,7 @@ function JobListItem({
|
||||
<Button
|
||||
ouiaId={`${job.id}-relaunch-button`}
|
||||
variant="plain"
|
||||
onClick={handleRelaunch}
|
||||
onClick={() => handleRelaunch()}
|
||||
aria-label={t`Relaunch`}
|
||||
isDisabled={isLaunching}
|
||||
>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { number, shape } from 'prop-types';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
@ -32,7 +32,8 @@ function canLaunchWithoutPrompt(launchData) {
|
||||
);
|
||||
}
|
||||
|
||||
function LaunchButton({ resource, children, history }) {
|
||||
function LaunchButton({ resource, children }) {
|
||||
const history = useHistory();
|
||||
const [showLaunchPrompt, setShowLaunchPrompt] = useState(false);
|
||||
const [launchConfig, setLaunchConfig] = useState(null);
|
||||
const [surveyConfig, setSurveyConfig] = useState(null);
|
||||
@ -184,4 +185,4 @@ LaunchButton.propTypes = {
|
||||
}).isRequired,
|
||||
};
|
||||
|
||||
export default withRouter(LaunchButton);
|
||||
export default LaunchButton;
|
||||
|
||||
@ -452,7 +452,7 @@ function JobDetail({ job, inventorySourceLabels }) {
|
||||
<Button
|
||||
ouiaId="job-detail-relaunch-button"
|
||||
type="submit"
|
||||
onClick={handleRelaunch}
|
||||
onClick={() => handleRelaunch()}
|
||||
isDisabled={isLaunching}
|
||||
>
|
||||
{t`Relaunch`}
|
||||
|
||||
@ -161,7 +161,7 @@ const OutputToolbar = ({ job, onDelete, isDeleteDisabled, jobStatus }) => {
|
||||
<Button
|
||||
ouiaId="job-output-relaunch-button"
|
||||
variant="plain"
|
||||
onClick={handleRelaunch}
|
||||
onClick={() => handleRelaunch()}
|
||||
aria-label={t`Relaunch`}
|
||||
isDisabled={isLaunching}
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user