From 7fbe01352f35de91d46a3a572216f96847297711 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 12 May 2021 14:03:53 -0400 Subject: [PATCH 1/2] Drop the word name from image field input This field is labeled as just "Image" in other places, so we want it to match. Also, "name" can be confusing because users will think they just need to provide the image name instead of the full image location, which includes registry and tag version. --- .../ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx | 2 +- .../shared/ExecutionEnvironmentForm.test.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx b/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx index 59dff9fc16..854d331c88 100644 --- a/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx +++ b/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx @@ -95,7 +95,7 @@ function ExecutionEnvironmentFormFields({ /> ', () => { }); test('should display form fields properly', () => { - expect(wrapper.find('FormGroup[label="Image name"]').length).toBe(1); + expect(wrapper.find('FormGroup[label="Image"]').length).toBe(1); expect(wrapper.find('FormGroup[label="Description"]').length).toBe(1); expect(wrapper.find('CredentialLookup').length).toBe(1); }); From 39ce0ade6d146453b9442f8c843c132ed0ad7f7f Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 12 May 2021 15:49:03 -0400 Subject: [PATCH 2/2] Update image descriptions, add examples --- .../0142_update_ee_image_field_description.py | 22 +++++++++++++++++++ awx/main/models/execution_environments.py | 2 +- .../shared/ExecutionEnvironmentForm.jsx | 17 +++++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 awx/main/migrations/0142_update_ee_image_field_description.py diff --git a/awx/main/migrations/0142_update_ee_image_field_description.py b/awx/main/migrations/0142_update_ee_image_field_description.py new file mode 100644 index 0000000000..20830abc2b --- /dev/null +++ b/awx/main/migrations/0142_update_ee_image_field_description.py @@ -0,0 +1,22 @@ +# Generated by Django 2.2.16 on 2021-05-12 20:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0141_remove_isolated_instances'), + ] + + operations = [ + migrations.AlterField( + model_name='executionenvironment', + name='image', + field=models.CharField( + help_text='The full image location, including the container registry, image name, and version tag.', + max_length=1024, + verbose_name='image location', + ), + ), + ] diff --git a/awx/main/models/execution_environments.py b/awx/main/models/execution_environments.py index 4a95f783b5..4bf8309bc8 100644 --- a/awx/main/models/execution_environments.py +++ b/awx/main/models/execution_environments.py @@ -30,7 +30,7 @@ class ExecutionEnvironment(CommonModel): image = models.CharField( max_length=1024, verbose_name=_('image location'), - help_text=_("The registry location where the container is stored."), + help_text=_("The full image location, including the container registry, image name, and version tag."), ) managed_by_tower = models.BooleanField(default=False, editable=False) credential = models.ForeignKey( diff --git a/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx b/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx index 854d331c88..434992990e 100644 --- a/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx +++ b/awx/ui_next/src/screens/ExecutionEnvironment/shared/ExecutionEnvironmentForm.jsx @@ -100,7 +100,22 @@ function ExecutionEnvironmentFormFields({ type="text" validate={required(null)} isRequired - tooltip={t`The registry location where the container is stored.`} + tooltip={ + + {t`The full image location, including the container registry, image name, and version tag.`} +
+
+ {t`Examples:`} +
    +
  • + quay.io/ansible/awx-ee:latest +
  • +
  • + repo/project/image-name:tag +
  • +
+
+ } />