F5Networks / f5-appsvcs-templates

F5 BIG-IP Application Service Templates (FAST)
Apache License 2.0
32 stars 13 forks source link

GUI does not display nested parameters #28

Closed chen23 closed 3 years ago

chen23 commented 3 years ago

Environment

Summary

When using a template with nested parameters the GUI does not display the nested elements.

Steps To Reproduce

Create a template where you nest elements.

nested.yaml:

title: nested test
description: nested test
definitions:
  parent:
    title: parent
    description: parent
    type: array
  child:
    title: child
    description: child
parameters:
  parent: ["1","2","3"]
  child: hello

template: |
    {{ #parent }} {{ . }} {{ child }}{{ /parent }}
    {{ #parent }} {{ . }} {{ /parent }}

guiSchema

{
  "type": "object",
  "required": [
    "parent"
  ],
  "dependencies": {
    "child": [
      "parent"
    ],
    ".": [
      "parent"
    ]
  },
  "title": "nested test",
  "description": "nested test",
  "definitions": {},
  "properties": {
    "parent": {
      "type": "array",
      "title": "parent",
      "description": "parent",
      "skip_xform": true,
      "propertyOrder": 0,
      "items": {
        "type": "string"
      },
      "format": "table"
    }
  }
}

workaround (list child outside)

title: nested test
description: nested test
definitions:
  parent:
    title: parent
    description: parent
    type: array
  child:
    title: child
    description: child
parameters:
  parent: ["1","2","3"]
  child: hello

template: |
    {{ child }}
    {{ #parent }} {{ . }} {{ child }}{{ /parent }}
    {{ #parent }} {{ . }} {{ /parent }}

guiSchema

{
  "type": "object",
  "required": [
    "child",
    "parent"
  ],
  "dependencies": {
    ".": [
      "parent"
    ]
  },
  "title": "nested test",
  "description": "nested test",
  "definitions": {},
  "properties": {
    "parent": {
      "type": "array",
      "title": "parent",
      "description": "parent",
      "skip_xform": true,
      "propertyOrder": 0,
      "items": {
        "type": "string"
      },
      "format": "table"
    },
    "child": {
      "type": "string",
      "title": "child",
      "description": "child",
      "propertyOrder": 1
    }
  }
}

Expected Behavior

detect nested elements

Actual Behavior

do not see nested elements

shyawnkarim commented 3 years ago

Thanks for reporting this bug. We are now tracking it internally with ID MYSTIQUE-338.

shyawnkarim commented 3 years ago

This bug fix was included with Release 1.11.0.