controller_configuration icon indicating copy to clipboard operation
controller_configuration copied to clipboard

Web UI extra_vars fields default to JSON instead of YAML

Open kbreit-insight opened this issue 1 year ago • 2 comments

Summary

After I apply automation to configure extra_vars for job templates and workflow templates (and similar things for inventory sources) I see the web UI defaults to JSON view whereas before the automation it defaulted to the preferred YAML view.

Issue Type

  • Bug Report

Ansible, Collection, Controller details

ansible [core 2.15.5]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.16 (main, Sep 22 2023, 17:57:55) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True

Collection                     Version
------------------------------ -----------
ansible.controller             4.5.0
ansible.posix                  1.5.2
carnival.ccl_integration       0.1.6
community.general              5.2.0

Controller version: 4.5.0

  • OS package

Desired Behavior

It should update the extra_vars defaults but not change the web UI's default view of YAML.

Actual Behavior

Web UI shows JSON when the web pages load.

kbreit-insight avatar May 03 '24 14:05 kbreit-insight

I looked this up, https://controller.vaultcrest.com/api/v2/job_templates/ options on that page, the default.

        "extra_vars": {
            "type": "json",
            "required": false,
            "label": "Extra vars",
            "filterable": true,
            "default": ""
        },

In addition the module takes any yaml or text sent to it, and does a json dumps, and this is what is sent to the API

unfortunately this is not the result of what this collection does, but the behavior of the API expecting json.

now if you were to Open an RFE ticket and request that you can have a preference in the settings to default the GUI to yaml display for extra vars. I would be for that.

sean-m-sullivan avatar May 08 '24 16:05 sean-m-sullivan

I'll open an RFE. In the meantime is there any way for me to override either the default or the displayed type?

kbreit-insight avatar May 08 '24 17:05 kbreit-insight