123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- {
- "current_parameters": {
- {% if component.description %}"component_description": {{ component.description|tojson|safe }},{% endif %}
- "label": "",
- {% for property in component.properties %}
- "elyra_{{ property.ref }}":
- {% if property.control_id == "OneOfControl" %}
- {
- "activeControl": "{{ property.default_control_type }}",
- "{{ property.default_control_type }}":
- {% endif %}
- {% set property_data_type = property.data_type %}
- {% if property.data_type == 'inputvalue' %}{% set property_data_type = property.default_data_type %}{% endif %}
- {% if property.default_control_type == "EnumControl" %}
- null
- {% elif property_data_type|lower == "bool" or property_data_type|lower == "boolean" %}
- {{ property.value|lower }}
- {% elif property_data_type|lower == "int" or property_data_type|lower == "integer" or
- property_data_type|lower == "number" or property_data_type|lower == "float" %}
- {{ property.value }}
- {% else %}
- "{{ property.value }}"
- {% endif %}
- {% if property.control_id == "OneOfControl" %}
- }
- {% endif %},
- {% endfor %}
- "component_source": {{ component.component_source|tojson|safe }}
- },
- "parameters": [
- {% if component.description %}{
- "id": "component_description"
- },{% endif %}
- {
- "id": "label"
- },
- {% for property in component.properties %}
- {
- "id": "elyra_{{ property.ref }}"
- },
- {% endfor %}
- {
- "id": "component_source"
- }
- ],
- "uihints": {
- "id": "nodeProperties",
- "parameter_info": [
- {% if component.description %}{
- "parameter_ref": "component_description",
- "control": "readonly",
- "label": {
- "default": "Component Description"
- },
- "description": {
- "default": " ",
- "placement": "on_panel"
- },
- "label_visible": false,
- "data": {
- "required": false
- }
- },{% endif %}
- {
- "parameter_ref": "label",
- "control": "custom",
- "custom_control_id": "StringControl",
- "label": {
- "default": "Label"
- },
- "description": {
- "default": "A custom label for the node.",
- "placement": "on_panel"
- },
- "data": {}
- },
- {% for property in component.properties %}
- {
- "parameter_ref": "elyra_{{ property.ref }}",
- "control": "{{ property.control }}",
- "custom_control_id": "{{ property.control_id }}",
- "label": {
- "default": "{{ property.name }}"
- },
- "description": {
- "default": {{ property.description|tojson|safe }},
- "placement": "on_panel"
- },
- "data": {
- {% if property.control_id == "OneOfControl" %}
- "controls":{
- {% for control, control_data_type, control_label in property.one_of_control_types %}
- "{{ control }}": {
- "label": "{{ control_label }}",
- "format": "{{ control_data_type }}"
- {% if control == 'NestedEnumControl' %}
- ,
- "allownooptions":
- {% if property.allow_no_options %}
- true
- {% else %}
- false
- {% endif %}
- {% endif %}
- }
- {% if loop.index != loop.length %}
- ,
- {% endif %}
- {% endfor %}
- },
- {% else %}
- "format": "{{ property.data_type }}",
- {% endif %}
- "required": {{ property.required|lower }}
- {% if property.control_id == "EnumControl" %}
- ,
- "items": [
- {% for item in property.items %}
- "{{ item }}"
- {% if loop.index != property.items|length %}
- ,
- {% endif %}
- {% endfor %}
- ]
- {% endif %}
- }
- },
- {% endfor %}
- {
- "parameter_ref": "component_source",
- "control": "readonly",
- "label": {
- "default": "Component Source"
- },
- "description": {
- "default": " ",
- "placement": "on_panel"
- },
- "data": {}
- }
- ],
- "group_info": [
- {
- "id": "nodeGroupInfo",
- "type": "panels",
- "group_info": [
- {% if component.description %}{
- "id": "component_description",
- "type": "controls",
- "parameter_refs": ["component_description"]
- },{% endif %}
- {
- "id": "label",
- "type": "controls",
- "parameter_refs": ["label"]
- },
- {% if component.input_properties|length > 0 %}
- {
- "id": "elyra_inputCategoryHeader",
- "class_name": "elyra_categoryHeader",
- "type": "textPanel",
- "label": {
- "default": "Inputs"
- }
- },
- {% for property in component.input_properties %}
- {
- "id": "elyra_{{ property.ref }}",
- "type": "controls",
- "parameter_refs": ["elyra_{{ property.ref }}"]
- },
- {% endfor %}
- {% endif %}
- {% if component.output_properties|length > 0 %}
- {
- "id": "elyra_outputCategoryHeader",
- "type": "textPanel",
- "class_name": "elyra_categoryHeader",
- "label": {
- "default": "Outputs"
- }
- },
- {% for property in component.output_properties %}
- {
- "id": "elyra_{{ property.ref }}",
- "type": "controls",
- "parameter_refs": ["elyra_{{ property.ref }}"]
- },
- {% endfor %}
- {% endif %}
- {
- "id": "elyra_component_sourceCategoryHeader",
- "type": "textPanel",
- "class_name": "elyra_categoryHeader",
- "label": {
- "default": "Component Source"
- }
- },
- {
- "id": "component_source",
- "type": "controls",
- "parameter_refs": ["component_source"]
- }
- ]
- }
- ]
- },
- "resources": {}
- }
|