mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Add a executable type to settings page This allow us to validate the value is a valid executable * Add a directory type to settings page This allow us to validate the value is a valid directory * fixes
110 lines
3.8 KiB
JSON
110 lines
3.8 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/schema#",
|
|
"type": "object",
|
|
"properties": {
|
|
"Warning!": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"type": "object",
|
|
"propertyNames": {
|
|
"pattern": "^[a-zA-Z0-9_.\\-]+$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"default": {},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"section": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"order": {
|
|
"type": "integer"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"minProperties": 2
|
|
},
|
|
"units": {
|
|
"type": "string"
|
|
},
|
|
"validate": {
|
|
"propertyNames": {
|
|
"pattern": "^value",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"when": {
|
|
"properties": {
|
|
"setting": {
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"type": "string",
|
|
"enum": [
|
|
"equals",
|
|
"in"
|
|
]
|
|
},
|
|
"value": {
|
|
"type": ["string", "array"]
|
|
}
|
|
}
|
|
},
|
|
"disabled": {
|
|
"type": "boolean"
|
|
},
|
|
"hidden": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": ["type"],
|
|
"additionalProperties": false,
|
|
"anyOf": [
|
|
{
|
|
"properties": { "type": {"const": "select"} },
|
|
"required": ["options"]
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"integer",
|
|
"text",
|
|
"boolean",
|
|
"array",
|
|
"password",
|
|
"email",
|
|
"color",
|
|
"float",
|
|
"graph",
|
|
"dashboard-select",
|
|
"snmp3auth",
|
|
"ldap-groups",
|
|
"ad-groups",
|
|
"executable",
|
|
"directory"
|
|
]
|
|
}
|
|
},
|
|
"not": { "required": ["options"]}
|
|
}
|
|
],
|
|
"dependencies": {
|
|
"group": { "required": ["order", "section"] },
|
|
"order": { "required": ["group", "section"] },
|
|
"section": { "required": ["group", "order"] }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["Warning!", "config"],
|
|
"additionalProperties": false
|
|
}
|