test_apps/config_app_ynh/config_panel.toml

236 lines
5.9 KiB
TOML

version = "1.0"
[main]
name = "Main panel"
services = ["nginx"]
[main.components]
name = ""
[main.components.boolean]
ask = "Put a boolean"
type = "boolean"
[main.components.number]
ask = "Put a number"
type = "number"
min = 1
max = 100
[main.components.range]
ask = "Put a range"
type = "range"
min = 0
max = 100
step = 10
[main.components.str]
ask = "Put a string"
type = "string"
[main.components.text]
ask = "Put a text"
type = "text"
[main.components.password]
ask = "Put a password"
type = "password"
[main.components.path]
ask = "Put a path"
type = "path"
[main.components.email]
ask = "Put a email"
type = "email"
[main.components.url]
ask = "Put a url"
type = "url"
[main.components.date]
ask = "Put a date"
type = "date"
[main.components.time]
ask = "Put a time"
type = "time"
[main.components.color]
ask = "Put a color"
type = "color"
[main.components.select]
ask = "Choose an option"
type = "select"
choices.option1 = "Plop1"
choices.option2 = "Plop2"
choices.option3 = "Plop3"
[main.components.domain]
ask = "Put a domain"
type = "domain"
[main.components.user]
ask = "Put a user"
type = "user"
[main.components.tags]
ask = "Put some emails"
type = "tags"
placeholder = "Enter some emails separated by commas"
limit = 3
pattern.regexp = '^.+@.+$'
pattern.error = 'An email is required for this field'
[main.components.tags2]
ask = "Put some tags from a list"
type = "tags"
choices = ['table', 'chair', 'bed', 'desk']
placeholder = "Add some tags"
icon = "bed"
[main.components.file]
ask = "Put a file"
type = "file"
[main.messages]
name = "Read only components"
[main.messages.success]
ask = "This is a success message"
type = "alert"
style = "success"
icon = "beer"
[main.messages.info]
ask = "This is an info message"
type = "alert"
style = "info"
[main.messages.warning]
ask = "This is an warning message"
type = "alert"
style = "warning"
[main.messages.danger]
ask = "This is a danger message"
type = "alert"
style = "danger"
[main.messages.display_text]
ask = "This is a simple text"
type = "display_text"
[main.messages.markdown]
ask = "This is a **markdown** text"
type = "markdown"
[main.generic]
name = "Generic options"
[main.generic.pattern]
ask = "This is a question with a pattern validation"
type = "string"
pattern.regexp = '^[A-F]\d\d$'
pattern.error = "Provide a room like F12 : one uppercase and 2 numbers"
[main.generic.example]
ask = "This is a question with an example value"
type = "string"
example = "Camille"
[main.generic.required]
ask = "This is a required value"
type = "string"
optional = false
[main.generic.help]
ask = "Here we add some help"
type = "select"
help = "You can not feel this question with your keyboard (yes i know it's very useful)"
choices.question = "Display next question"
choices.section = "Display next section"
[main.generic.visible]
ask = "Display if help question is filled"
type = "string"
visible = "help == 'question'"
[main.ifsection]
name = "Section displayed only if helplink is filled"
visible = "help == 'section'"
[main.ifsection.sub]
ask = "Display if helpLink question is filled"
type = "string"
[bind]
name = "Bind panel"
[bind.settings]
name = "App settings"
[bind.settings.arg1]
ask = "Save app settings arg1"
type = "string"
[bind.variable]
name = "YAML"
[bind.variable.arg2]
ask = "Save arg2 in YAML"
type = "string"
bind = ":__FINALPATH__/test.yml"
[bind.variable.arg3]
ask = "Save arg3 in JSON"
type = "string"
bind = ":__FINALPATH__/test.json"
[bind.variable.arg4]
ask = "Save arg4 in INI"
type = "string"
bind = ":__FINALPATH__/test.ini"
[bind.variable.arg5]
ask = "Save arg5 in PHP file"
type = "string"
bind = ":__FINALPATH__/test.php"
[bind.variable.arg6]
ask = "Save arg6 in python file"
type = "string"
bind = ":__FINALPATH__/test.py"
[bind.file]
name = "File"
[bind.file.arg7]
ask = "Save a cube file"
type = "file"
accept = ".cube"
bind = "__FINALPATH__/test.cube"
[bind.file.arg7b]
ask = "Nginx file"
type = "text"
bind = "__FINALPATH__/nginx.conf"
[bind.function]
name = "Bash function"
[bind.function.arg8]
ask = "Custom validator and setter for arg8 password"
type = "password"
bind = "null"
[bind.function.arg9]
ask = "Custom getter arg9"
type = "markdown"
bind = "null"
[bind.function.alert]
ask = "Custom getter alert"
type = "alert"
style = "info"
bind = "null"