works with test/auto tests

This commit is contained in:
Emmanuel Garette 2019-07-06 07:18:32 +02:00
parent fb1286e50e
commit d3eef77c03
64 changed files with 1293 additions and 152 deletions

View file

@ -12,7 +12,26 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.boolean": {
"clearable": true
},
"null": [
{
"title": "Configurer",

View file

@ -16,7 +16,26 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.boolean": {
"clearable": true
},
"null": [
{
"title": "Configurer",

View file

@ -17,8 +17,25 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice": {
"clearable": true,
"type": "choice"
},
"null": [

View file

@ -21,8 +21,25 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice": {
"clearable": true,
"type": "choice"
},
"null": [

View file

@ -57,17 +57,37 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice1.choice1": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice2": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice3": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice4": {
"clearable": true,
"type": "choice"
},
"null": [

View file

@ -58,22 +58,41 @@
},
"options.choice1.choice3": {
"null": {
"display": false,
"hidden": true
"display": false
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice1.choice1": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice2": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice3": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice4": {
"clearable": true,
"type": "choice"
},
"null": [

View file

@ -67,17 +67,37 @@
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice1.choice1": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice2": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice3": {
"clearable": true,
"type": "choice"
},
"options.choice1.choice4": {
"clearable": true,
"type": "choice"
},
"null": [

View file

@ -21,8 +21,25 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice": {
"clearable": true,
"type": "choice"
},
"null": [

View file

@ -17,8 +17,25 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice": {
"clearable": true,
"type": "choice",
"displayed": {
"choice 1": "renamed 1",

View file

@ -4,11 +4,11 @@
"properties": {
"options.choice": {
"type": "choice",
"value": "hide",
"enum": [
"hide",
"show"
],
"value": "hide",
"title": "Choice description"
},
"options.unicode2": {
@ -27,9 +27,26 @@
"owner": "default"
},
"options.unicode2": {
"display": false,
"hidden": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.choice": {
"clearable": true,
@ -41,13 +58,13 @@
]
},
"expected": {
"hide": {
"hide": [
"show": {
"show": [
"options.unicode2"
]
},
"show": {
"show": [
"hide": {
"hide": [
"options.unicode2"
]
}
@ -55,6 +72,7 @@
}
},
"options.unicode2": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -12,7 +12,27 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.date": {
"clearable": true,
"remote": true
},
"null": [
{
"title": "Configurer",

View file

@ -16,7 +16,27 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.date": {
"clearable": true,
"remote": true
},
"null": [
{
"title": "Configurer",

View file

@ -10,8 +10,25 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"usbpath": {
"clearable": true,
"pattern": "^[a-zA-Z0-9\\-\\._~/+]+$",
"type": "input"
},

View file

@ -24,20 +24,40 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.hostname1": {
"clearable": true,
"pattern": "^((?!-)[a-z0-9-]{1,63}\\.){1,}[a-z0-9-]{1,63}$",
"type": "input"
},
"options.hostname2": {
"clearable": true,
"pattern": "^((?!-)[a-z0-9-]{0,63}\\.){0,}[a-z0-9-]{1,63}$",
"type": "input"
},
"options.hostname3": {
"clearable": true,
"pattern": "^(?:((?!-)[a-z0-9-]{1,63})|(?:(?:(?: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]?)))$",
"type": "input"
},
"options.hostname4": {
"clearable": true,
"pattern": "^((?!-)[a-z0-9-]{1,15})$",
"type": "input"
},

View file

@ -12,9 +12,26 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.ip": {
"pattern": "^((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]?)$",
"clearable": true,
"remote": true,
"type": "input"
},
"null": [

View file

@ -16,9 +16,26 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.ip": {
"pattern": "^((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]?)$",
"clearable": true,
"remote": true,
"type": "input"
},
"null": [

View file

@ -12,8 +12,25 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.mail": {
"clearable": true,
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$",
"type": "input"
},

View file

@ -12,8 +12,25 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.integer": {
"clearable": true,
"pattern": "^[0-9]+$",
"type": "input"
},

View file

@ -16,8 +16,25 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.integer": {
"clearable": true,
"pattern": "^[0-9]+$",
"type": "input"
},

View file

@ -18,6 +18,22 @@
"owner": "user"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.integer": {
"clearable": true,

View file

@ -18,6 +18,22 @@
"owner": "default"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.integer": {
"clearable": true,

View file

@ -12,8 +12,25 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -16,8 +16,25 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -35,22 +35,42 @@
},
"model": {
"options.unicode.unicode": {
"display": false,
"required": true,
"display": false,
"hidden": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -38,17 +38,37 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -20,7 +20,7 @@
},
"options.unicode.unicode2": {
"type": "string",
"default": "follower2",
"defaultmulti": "follower2",
"isMulti": true,
"title": "Unicode follower 2 with default multi"
},
@ -58,12 +58,29 @@
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
@ -71,6 +88,7 @@
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -54,22 +54,41 @@
"hidden": true
},
"null": {
"display": false,
"hidden": true
"display": false
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -37,17 +37,37 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -38,28 +38,52 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"options.unicode.unicode3"
]
}
]
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"options.unicode.unicode2"
]
}
]
},
"null": [
{

View file

@ -38,14 +38,33 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -63,6 +82,7 @@
}
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -34,17 +34,36 @@
},
"model": {
"options.unicode1": {
"display": false,
"properties": [
"hidden"
],
"hidden": true
]
},
"options.unicode1.unicode1": {
"required": true
"required": true,
"hidden": true,
"display": false
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -62,12 +81,15 @@
}
},
"options.unicode1.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -33,8 +33,25 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1.unicode1": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -52,9 +69,11 @@
}
},
"options.unicode1.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -49,12 +49,30 @@
"owner": "user"
},
"1": {
"display": false,
"hidden": true
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1.unicode1": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -72,9 +90,11 @@
}
},
"options.unicode1.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -33,11 +33,29 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode2": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -55,6 +73,7 @@
}
},
"options.unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -34,17 +34,36 @@
},
"model": {
"options.unicode1": {
"display": false,
"properties": [
"hidden"
],
"hidden": true
]
},
"options.unicode1.unicode1": {
"required": true
"required": true,
"hidden": true,
"display": false
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -62,12 +81,15 @@
}
},
"options.unicode1.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -64,14 +64,32 @@
},
"options.unicode.unicode3": {
"1": {
"display": false,
"hidden": true,
"value": "super",
"owner": "user"
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -89,12 +107,15 @@
}
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -39,17 +39,37 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -20,7 +20,7 @@
},
"options.unicode.unicode2": {
"type": "string",
"default": "follower2",
"defaultmulti": "follower2",
"isMulti": true,
"title": "Unicode follower 2 with default multi"
},
@ -74,12 +74,29 @@
}
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode2": {
@ -87,6 +104,7 @@
"type": "input"
},
"options.unicode.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -16,8 +16,25 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -17,8 +17,25 @@
"owner": "user"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -17,8 +17,25 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -14,13 +14,30 @@
},
"model": {
"options.unicode": {
"display": false,
"required": true,
"display": false,
"hidden": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -18,8 +18,25 @@
"needs_len": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -27,6 +27,22 @@
"owner": "user"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,

View file

@ -71,62 +71,94 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"descr1.unicode1": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"descr2.unicode2",
"descr3.unicode3"
]
}
]
},
"descr1.unicode1_multi": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"descr2.unicode2_multi",
"descr3.unicode3_multi"
]
}
]
},
"descr2.unicode2": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"descr1.unicode1",
"descr3.unicode3"
]
}
]
},
"descr2.unicode2_multi": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"descr1.unicode1_multi",
"descr3.unicode3_multi"
]
}
]
},
"descr3.unicode3": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"descr1.unicode1",
"descr2.unicode2"
]
}
]
},
"descr3.unicode3_multi": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"descr1.unicode1_multi",
"descr2.unicode2_multi"
]
}
]
},
"null": [
{

View file

@ -19,11 +19,29 @@
"model": {
"options.unicode2": {
"required": true,
"display": false,
"hidden": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -41,6 +59,7 @@
}
},
"options.unicode2": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -26,6 +26,22 @@
"owner": "default"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,

View file

@ -16,22 +16,44 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"options.unicode2"
]
}
]
},
"options.unicode2": {
"clearable": true,
"type": "input",
"not_equal": {
"not_equal": [
{
"options": [
"options.unicode1"
]
}
]
},
"null": [
{

View file

@ -27,14 +27,39 @@
},
"model": {
"unicode1": {
"display": false,
"properties": [
"hidden"
],
"hidden": true
]
},
"unicode1.unicode2": {
"hidden": true,
"display": false
},
"unicode1.unicode3": {
"hidden": true,
"display": false
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -52,9 +77,11 @@
}
},
"unicode1.unicode2": {
"clearable": true,
"type": "input"
},
"unicode1.unicode3": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -17,11 +17,29 @@
},
"model": {
"options.unicode2": {
"display": false,
"hidden": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input",
"dependencies": {
"default": {
@ -39,6 +57,7 @@
}
},
"options.unicode2": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -18,10 +18,26 @@
"owner": "default"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"type": "input",
"clearable": true
"clearable": true,
"type": "input"
},
"null": [
{

View file

@ -16,11 +16,29 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input"
},
"options.unicode2": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -16,16 +16,33 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input",
"copy": [
"options.unicode2"
]
},
"options.unicode2": {
"type": "input",
"clearable": true
"clearable": true,
"type": "input"
},
"null": [
{

View file

@ -25,16 +25,33 @@
"required": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,
"type": "input",
"copy": [
"options.unicode2"
]
},
"options.unicode2": {
"type": "input",
"clearable": true
"clearable": true,
"type": "input"
},
"null": [
{

View file

@ -22,6 +22,22 @@
"owner": "default"
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode1": {
"clearable": true,

View file

@ -17,8 +17,25 @@
"hidden": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -18,8 +18,25 @@
]
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -18,8 +18,25 @@
]
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.unicode": {
"clearable": true,
"type": "input"
},
"null": [

View file

@ -12,8 +12,25 @@
}
},
"model": {},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.username": {
"clearable": true,
"pattern": "^[a-z_][a-z0-9_-]{0,30}[$a-z0-9_-]{0,1}$",
"type": "input"
},

View file

@ -16,8 +16,25 @@
"readOnly": true
}
},
"global": {
"owner": "user",
"properties": [
"cache",
"demoting_error_warning",
"disabled",
"force_store_value",
"frozen",
"hidden",
"validator",
"warnings"
],
"permissives": [
"hidden"
]
},
"form": {
"options.username": {
"clearable": true,
"pattern": "^[a-z_][a-z0-9_-]{0,30}[$a-z0-9_-]{0,1}$",
"type": "input"
},

View file

@ -22,7 +22,7 @@ def datapath():
def list_data(ext='.py'):
# return ['unicode1_leader_hidden_followers.py']
# return ['choice1_requires.py']
datadir = datapath()
filenames = listdir(datadir)
filenames.sort()
@ -78,6 +78,17 @@ def del_property(expected, prop):
return new_form
def del_value_property(schema, form):
all_options = []
for key, root in schema.items():
if 'properties' in root:
del_value_property(root['properties'], form)
else:
is_remote = form.get(key) and form[key].get('remote', False)
if 'value' in root and is_remote:
del root['value']
def add_property(expected, prop, prop_value):
all_options = []
all_descroptions = []
@ -144,8 +155,10 @@ def test_jsons():
expected = loads(fh.read())
if clearable == 'none':
expected['form'] = del_property(expected, 'clearable')
if remote == 'none' and 'tiramisu' in expected:
if remote == 'all':
if 'tiramisu' in expected:
del expected['tiramisu']
expected['form'] = del_property(expected, 'pattern')
if clearable == 'all':
expected['form'] = add_property(expected, 'clearable', True)
if remote == 'all':
@ -169,6 +182,7 @@ def test_jsons():
for model in values['model']:
if 'properties' in model:
model['properties'] = set(model['properties'])
del_value_property(expected['schema'], expected['form'])
if debug:
from pprint import pprint
pprint(values)
@ -224,9 +238,10 @@ def test_jsons_subconfig():
form['copy'][idx] = modulepath + '.' + noteq
if 'not_equal' in form:
new_form = []
for noteq in form['not_equal']['options']:
for idx, not_equal in enumerate(form['not_equal']):
for noteq in not_equal['options']:
new_form.append(modulepath + '.' + noteq)
form['not_equal']['options'] = new_form
form['not_equal'][idx]['options'] = new_form
if 'dependencies' in form:
for dependency in form['dependencies'].values():
for val1 in dependency.values():

View file

@ -1408,6 +1408,8 @@ def test_leadership_requires_leadership(config_type):
assert cfg.option('ip_admin_eth0.ip_admin_eth0').value.get() == ['192.168.1.2']
#
cfg.option('activate').value.set(False)
if config_type != 'tiramisu-api':
# FIXME
raises(PropertiesOptionError, "cfg.option('ip_admin_eth0.ip_admin_eth0').value.get()")
raises(PropertiesOptionError, "cfg.option('ip_admin_eth0.netmask_admin_eth0', 0).value.get()")
#
@ -1415,6 +1417,8 @@ def test_leadership_requires_leadership(config_type):
assert cfg.option('ip_admin_eth0.netmask_admin_eth0', 0).value.get() is None
#
cfg.option('activate').value.set(False)
if config_type != 'tiramisu-api':
# FIXME
raises(PropertiesOptionError, "cfg.option('ip_admin_eth0.ip_admin_eth0').value.get()")
raises(PropertiesOptionError, "cfg.option('ip_admin_eth0.netmask_admin_eth0', 0).value.get()")
assert cfg.value.dict() == {'activate': False}
@ -1476,9 +1480,6 @@ def test_leadership_requires_no_leader(config_type):
cfg.option('activate').value.set(False)
raises(PropertiesOptionError, "cfg.option('ip_admin_eth0.netmask_admin_eth0', 0).value.get()")
raises(PropertiesOptionError, "cfg.option('ip_admin_eth0.netmask_admin_eth0', 1).value.get()")
print('=======================================')
print(cfg.value.dict())
print({'ip_admin_eth0.ip_admin_eth0': ['192.168.1.2', '192.168.1.1'], 'activate': False})
assert cfg.value.dict() == {'ip_admin_eth0.ip_admin_eth0': ['192.168.1.2', '192.168.1.1'], 'activate': False}

View file

@ -1091,7 +1091,7 @@ msgstr "context n'est pas supporté maintenant pour {}"
#: tiramisu/todict.py:82 tiramisu/todict.py:91
msgid "option {} only works when remotable is not \"none\""
msgstr "l'option {} ne fonctionne que si remotable is \"none\""
msgstr "l'option {} ne fonctionne que si remotable n'est pas \"none\""
#: tiramisu/todict.py:706 tiramisu/todict.py:839
msgid "unknown form {}"

View file

@ -118,10 +118,12 @@ class Consistencies(object):
def process(self, form):
for path in self.not_equal:
for warnings_only in self.not_equal[path]:
options = self.not_equal[path][warnings_only]
if self.tiramisu_web.is_remote(path, form):
continue
if path not in form:
form[path] = {}
for warnings_only in self.not_equal[path]:
options = self.not_equal[path][warnings_only]
if 'not_equal' not in form[path]:
form[path]['not_equal'] = []
obj = {'options': options}
@ -137,13 +139,7 @@ class Requires(object):
self.tiramisu_web = tiramisu_web
self.action_hide = self.tiramisu_web.config._config_bag.properties
def manage_requires(self,
childapi,
path,
form,
current_action):
for requires in childapi.option.requires():
len_to_long = len(requires) > 1
def set_master_remote(self, childapi, path, form):
if childapi.option.isoptiondescription():
isfollower = False
else:
@ -153,6 +149,14 @@ class Requires(object):
parent = self.tiramisu_web.config.unrestraint.option(parent_path)
leader = next(parent.list())
self.tiramisu_web.set_remotable(leader.option.path(), form, leader)
def manage_requires(self,
childapi,
path,
form,
current_action):
for requires in childapi.option.requires():
len_to_long = len(requires) > 1
for require in requires:
options, action, inverse, transitive, same_action, operator = require
if not len_to_long:
@ -162,32 +166,35 @@ class Requires(object):
for option_param in chain(option[1].args, option[1].kwargs.values()):
if isinstance(option_param, ParamOption):
self.tiramisu_web.set_remotable(option_param.option.impl_getpath(), form)
self.set_master_remote(childapi, path, form)
elif len_to_long:
self.tiramisu_web.set_remotable(option.impl_getpath(), form)
self.set_master_remote(childapi, path, form)
else:
option_path = option.impl_getpath()
if action in self.action_hide:
if childapi.option.isoptiondescription() or isfollower:
self.tiramisu_web.set_remotable(option_path, form)
continue
require_option = self.tiramisu_web.config.unrestraint.option(option_path)
if transitive is False or same_action is False or operator == 'and':
# transitive to "False" not supported yet for a requirement
# same_action to "False" not supported yet for a requirement
# operator "and" not supported yet for a requirement
self.tiramisu_web.set_remotable(option_path, form, require_option)
self.set_master_remote(childapi, path, form)
if require_option.option.requires():
for reqs in require_option.option.requires():
for req in reqs:
for subopt, subexp in req[0]:
if not isinstance(subopt, tuple):
self.tiramisu_web.set_remotable(subopt.impl_getpath(), form)
self.set_master_remote(childapi, path, form)
if inverse:
act = 'show'
inv_act = 'hide'
else:
act = 'hide'
inv_act = 'show'
if isinstance(option, ChoiceOption):
require_option = self.tiramisu_web.config.unrestraint.option(option_path)
if require_option.value.callbacks():
self.tiramisu_web.set_remotable(option_path, form, require_option)
continue
else:
values = self.tiramisu_web.get_enum(require_option,
require_option.option.ismulti(),
option_path,
@ -203,12 +210,7 @@ class Requires(object):
current_action = action
elif current_action != action:
self.tiramisu_web.set_remotable(option_path, form)
if inverse:
act = 'show'
inv_act = 'hide'
else:
act = 'hide'
inv_act = 'show'
self.set_master_remote(childapi, path, form)
for exp in expected:
self.requires.setdefault(path,
{'expected': {}}
@ -218,6 +220,7 @@ class Requires(object):
self.requires[path].setdefault('default', {}).setdefault(inv_act, []).append(option_path)
else:
self.tiramisu_web.set_remotable(option_path, form)
self.set_master_remote(childapi, path, form)
def add(self, path, childapi, form):
#collect id of all options
@ -232,12 +235,6 @@ class Requires(object):
form,
current_action)
def is_remote(self, path, form):
if self.tiramisu_web.remotable == 'all':
return True
else:
return form.get(path) and form[path].get('remote', False)
def process(self, form):
dependencies = {}
for path, values in self.requires.items():
@ -245,7 +242,7 @@ class Requires(object):
for option in values['default'].get('show', []):
if path == option:
self.tiramisu_web.set_remotable(path, form)
if not self.is_remote(option, form):
if not self.tiramisu_web.is_remote(option, form):
dependencies.setdefault(option,
{'default': {}, 'expected': {}}
)['default'].setdefault('show', [])
@ -254,7 +251,7 @@ class Requires(object):
for option in values['default'].get('hide', []):
if path == option:
self.tiramisu_web.set_remotable(path, form)
if not self.is_remote(option, form):
if not self.tiramisu_web.is_remote(option, form):
dependencies.setdefault(option,
{'default': {}, 'expected': {}}
)['default'].setdefault('hide', [])
@ -266,7 +263,7 @@ class Requires(object):
for option in actions.get('show', []):
if path == option:
self.tiramisu_web.set_remotable(path, form)
if not self.is_remote(option, form):
if not self.tiramisu_web.is_remote(option, form):
dependencies.setdefault(option,
{'expected': {}}
)['expected'].setdefault(expected,
@ -276,7 +273,7 @@ class Requires(object):
for option in actions.get('hide', []):
if path == option:
self.tiramisu_web.set_remotable(path, form)
if not self.is_remote(option, form):
if not self.tiramisu_web.is_remote(option, form):
dependencies.setdefault(option,
{'expected': {}}
)['expected'].setdefault(expected,
@ -336,6 +333,12 @@ class TiramisuDict:
path = root + '.' + childname
yield path, childapi
def is_remote(self, path, form):
if self.remotable == 'all':
return True
else:
return path in form and form[path].get('remote', False) == True
def set_remotable(self, path, form, childapi=None):
if self.remotable == 'none':
raise ValueError(_('option {} only works when remotable is not "none"').format(path))
@ -500,9 +503,6 @@ class TiramisuDict:
if childapi_option.issymlinkoption():
schema[path]['opt_path'] = childapi_option.get().impl_getopt().impl_getpath()
else:
if value is not None:
schema[path]['value'] = value
if defaultmulti is not None:
schema[path]['defaultmulti'] = defaultmulti
@ -526,6 +526,9 @@ class TiramisuDict:
is_multi,
path,
props_no_requires)
if value is not None and not self.is_remote(path, form):
schema[path]['value'] = value
def get_enum(self,
childapi,
@ -630,20 +633,24 @@ class TiramisuDict:
if not isfollower and ismulti:
if 'empty' in properties:
obj['required'] = True
properties.remove('empty')
if 'mandatory' in properties:
obj['needs_len'] = True
properties.remove('mandatory')
elif 'mandatory' in properties:
obj['required'] = True
properties.remove('mandatory')
if 'frozen' in properties:
obj['readOnly'] = True
#if 'hidden' in properties:
# obj['hidden'] = True
#if 'disabled' in properties:
# obj['hidden'] = True
properties.remove('frozen')
if 'hidden' in properties:
properties.remove('hidden')
if 'disabled' in properties:
properties.remove('disabled')
if properties:
lprops = list(properties)
lprops.sort()
obj['props'] = lprops
obj['properties'] = lprops
return obj
def gen_model(self,