update schemas | mod jsoneditor (#243)

* update

* sync

[skip ci]

* always required

[skip ci]
This commit is contained in:
brindosch 2016-09-15 19:06:21 +02:00 committed by redPanther
parent 30a667c610
commit a04f34eab7
23 changed files with 534 additions and 389 deletions

View File

@ -1782,7 +1782,7 @@ JSONEditor.AbstractEditor = Class.extend({
if(typeof this.schema.required === "boolean") return this.schema.required;
else if(this.parent && this.parent.schema && Array.isArray(this.parent.schema.required)) return this.parent.schema.required.indexOf(this.key) > -1;
else if(this.jsoneditor.options.required_by_default) return true;
else return false;
else return true;
},
getDisplayText: function(arr) {
var disp = [];
@ -7910,13 +7910,9 @@ JSONEditor.defaults.resolvers.unshift(function(schema) {
// Boolean editors
JSONEditor.defaults.resolvers.unshift(function(schema) {
if(schema.type === 'boolean') {
// If explicitly set to 'checkbox', use that
if(schema.format === "checkbox" || (schema.options && schema.options.checkbox)) {
// convert all boolean to checkbox
return "checkbox";
}
// Otherwise, default to select menu
return (JSONEditor.plugins.selectize.enable) ? 'selectize' : 'select';
}
});
// Use the multiple editor for schemas where the `type` is set to "any"
JSONEditor.defaults.resolvers.unshift(function(schema) {

View File

@ -7,7 +7,6 @@
{
"type" : "object",
"title" : "Logging",
"required": ["level"],
"properties" :
{
"level" :
@ -66,7 +65,6 @@
"channelAdjustment_enable" :
{
"type" : "boolean",
"format": "checkbox",
"propertyOrder" : 1
},
"channelAdjustment" :
@ -245,7 +243,6 @@
"transform_enable" :
{
"type" : "boolean",
"format": "checkbox",
"propertyOrder" : 3
},
"transform" :
@ -376,13 +373,11 @@
{
"type" : "object",
"title" : "Smoothing",
"required": ["type"],
"properties" :
{
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : true,
"propertyOrder" : 1
@ -392,7 +387,8 @@
"type" : "string",
"title" : "Type",
"enum" : ["linear"],
"default" : "linear"
"default" : "linear",
"propertyOrder" : 2
},
"time_ms" :
{
@ -400,7 +396,8 @@
"title" : "Time",
"minimum" : 25,
"maximum": 600,
"default" : 200
"default" : 200,
"propertyOrder" : 3
},
"updateFrequency" :
{
@ -408,7 +405,8 @@
"title" : "Update frequency",
"minimum" : 1.000,
"maximum" : 100.000,
"default" : 25.000
"default" : 25.000,
"propertyOrder" : 4
},
"updateDelay" :
{
@ -416,14 +414,15 @@
"title" : "Update delay",
"minimum" : 0,
"maximum": 2048,
"default" : 0
"default" : 0,
"propertyOrder" : 5
},
"continuousOutput" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Continuous output",
"default" : true
"default" : true,
"propertyOrder" : 6
}
},
"additionalProperties" : false
@ -434,13 +433,11 @@
"items":
{
"type" : "object",
"required": ["mode","standard"],
"properties" :
{
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : false,
"propertyOrder" : 1
@ -449,92 +446,105 @@
{
"type" : "string",
"title" : "Device",
"default" : "auto"
"default" : "auto",
"propertyOrder" : 2
},
"input" :
{
"type" : "integer",
"title" : "Input",
"default" : 0
"default" : 0,
"propertyOrder" : 3
},
"standard" :
{
"type" : "string",
"title" : "Video standard",
"enum" : ["PAL","NTSC"],
"default" : "PAL"
"default" : "PAL",
"propertyOrder" : 4
},
"width" :
{
"type" : "integer",
"title" : "Width",
"default" : -1
"default" : -1,
"propertyOrder" : 5
},
"height" :
{
"type" : "integer",
"title" : "Height",
"default" : -1
"default" : -1,
"propertyOrder" : 6
},
"frameDecimation" :
{
"type" : "integer",
"title" : "Frame decimation",
"default" : 2
"default" : 2,
"propertyOrder" : 7
},
"sizeDecimation" :
{
"type" : "integer",
"title" : "Size decimation",
"default" : 6
"default" : 6,
"propertyOrder" : 8
},
"priority" :
{
"type" : "integer",
"title" : "Priority channel",
"default" : 900
"default" : 900,
"propertyOrder" : 9
},
"mode" :
{
"type" : "string",
"title" : "Mode",
"enum" : ["2D","3DSBS","3DTAB"],
"default" : "2D"
"default" : "2D",
"propertyOrder" : 10
},
"useKodiChecker" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Use Kodi Watch",
"default" : false
"default" : false,
"propertyOrder" : 11
},
"cropLeft" :
{
"type" : "integer",
"title" : "Crop left",
"minimum" : 0,
"default" : 0
"default" : 0,
"propertyOrder" : 12
},
"cropRight" :
{
"type" : "integer",
"title" : "Crop right",
"minimum" : 0,
"default" : 0
"default" : 0,
"propertyOrder" : 13
},
"cropTop" :
{
"type" : "integer",
"title" : "Crop top",
"minimum" : 0,
"default" : 0
"default" : 0,
"propertyOrder" : 14
},
"cropBottom" :
{
"type" : "integer",
"title" : "Crop bottom",
"minimum" : 0,
"default" : 0
"default" : 0,
"propertyOrder" : 15
},
"redSignalThreshold" :
{
@ -542,7 +552,8 @@
"title" : "Red signal threshold",
"minimum" : 0.0,
"maximum" : 1.0,
"default" : 0.1
"default" : 0.1,
"propertyOrder" : 16
},
"greenSignalThreshold" :
{
@ -550,7 +561,8 @@
"title" : "Green signal threshold",
"minimum" : 0.0,
"maximum" : 1.0,
"default" : 0.1
"default" : 0.1,
"propertyOrder" : 17
},
"blueSignalThreshold" :
{
@ -558,7 +570,8 @@
"title" : "Blue signal threshold",
"minimum" : 0.0,
"maximum" : 1.0,
"default" : 0.1
"default" : 0.1,
"propertyOrder" : 18
}
},
"additionalProperties" : false
@ -573,7 +586,6 @@
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : true,
"propertyOrder" : 1
@ -642,7 +654,6 @@
"useXGetImage" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Use XGetImage",
"default" : false
},
@ -679,14 +690,12 @@
{
"type" : "object",
"title" : "Blackbar detector",
"required": ["mode"],
"defaultProperties": ["enable","mode","threshold"],
"properties" :
{
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : true,
"propertyOrder" : 1
@ -697,34 +706,44 @@
"title" : "Threshold",
"minimum" : 0.0,
"maximum" : 1.0,
"default" : 0.05
"default" : 0.05,
"propertyOrder" : 2
},
"unknownFrameCnt" :
{
"type" : "number",
"minimum" : 0
"type" : "integer",
"minimum" : 0,
"default" : 600,
"propertyOrder" : 3
},
"borderFrameCnt" :
{
"type" : "number",
"minimum" : 0
"type" : "integer",
"minimum" : 0,
"default" : 50,
"propertyOrder" : 4
},
"maxInconsistentCnt" :
{
"type" : "number",
"minimum" : 0
"type" : "integer",
"minimum" : 0,
"default" : 10,
"propertyOrder" : 5
},
"blurRemoveCnt" :
{
"type" : "number",
"minimum" : 0
"type" : "integer",
"minimum" : 0,
"default" : 1,
"propertyOrder" : 6
},
"mode" :
{
"type" : "string",
"title": "Mode",
"enum" : ["default", "classic", "osd"],
"default" : "default"
"default" : "default",
"propertyOrder" : 7
}
},
"additionalProperties" : false
@ -738,7 +757,6 @@
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : false,
"propertyOrder" : 1
@ -747,7 +765,8 @@
{
"type" : "string",
"title" : "Kodi IP address",
"default" : "127.0.0.1"
"default" : "127.0.0.1",
"propertyOrder" : 2
},
"kodiTcpPort" :
{
@ -755,56 +774,57 @@
"title" : "Kodi TCP port",
"minimum" : 0,
"maximum" : 65535,
"default" : 9090
"default" : 9090,
"propertyOrder" : 3
},
"grabVideo" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Video",
"default" : true
"default" : true,
"propertyOrder" : 4
},
"grabPictures" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Pictures",
"default" : true
"default" : true,
"propertyOrder" : 5
},
"grabAudio" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Audio",
"default" : true
"default" : true,
"propertyOrder" : 6
},
"grabMenu" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Menu",
"default" : false
"default" : false,
"propertyOrder" : 7
},
"grabPause" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Pause",
"default" : false
"default" : false,
"propertyOrder" : 8
},
"grabScreensaver" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Screensaver",
"default" : false
"default" : false,
"propertyOrder" : 9
},
"enable3DDetection" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Detect 3D",
"default" : false
"default" : false,
"propertyOrder" : 10
}
},
"additionalProperties" : false
@ -857,7 +877,6 @@
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"required" : true,
"propertyOrder" : 1
@ -865,12 +884,14 @@
"json" :
{
"type" : "array",
"required" : true
"required" : true,
"propertyOrder" : 2
},
"proto" :
{
"type" : "array",
"required" : true
"required" : true,
"propertyOrder" : 3
}
},
"additionalProperties" : false
@ -922,7 +943,6 @@
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : false,
"propertyOrder" : 1
@ -933,14 +953,16 @@
"required" : true,
"title" : "Port",
"minimum" : 0,
"maximum" : 65535
"maximum" : 65535,
"propertyOrder" : 2
},
"priority" :
{
"type" : "integer",
"title" : "Priority",
"minimum" : 0,
"default" : 800
"default" : 800,
"propertyOrder" : 3
}
},
"additionalProperties" : false
@ -954,7 +976,6 @@
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : false,
"propertyOrder" : 1
@ -964,7 +985,8 @@
"type" : "string",
"title" : "Address",
"default" : "239.255.28.01",
"required" : true
"required" : true,
"propertyOrder" : 2
},
"port" :
{
@ -972,26 +994,29 @@
"title" : "Port",
"minimum" : 0,
"maximum" : 65535,
"default" : 2801
"default" : 2801,
"propertyOrder" : 3
},
"priority" :
{
"type" : "integer",
"title" : "Priority",
"default" : 800
"default" : 800,
"propertyOrder" : 4
},
"timeout" :
{
"type" : "integer",
"title" : "Timeout",
"default" : 10000
"default" : 10000,
"propertyOrder" : 5
},
"shared" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Shared",
"default" : false
"default" : false,
"propertyOrder" : 6
}
},
"additionalProperties" : false
@ -1005,7 +1030,6 @@
"enable" :
{
"type" : "boolean",
"format": "checkbox",
"title" : "Activate",
"default" : true,
"propertyOrder" : 1
@ -1013,13 +1037,15 @@
"document_root" :
{
"type" : "string",
"title" : "Document Root"
"title" : "Document Root",
"propertyOrder" : 2
},
"port" :
{
"type" : "integer",
"title" : "Port",
"default" : 8099
"default" : 8099,
"propertyOrder" : 3
}
},
"additionalProperties" : false
@ -1030,10 +1056,6 @@
"properties" :
{
"paths" :
{
"type" : "array"
},
"disable" :
{
"type" : "array"
}

View File

@ -4,17 +4,20 @@
"properties":{
"output": {
"type": "string",
"title":"Output path"
"title":"Output path",
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 250
"default": 250,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -4,17 +4,20 @@
"properties":{
"output": {
"type": "string",
"title":"Output path"
"title":"Output path",
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 250
"default": 250,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -5,17 +5,22 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"default" : "/dev/spidev0.0",
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"title":"Invert signal",
"default": false
"default": false,
"format": "checkbox",
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -4,17 +4,20 @@
"properties":{
"output": {
"type": "string",
"title":"Output path"
"title":"Output path",
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 250
"default": 250,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -5,29 +5,35 @@
"output": {
"type": "string",
"title":"Multicast group",
"default" : "239.15.18.2"
"default" : "239.15.18.2",
"propertyOrder" : 1
},
"orbIds": {
"type": "string",
"title":"Baudrate",
"default": "1"
"default": "1",
"propertyOrder" : 2
},
"numLeds": {
"type": "integer",
"title":"Number of LEDs",
"default": 24
"default": 24,
"propertyOrder" : 3
},
"port": {
"type": "integer",
"title":"Port",
"minimum" : 0,
"maximum" : 65535,
"default": 24
"default": 24,
"propertyOrder" : 4
},
"useOrbSmoothing": {
"type": "boolean",
"format": "checkbox",
"title":"Use orb smoothing",
"default": true
"default": true,
"propertyOrder" : 5
}
},
"additionalProperties": true

View File

@ -4,26 +4,31 @@
"properties":{
"host" : {
"type": "string",
"title":"Target IP"
"title":"Target IP",
"propertyOrder" : 1
},
"port" : {
"type": "integer",
"title":"Port",
"default": 5568
"default": 5568,
"propertyOrder" : 2
},
"universe": {
"type": "integer",
"title":"Universe",
"default": 1
"default": 1,
"propertyOrder" : 3
},
"latchtinme": {
"latchtime": {
"type": "integer",
"title":"Latchtime",
"default": 104000
"default": 104000,
"propertyOrder" : 4
},
"cid": {
"type": "string",
"title":"CID"
"title":"CID",
"propertyOrder" : 5
}
},
"additionalProperties": true

View File

@ -5,17 +5,20 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"title":"Invert signal",
"default": false
"default": false,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -5,17 +5,20 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"title":"Invert signal",
"default": false
"default": false,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -2,6 +2,10 @@
"type":"object",
"required":true,
"properties":{
"output": {
"type": "string",
"title":"Serial number"
}
},
"additionalProperties": true
}

View File

@ -5,17 +5,20 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"title":"Invert signal",
"default": false
"default": false,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -5,17 +5,20 @@
"VID": {
"type": "string",
"title":"VID",
"default" : "0x2341"
"default" : "0x2341",
"propertyOrder" : 1
},
"PID": {
"type": "string",
"title":"PID",
"default" : "0x8036"
"default" : "0x8036",
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 0
"default": 0,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -4,29 +4,35 @@
"properties":{
"output": {
"type": "string",
"title":"Target IP"
"title":"Target IP",
"propertyOrder" : 1
},
"username": {
"type": "string",
"title":"Username",
"default": "newdeveloper"
"default": "newdeveloper",
"propertyOrder" : 2
},
"lightIds": {
"type": "array",
"title":"Light ids",
"items" : {
"type" : "integer"
}
},
"propertyOrder" : 3
},
"transitiontime": {
"type": "integer",
"title":"Transistion time (x100ms)",
"default" : 1
"default" : 1,
"propertyOrder" : 4
},
"switchOffOnBlack": {
"type": "boolean",
"format": "checkbox",
"title":"Switch off on black",
"default" : true
"default" : true,
"propertyOrder" : 5
}
},
"additionalProperties": true

View File

@ -5,17 +5,20 @@
"VID": {
"type": "string",
"title":"VID",
"default" : "0x2341"
"default" : "0x2341",
"propertyOrder" : 1
},
"PID": {
"type": "string",
"title":"PID",
"default" : "0x8036"
"default" : "0x8036",
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 0
"default": 0,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -4,17 +4,20 @@
"properties":{
"output": {
"type": "string",
"title":"Output path"
"title":"Output path",
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 250
"default": 250,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -5,17 +5,21 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 2666666
"default": 2666666,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"format": "checkbox",
"title":"Invert signal",
"default": false
"default": false,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -2,6 +2,31 @@
"type":"object",
"required":true,
"properties":{
"output": {
"type": "string",
"title":"Output",
"default" : "127.0.0.1",
"propertyOrder" : 1
},
"port": {
"type": "integer",
"title":"Port",
"minimum" : 0,
"maximum" : 65535,
"default" : 4223,
"propertyOrder" : 2
},
"uid": {
"type": "string",
"title":"UID",
"propertyOrder" : 3
},
"rate": {
"type": "integer",
"title":"Intervall",
"minimum" : 0,
"propertyOrder" : 4
}
},
"additionalProperties": true
}

View File

@ -2,6 +2,23 @@
"type":"object",
"required":true,
"properties":{
"output": {
"type": "string",
"title":"Output path",
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000,
"propertyOrder" : 2
},
"delayAfterConnect": {
"type": "integer",
"title":"Delay after connect",
"default": 250,
"propertyOrder" : 3
}
},
"additionalProperties": true
}

View File

@ -2,6 +2,24 @@
"type":"object",
"required":true,
"properties":{
"host" : {
"type": "string",
"title":"Target IP",
"propertyOrder" : 1
},
"latchtime": {
"type": "integer",
"title":"Latchtime",
"default": 104000,
"propertyOrder" : 2
},
"max-packet": {
"type": "integer",
"title":"Max-packet",
"minimum" : 0,
"default" : 170,
"propertyOrder" : 3
}
},
"additionalProperties": true
}

View File

@ -4,12 +4,14 @@
"properties":{
"host" : {
"type": "string",
"title":"Target IP"
"title":"Target IP",
"propertyOrder" : 1
},
"port" : {
"type": "integer",
"title":"Port",
"default": 5568
"default": 5568,
"propertyOrder" : 2
}
},
"additionalProperties": true

View File

@ -5,17 +5,21 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 1000000
"default": 1000000,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"format": "checkbox",
"title":"Invert signal",
"default": false
"default": false,
"propertyOrder" : 3
}
},
"additionalProperties": true

View File

@ -5,17 +5,21 @@
"output": {
"type": "string",
"title":"SPI path",
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"]
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
"propertyOrder" : 1
},
"rate": {
"type": "integer",
"title":"Baudrate",
"default": 2666666
"default": 1000000,
"propertyOrder" : 2
},
"invert": {
"type": "boolean",
"format": "checkbox",
"title":"Invert signal",
"default": false
"default": false,
"propertyOrder" : 3
}
},
"additionalProperties": true