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": {
"options": {
"name": "options",
"properties": {
"options.boolean": {
"name": "options.boolean",
"type": "boolean",
"title": "Boolean 1"
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@ from .i18n import _
from .setting import ConfigBag, OptionBag, owners, groups, Undefined, undefined, \
FORBIDDEN_SET_PROPERTIES, SPECIAL_PROPERTIES, EXPIRATION_TIME
from .config import KernelConfig, SubConfig, KernelGroupConfig, KernelMetaConfig, KernelMixConfig
from .option import ChoiceOption, OptionDescription
from .option import ChoiceOption, RegexpOption, OptionDescription
from .todict import TiramisuDict
@ -265,6 +265,19 @@ class _TiramisuOptionOption(_TiramisuOptionOptionDescription):
option = self._option_bag.option
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):
"""Manage option"""

View File

@ -398,13 +398,13 @@ class TiramisuDict:
if order is not None:
order.append(path)
if childapi.option.isoptiondescription():
web_type = 'optiondescription'
if childapi_option.isleadership():
type_ = 'array'
else:
type_ = 'object'
if schema is not None:
schema[path] = {'name': path,
'properties': OrderedDict(),
schema[path] = {'properties': OrderedDict(),
'type': type_}
subschema = schema[path]['properties']
else:
@ -461,6 +461,7 @@ class TiramisuDict:
childtype,
has_value)
if schema is not None:
if web_type != 'symlink':
schema[path]['title'] = childapi_option.doc()
self.add_help(schema[path],
childapi)
@ -482,8 +483,7 @@ class TiramisuDict:
default,
is_multi,
web_type):
schema[path] = {'name': path,
'type': web_type}
schema[path] = {'type': web_type}
if childapi_option.issymlinkoption():
schema[path]['opt_path'] = childapi_option.get().impl_getopt().impl_getpath()
else:
@ -528,15 +528,9 @@ class TiramisuDict:
obj_form['clearable'] = True
if self.remotable == 'all' or childapi_option.has_dependency():
obj_form['remote'] = True
if web_type == 'integer':
obj_form['allowedpattern'] = '[0-9]'
if isinstance(child, RegexpOption):
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]?)$'
pattern = childapi_option.pattern()
if pattern is not None:
obj_form['pattern'] = pattern
if childtype == 'FloatOption':
obj_form['step'] = 'any'
if childtype == 'PortOption':