mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-02 21:01:49 -05:00
changed the field name from 'container_options' to simply 'pull'
This commit is contained in:
@@ -21,14 +21,14 @@ const executionEnvironmentData = {
|
||||
credential: 4,
|
||||
description: 'A simple EE',
|
||||
image: 'https://registry.com/image/container',
|
||||
container_options: 'one',
|
||||
pull: 'one',
|
||||
};
|
||||
|
||||
const mockOptions = {
|
||||
data: {
|
||||
actions: {
|
||||
POST: {
|
||||
container_options: {
|
||||
pull: {
|
||||
choices: [
|
||||
['one', 'One'],
|
||||
['two', 'Two'],
|
||||
|
||||
@@ -18,13 +18,7 @@ import { ExecutionEnvironmentsAPI } from '../../../api';
|
||||
|
||||
function ExecutionEnvironmentDetails({ executionEnvironment, i18n }) {
|
||||
const history = useHistory();
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
image,
|
||||
description,
|
||||
container_options,
|
||||
} = executionEnvironment;
|
||||
const { id, name, image, description, pull } = executionEnvironment;
|
||||
|
||||
const {
|
||||
request: deleteExecutionEnvironment,
|
||||
@@ -54,12 +48,8 @@ function ExecutionEnvironmentDetails({ executionEnvironment, i18n }) {
|
||||
/>
|
||||
<Detail label={i18n._(t`Description`)} value={description} />
|
||||
<Detail
|
||||
label={i18n._(t`Container Options`)}
|
||||
value={
|
||||
container_options === ''
|
||||
? i18n._(t`Missing`)
|
||||
: toTitleCase(container_options)
|
||||
}
|
||||
label={i18n._(t`Pull`)}
|
||||
value={pull === '' ? i18n._(t`Missing`) : toTitleCase(pull)}
|
||||
/>
|
||||
{executionEnvironment.summary_fields.credential && (
|
||||
<Detail
|
||||
|
||||
@@ -19,7 +19,7 @@ const executionEnvironmentData = {
|
||||
credential: { id: 4 },
|
||||
description: 'A simple EE',
|
||||
image: 'https://registry.com/image/container',
|
||||
container_options: 'one',
|
||||
pull: 'one',
|
||||
name: 'Test EE',
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ const mockOptions = {
|
||||
data: {
|
||||
actions: {
|
||||
POST: {
|
||||
container_options: {
|
||||
pull: {
|
||||
choices: [
|
||||
['one', 'One'],
|
||||
['two', 'Two'],
|
||||
|
||||
@@ -52,10 +52,10 @@ function ExecutionEnvironmentFormFields({
|
||||
containerOptionsMeta,
|
||||
containerOptionsHelpers,
|
||||
] = useField({
|
||||
name: 'container_options',
|
||||
name: 'pull',
|
||||
});
|
||||
|
||||
const containerPullChoices = options?.actions?.POST?.container_options?.choices.map(
|
||||
const containerPullChoices = options?.actions?.POST?.pull?.choices.map(
|
||||
([value, label]) => ({ value, label, key: value })
|
||||
);
|
||||
|
||||
@@ -168,7 +168,7 @@ function ExecutionEnvironmentForm({
|
||||
const initialValues = {
|
||||
name: executionEnvironment.name || '',
|
||||
image: executionEnvironment.image || '',
|
||||
container_options: executionEnvironment?.container_options || '',
|
||||
pull: executionEnvironment?.pull || '',
|
||||
description: executionEnvironment.description || '',
|
||||
credential: executionEnvironment.summary_fields?.credential || null,
|
||||
organization: executionEnvironment.summary_fields?.organization || null,
|
||||
|
||||
@@ -19,7 +19,7 @@ const executionEnvironment = {
|
||||
id: 16,
|
||||
name: 'Test EE',
|
||||
type: 'execution_environment',
|
||||
container_options: 'one',
|
||||
pull: 'one',
|
||||
url: '/api/v2/execution_environments/16/',
|
||||
related: {
|
||||
created_by: '/api/v2/users/1/',
|
||||
@@ -48,7 +48,7 @@ const mockOptions = {
|
||||
data: {
|
||||
actions: {
|
||||
POST: {
|
||||
container_options: {
|
||||
pull: {
|
||||
choices: [
|
||||
['one', 'One'],
|
||||
['two', 'Two'],
|
||||
|
||||
Reference in New Issue
Block a user