Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: change label to title in examples

...

Code Block
languagejs
titleconf/form_schema/opCharts_demo.json
{
    "label": "Demo",
    "description": "Demo form schema",
    "component": ["element_lists"],
    "tags": ["interface"],
    "schema": {
        "demo1": {
            "labeltitle": "My LabelTitle",
            "type": "Text"
        },
        "demo2": {
            "labeltitle": "Another LabelTitle",
            "type": "Select",
            "options": ["option1", "option2"]
        }
    }
}

...

Code Block
languagejs
themeMidnight
{
    "label": "Customer Data",
    "description": "Edit in conf/form_schemas/opCharts_element_inventory_customer.json",
    "component": ["element_lists"],
    "tags": ["interface"],
    "schema": {
        "customerId": {
            "labeltitle": "Customer ID",
            "type": "Text",
            "order": 1
        },
        "upStream": {
            "labeltitle": "Upstream Contract Speed",
            "type": "Number",
            "validators": [
                { "type": "range", "min": 1, "max": 10000, "message": "Mbps should be between 1 and 10000" }
            ],
            "order": 2
        },
        "downStream": {
            "labeltitle": "Downstream Contract Speed",
            "type": "Number",
            "validators": [
                { "type": "range", "min": 1, "max": 10000, "message": "Mbps should be between 1 and 10000" }
            ],
            "order": 3
        }
    }
}

...

Code Block
{
    "label": "Serial number tracking for EntityMIB Data",
    "description": "Edit in conf/form_schemas/opCharts_element_lists_serial_numbers.json",
    "component": ["element_lists"],
    "tags": ["entityMib"],
    "schema": {
        "under_maintenance": {
            "labeltitle": "Under Maintenance",
            "help": "Do we have a maintenance contract for this element or not?",
            "type": "Select",
            "options": ["","Yes", "No"]
        },
        "maintenance_contract": {
            "labeltitle": "Maintenance Contract",
            "type": "Text"
        },
        "start_date": {
            "labeltitle": "Start Date",
            "yearStart": 2010,
            "yearEnd": 2030,
            "type": "Date"
        },
        "renewal_date": {
            "labeltitle": "Renewal Date",
            "yearStart": 2020,
            "yearEnd": 2050,
            "type": "Date"
        }
    }
}

...