mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Add the credential id and metadata from the form to the dependency array of useCallback when testing cred plugin configuration. This allows us to remove the variables passed in to the request.
This commit is contained in:
parent
62054bbfc8
commit
9f8691dbea
@ -34,11 +34,11 @@ function MetadataStep({ i18n }) {
|
||||
request: testPluginMetadata,
|
||||
} = useRequest(
|
||||
useCallback(
|
||||
async (credential, metadata) =>
|
||||
CredentialsAPI.test(credential.id, {
|
||||
metadata,
|
||||
async () =>
|
||||
CredentialsAPI.test(selectedCredential.value.id, {
|
||||
metadata: inputValues.value,
|
||||
}),
|
||||
[]
|
||||
[selectedCredential.value.id, inputValues.value]
|
||||
),
|
||||
null
|
||||
);
|
||||
@ -159,7 +159,7 @@ function MetadataStep({ i18n }) {
|
||||
variant="primary"
|
||||
type="submit"
|
||||
onClick={() =>
|
||||
testPluginMetadata(selectedCredential.value, inputValues.value)
|
||||
testPluginMetadata()
|
||||
}
|
||||
>
|
||||
{i18n._(t`Test`)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user