simplify tiramisu dict format

This commit is contained in:
Emmanuel Garette 2019-04-22 10:51:44 +02:00
parent 6d0d233d9b
commit 5ea35bf84e
63 changed files with 38 additions and 241 deletions

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.boolean": { "options.boolean": {
"name": "options.boolean",
"type": "boolean", "type": "boolean",
"title": "Boolean 1" "title": "Boolean 1"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.boolean": { "options.boolean": {
"name": "options.boolean",
"type": "boolean", "type": "boolean",
"title": "Boolean 1 frozen" "title": "Boolean 1 frozen"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice": { "options.choice": {
"name": "options.choice",
"type": "choice", "type": "choice",
"enum": [ "enum": [
"", "",

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice": { "options.choice": {
"name": "options.choice",
"type": "choice", "type": "choice",
"enum": [ "enum": [
"", "",

View file

@ -1,13 +1,10 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice1": { "options.choice1": {
"name": "options.choice1",
"properties": { "properties": {
"options.choice1.choice1": { "options.choice1.choice1": {
"name": "options.choice1.choice1",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -17,7 +14,6 @@
"title": "Choice description leader" "title": "Choice description leader"
}, },
"options.choice1.choice2": { "options.choice1.choice2": {
"name": "options.choice1.choice2",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -28,7 +24,6 @@
"title": "Choice description follower 1" "title": "Choice description follower 1"
}, },
"options.choice1.choice3": { "options.choice1.choice3": {
"name": "options.choice1.choice3",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -39,7 +34,6 @@
"title": "Choice description follower 2" "title": "Choice description follower 2"
}, },
"options.choice1.choice4": { "options.choice1.choice4": {
"name": "options.choice1.choice4",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [

View file

@ -1,13 +1,10 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice1": { "options.choice1": {
"name": "options.choice1",
"properties": { "properties": {
"options.choice1.choice1": { "options.choice1.choice1": {
"name": "options.choice1.choice1",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -17,7 +14,6 @@
"title": "Choice description leader" "title": "Choice description leader"
}, },
"options.choice1.choice2": { "options.choice1.choice2": {
"name": "options.choice1.choice2",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -28,7 +24,6 @@
"title": "Choice description follower 1" "title": "Choice description follower 1"
}, },
"options.choice1.choice3": { "options.choice1.choice3": {
"name": "options.choice1.choice3",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -39,7 +34,6 @@
"title": "Choice description follower 2 hidden" "title": "Choice description follower 2 hidden"
}, },
"options.choice1.choice4": { "options.choice1.choice4": {
"name": "options.choice1.choice4",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [

View file

@ -1,13 +1,10 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice1": { "options.choice1": {
"name": "options.choice1",
"properties": { "properties": {
"options.choice1.choice1": { "options.choice1.choice1": {
"name": "options.choice1.choice1",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -17,7 +14,6 @@
"title": "Choice leader" "title": "Choice leader"
}, },
"options.choice1.choice2": { "options.choice1.choice2": {
"name": "options.choice1.choice2",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -28,7 +24,6 @@
"title": "Choice follower 1" "title": "Choice follower 1"
}, },
"options.choice1.choice3": { "options.choice1.choice3": {
"name": "options.choice1.choice3",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [
@ -39,7 +34,6 @@
"title": "Choice follower 2" "title": "Choice follower 2"
}, },
"options.choice1.choice4": { "options.choice1.choice4": {
"name": "options.choice1.choice4",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice": { "options.choice": {
"name": "options.choice",
"type": "choice", "type": "choice",
"isMulti": true, "isMulti": true,
"enum": [ "enum": [

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice": { "options.choice": {
"name": "options.choice",
"type": "choice", "type": "choice",
"enum": [ "enum": [
"", "",

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.choice": { "options.choice": {
"name": "options.choice",
"type": "choice", "type": "choice",
"value": "hide", "value": "hide",
"enum": [ "enum": [
@ -14,7 +12,6 @@
"title": "Choice description" "title": "Choice description"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"title": "Unicode 2" "title": "Unicode 2"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.date": { "options.date": {
"name": "options.date",
"type": "date", "type": "date",
"title": "Date description" "title": "Date description"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.date": { "options.date": {
"name": "options.date",
"type": "date", "type": "date",
"title": "Date description frozen" "title": "Date description frozen"
} }

View file

@ -1,7 +1,6 @@
{ {
"schema": { "schema": {
"usbpath": { "usbpath": {
"name": "usbpath",
"type": "filename", "type": "filename",
"title": "Chemin d'acc\u00e8s" "title": "Chemin d'acc\u00e8s"
} }

View file

@ -1,25 +1,20 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.hostname1": { "options.hostname1": {
"name": "options.hostname1",
"type": "domainname", "type": "domainname",
"title": "Domainname Description" "title": "Domainname Description"
}, },
"options.hostname2": { "options.hostname2": {
"name": "options.hostname2",
"type": "domainname", "type": "domainname",
"title": "Domainname without dot Description" "title": "Domainname without dot Description"
}, },
"options.hostname3": { "options.hostname3": {
"name": "options.hostname3",
"type": "domainname", "type": "domainname",
"title": "Hostname or IP Description" "title": "Hostname or IP Description"
}, },
"options.hostname4": { "options.hostname4": {
"name": "options.hostname4",
"type": "domainname", "type": "domainname",
"title": "Netbios Description" "title": "Netbios Description"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.ip": { "options.ip": {
"name": "options.ip",
"type": "ip", "type": "ip",
"title": "IP Description" "title": "IP Description"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.ip": { "options.ip": {
"name": "options.ip",
"type": "ip", "type": "ip",
"title": "IP Description frozen" "title": "IP Description frozen"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.mail": { "options.mail": {
"name": "options.mail",
"type": "email", "type": "email",
"title": "Mail Description" "title": "Mail Description"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.integer": { "options.integer": {
"name": "options.integer",
"type": "integer", "type": "integer",
"title": "integer 1" "title": "integer 1"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.integer": { "options.integer": {
"name": "options.integer",
"type": "integer", "type": "integer",
"title": "integer 1 frozen" "title": "integer 1 frozen"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.integer": { "options.integer": {
"name": "options.integer",
"type": "integer", "type": "integer",
"value": 0, "value": 0,
"title": "integer 1" "title": "integer 1"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.integer": { "options.integer": {
"name": "options.integer",
"type": "integer", "type": "integer",
"value": 0, "value": 0,
"title": "integer 1" "title": "integer 1"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Unicode 1 frozen" "title": "Unicode 1 frozen"
} }

View file

@ -1,31 +1,25 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,31 +1,25 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,13 +1,10 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"value": [ "value": [
"val1", "val1",
@ -17,20 +14,17 @@
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"default": "follower2", "default": "follower2",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2 with default multi" "title": "Unicode follower 2 with default multi"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,31 +1,25 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2 hidden" "title": "Unicode follower 2 hidden"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,30 +1,24 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"properties": { "properties": {
"options.unicode1.unicode1": { "options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode1.unicode2": { "options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"
}, },
"options.unicode1.unicode3": { "options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,31 +1,25 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2 not equal" "title": "Unicode follower 2 not equal"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3 not equal" "title": "Unicode follower 3 not equal"

View file

@ -1,31 +1,25 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Values 'test' must show 'Unicode follower 3'" "title": "Values 'test' must show 'Unicode follower 3'"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,30 +1,24 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Value 'test' must show Leadership" "title": "Value 'test' must show Leadership"
}, },
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"properties": { "properties": {
"options.unicode1.unicode1": { "options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode1.unicode2": { "options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode1.unicode3": { "options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"

View file

@ -1,25 +1,20 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"properties": { "properties": {
"options.unicode1.unicode1": { "options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Values 'test' must show 'Unicode follower 2'" "title": "Values 'test' must show 'Unicode follower 2'"
}, },
"options.unicode1.unicode2": { "options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode1.unicode3": { "options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"

View file

@ -1,25 +1,20 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"properties": { "properties": {
"options.unicode1.unicode1": { "options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Values 'test' must show 'Unicode follower 2'" "title": "Values 'test' must show 'Unicode follower 2'"
}, },
"options.unicode1.unicode2": { "options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode1.unicode3": { "options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"

View file

@ -1,25 +1,20 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"properties": { "properties": {
"options.unicode1.unicode1": { "options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode1.unicode2": { "options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Values 'test' must show 'Unicode follower 2'" "title": "Values 'test' must show 'Unicode follower 2'"
}, },
"options.unicode1.unicode3": { "options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"

View file

@ -1,30 +1,24 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Value 'test' must show leader" "title": "Value 'test' must show leader"
}, },
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"properties": { "properties": {
"options.unicode1.unicode1": { "options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode1.unicode2": { "options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode1.unicode3": { "options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"

View file

@ -1,31 +1,25 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Values 'test' must show 'Unicode follower 3'" "title": "Values 'test' must show 'Unicode follower 3'"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2" "title": "Unicode follower 2"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,32 +1,26 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"isSubMulti": true, "isSubMulti": true,
"title": "Unicode follower 2 submulti" "title": "Unicode follower 2 submulti"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,13 +1,10 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"properties": { "properties": {
"options.unicode.unicode": { "options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string", "type": "string",
"value": [ "value": [
"val1", "val1",
@ -17,20 +14,17 @@
"title": "Unicode leader" "title": "Unicode leader"
}, },
"options.unicode.unicode1": { "options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 1" "title": "Unicode follower 1"
}, },
"options.unicode.unicode2": { "options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string", "type": "string",
"default": "follower2", "default": "follower2",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 2 with default multi" "title": "Unicode follower 2 with default multi"
}, },
"options.unicode.unicode3": { "options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode follower 3" "title": "Unicode follower 3"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Multi string 1" "title": "Multi string 1"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode 1" "title": "Unicode 1"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode 1" "title": "Unicode 1"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"value": [ "value": [
"a", "a",

View file

@ -1,15 +1,12 @@
{ {
"schema": { "schema": {
"descr1": { "descr1": {
"name": "descr1",
"properties": { "properties": {
"descr1.unicode1": { "descr1.unicode1": {
"name": "descr1.unicode1",
"type": "string", "type": "string",
"title": "Unicode 1, not equal to 'a'" "title": "Unicode 1, not equal to 'a'"
}, },
"descr1.unicode1_multi": { "descr1.unicode1_multi": {
"name": "descr1.unicode1_multi",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Multi unicode 1, not equal to 'a' or 'b'" "title": "Multi unicode 1, not equal to 'a' or 'b'"
@ -19,16 +16,13 @@
"title": "Common configuration 1" "title": "Common configuration 1"
}, },
"descr2": { "descr2": {
"name": "descr2",
"properties": { "properties": {
"descr2.unicode2": { "descr2.unicode2": {
"name": "descr2.unicode2",
"type": "string", "type": "string",
"value": "a", "value": "a",
"title": "Unicode 2" "title": "Unicode 2"
}, },
"descr2.unicode2_multi": { "descr2.unicode2_multi": {
"name": "descr2.unicode2_multi",
"type": "string", "type": "string",
"value": [ "value": [
"a", "a",
@ -42,15 +36,12 @@
"title": "Common configuration 2" "title": "Common configuration 2"
}, },
"descr3": { "descr3": {
"name": "descr3",
"properties": { "properties": {
"descr3.unicode3": { "descr3.unicode3": {
"name": "descr3.unicode3",
"type": "string", "type": "string",
"title": "Unicode 3" "title": "Unicode 3"
}, },
"descr3.unicode3_multi": { "descr3.unicode3_multi": {
"name": "descr3.unicode3_multi",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Multi unicode 3" "title": "Multi unicode 3"

View file

@ -1,15 +1,12 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Value 'test' must show Unicode 2" "title": "Value 'test' must show Unicode 2"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode 2" "title": "Unicode 2"

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"value": [ "value": [
"a", "a",

View file

@ -1,15 +1,12 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"title": "Unicode 2" "title": "Unicode 2"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Value 'test' must show OptionDescription" "title": "Value 'test' must show OptionDescription"
} }
@ -13,15 +11,12 @@
"title": "Common configuration" "title": "Common configuration"
}, },
"unicode1": { "unicode1": {
"name": "unicode1",
"properties": { "properties": {
"unicode1.unicode2": { "unicode1.unicode2": {
"name": "unicode1.unicode2",
"type": "string", "type": "string",
"title": "Unicode 2" "title": "Unicode 2"
}, },
"unicode1.unicode3": { "unicode1.unicode3": {
"name": "unicode1.unicode3",
"type": "string", "type": "string",
"title": "Unicode 3" "title": "Unicode 3"
} }

View file

@ -1,15 +1,12 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Value 'test' must show Unicode 2" "title": "Value 'test' must show Unicode 2"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"title": "Unicode 2" "title": "Unicode 2"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Unicode 1", "title": "Unicode 1",
"value": "word" "value": "word"

View file

@ -1,15 +1,12 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"title": "Unicode 2" "title": "Unicode 2"
} }

View file

@ -1,15 +1,12 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"title": "Unicode 2 (copy)" "title": "Unicode 2 (copy)"
} }

View file

@ -1,16 +1,13 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode 1" "title": "Unicode 1"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "string", "type": "string",
"isMulti": true, "isMulti": true,
"title": "Unicode 2" "title": "Unicode 2"

View file

@ -1,19 +1,15 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode1": { "options.unicode1": {
"name": "options.unicode1",
"type": "string", "type": "string",
"value": "test", "value": "test",
"title": "Unicode 1" "title": "Unicode 1"
}, },
"options.unicode2": { "options.unicode2": {
"name": "options.unicode2",
"type": "symlink", "type": "symlink",
"opt_path": "options.unicode1", "opt_path": "options.unicode1"
"title": "Unicode 1"
} }
}, },
"type": "object", "type": "object",

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Unicode 1" "title": "Unicode 1"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Expert unicode" "title": "Expert unicode"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.unicode": { "options.unicode": {
"name": "options.unicode",
"type": "string", "type": "string",
"title": "Expert unicode" "title": "Expert unicode"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.username": { "options.username": {
"name": "options.username",
"type": "username", "type": "username",
"title": "Username description" "title": "Username description"
} }

View file

@ -1,10 +1,8 @@
{ {
"schema": { "schema": {
"options": { "options": {
"name": "options",
"properties": { "properties": {
"options.username": { "options.username": {
"name": "options.username",
"type": "username", "type": "username",
"title": "Username description frozen" "title": "Username description frozen"
} }

View file

@ -205,7 +205,7 @@ def test_jsons_subconfig():
new_schema = {} new_schema = {}
for key_schema, val_schema in schema.items(): for key_schema, val_schema in schema.items():
key = modulepath + '.' + key_schema key = modulepath + '.' + key_schema
val_schema['name'] = key # val_schema['name'] = key
if 'opt_path' in val_schema: if 'opt_path' in val_schema:
val_schema['opt_path'] = modulepath + '.' + val_schema['opt_path'] val_schema['opt_path'] = modulepath + '.' + val_schema['opt_path']
if 'properties' in val_schema: if 'properties' in val_schema:

View file

@ -24,7 +24,7 @@ from .i18n import _
from .setting import ConfigBag, OptionBag, owners, groups, Undefined, undefined, \ from .setting import ConfigBag, OptionBag, owners, groups, Undefined, undefined, \
FORBIDDEN_SET_PROPERTIES, SPECIAL_PROPERTIES, EXPIRATION_TIME FORBIDDEN_SET_PROPERTIES, SPECIAL_PROPERTIES, EXPIRATION_TIME
from .config import KernelConfig, SubConfig, KernelGroupConfig, KernelMetaConfig, KernelMixConfig from .config import KernelConfig, SubConfig, KernelGroupConfig, KernelMetaConfig, KernelMixConfig
from .option import ChoiceOption, OptionDescription from .option import ChoiceOption, RegexpOption, OptionDescription
from .todict import TiramisuDict from .todict import TiramisuDict
@ -265,6 +265,19 @@ class _TiramisuOptionOption(_TiramisuOptionOptionDescription):
option = self._option_bag.option option = self._option_bag.option
return option.impl_get_callback() return option.impl_get_callback()
def pattern(self) -> str:
option = self._option_bag.option
type = option.get_type()
if isinstance(option, RegexpOption):
return option._regexp.pattern
if type == 'integer':
return r'^[0-9]+$'
if type == 'domainname':
return option.impl_get_extra('_domain_re').pattern
if type in ['ip', 'network', 'netmask']:
#FIXME only from 0.0.0.0 to 255.255.255.255
return r'^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
class TiramisuOptionOption(CommonTiramisuOption): class TiramisuOptionOption(CommonTiramisuOption):
"""Manage option""" """Manage option"""

View file

@ -398,13 +398,13 @@ class TiramisuDict:
if order is not None: if order is not None:
order.append(path) order.append(path)
if childapi.option.isoptiondescription(): if childapi.option.isoptiondescription():
web_type = 'optiondescription'
if childapi_option.isleadership(): if childapi_option.isleadership():
type_ = 'array' type_ = 'array'
else: else:
type_ = 'object' type_ = 'object'
if schema is not None: if schema is not None:
schema[path] = {'name': path, schema[path] = {'properties': OrderedDict(),
'properties': OrderedDict(),
'type': type_} 'type': type_}
subschema = schema[path]['properties'] subschema = schema[path]['properties']
else: else:
@ -425,22 +425,22 @@ class TiramisuDict:
web_type = 'symlink' web_type = 'symlink'
else: else:
web_type = childapi_option.type() web_type = childapi_option.type()
value = childapi.option.default() value = childapi.option.default()
if value not in [[], None]: if value not in [[], None]:
has_value = True
else:
value = None
has_value = False
is_multi = childapi_option.ismulti()
if is_multi:
default = childapi_option.defaultmulti()
if default not in [None, []]:
has_value = True has_value = True
else:
value = None
has_value = False
is_multi = childapi_option.ismulti()
if is_multi:
default = childapi_option.defaultmulti()
if default not in [None, []]:
has_value = True
else:
default = None
else: else:
default = None default = None
else:
default = None
if schema is not None: if schema is not None:
self.gen_schema(schema, self.gen_schema(schema,
@ -461,7 +461,8 @@ class TiramisuDict:
childtype, childtype,
has_value) has_value)
if schema is not None: if schema is not None:
schema[path]['title'] = childapi_option.doc() if web_type != 'symlink':
schema[path]['title'] = childapi_option.doc()
self.add_help(schema[path], self.add_help(schema[path],
childapi) childapi)
if init and form is not None: if init and form is not None:
@ -482,8 +483,7 @@ class TiramisuDict:
default, default,
is_multi, is_multi,
web_type): web_type):
schema[path] = {'name': path, schema[path] = {'type': web_type}
'type': web_type}
if childapi_option.issymlinkoption(): if childapi_option.issymlinkoption():
schema[path]['opt_path'] = childapi_option.get().impl_getopt().impl_getpath() schema[path]['opt_path'] = childapi_option.get().impl_getopt().impl_getpath()
else: else:
@ -528,15 +528,9 @@ class TiramisuDict:
obj_form['clearable'] = True obj_form['clearable'] = True
if self.remotable == 'all' or childapi_option.has_dependency(): if self.remotable == 'all' or childapi_option.has_dependency():
obj_form['remote'] = True obj_form['remote'] = True
if web_type == 'integer': pattern = childapi_option.pattern()
obj_form['allowedpattern'] = '[0-9]' if pattern is not None:
if isinstance(child, RegexpOption): obj_form['pattern'] = pattern
obj_form['pattern'] = child._regexp.pattern
if web_type == 'domainname':
obj_form['pattern'] = child.impl_get_extra('_domain_re').pattern
if childtype in ['IPOption', 'NetworkOption', 'NetmaskOption']:
#FIXME only from 0.0.0.0 to 255.255.255.255
obj_form['pattern'] = r'^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
if childtype == 'FloatOption': if childtype == 'FloatOption':
obj_form['step'] = 'any' obj_form['step'] = 'any'
if childtype == 'PortOption': if childtype == 'PortOption':