test_apps/config_app_ynh/config_panel.toml

247 lines
6.5 KiB
TOML
Raw Normal View History

2021-09-02 02:31:39 +02:00
version = "1.0"
2021-08-14 12:26:20 +02:00
[main]
name = "Main panel"
2021-09-02 02:31:39 +02:00
services = ["nginx"]
2021-09-06 16:28:53 +02:00
2021-08-14 12:26:20 +02:00
[main.components]
2021-09-06 16:28:53 +02:00
name = "Classic fields"
2021-08-14 12:26:20 +02:00
[main.components.boolean]
2021-09-06 16:28:53 +02:00
ask = "I can haz boolean?"
2021-08-14 12:26:20 +02:00
type = "boolean"
2021-08-14 12:26:20 +02:00
[main.components.number]
2021-09-06 16:28:53 +02:00
ask = "I can haz number?"
2021-08-14 12:26:20 +02:00
type = "number"
min = 1
max = 100
[main.components.range]
2021-09-06 16:28:53 +02:00
ask = "I can haz range?"
2021-08-14 12:26:20 +02:00
type = "range"
2021-09-02 02:31:39 +02:00
min = 0
2021-08-14 12:26:20 +02:00
max = 100
2021-09-02 02:31:39 +02:00
step = 10
2021-08-14 12:26:20 +02:00
[main.components.str]
2021-09-06 16:28:53 +02:00
ask = "I can haz string?"
2021-08-14 12:26:20 +02:00
type = "string"
2021-08-14 12:26:20 +02:00
[main.components.text]
2021-09-06 16:28:53 +02:00
ask = "I can haz text?"
2021-08-14 12:26:20 +02:00
type = "text"
2021-08-14 12:26:20 +02:00
[main.components.password]
2021-09-06 16:28:53 +02:00
ask = "I can haz paszwurd?"
2021-08-14 12:26:20 +02:00
type = "password"
[main.components.path]
2021-09-06 16:28:53 +02:00
ask = "I can haz path?"
2021-08-14 12:26:20 +02:00
type = "path"
2021-08-14 12:26:20 +02:00
[main.components.email]
2021-09-06 16:28:53 +02:00
ask = "I can haz email?"
2021-08-14 12:26:20 +02:00
type = "email"
2021-08-14 12:26:20 +02:00
[main.components.url]
2021-09-06 16:28:53 +02:00
ask = "I can haz url?"
2021-08-14 12:26:20 +02:00
type = "url"
2021-08-14 12:26:20 +02:00
[main.components.date]
2021-09-06 16:28:53 +02:00
ask = "I can haz date?"
2021-08-14 12:26:20 +02:00
type = "date"
2021-08-14 12:26:20 +02:00
[main.components.time]
2021-09-06 16:28:53 +02:00
ask = "I can haz time?"
2021-08-14 12:26:20 +02:00
type = "time"
2021-08-14 12:26:20 +02:00
[main.components.color]
2021-09-06 16:28:53 +02:00
ask = "I can haz color?"
2021-08-14 12:26:20 +02:00
type = "color"
2021-08-14 12:26:20 +02:00
[main.components.select]
ask = "I can haz choices?"
2021-08-14 12:26:20 +02:00
type = "select"
choices.woot = "W00t \\o\\ You can haz choicez"
choices.awesome = "Awesom! =D You can put a super long description"
choices.ohnoes = "Uhoh? ô.o"
[main.components.domain]
2021-09-06 16:28:53 +02:00
ask = "I can haz domain?"
2021-08-14 12:26:20 +02:00
type = "domain"
2021-08-14 12:26:20 +02:00
[main.components.user]
2021-09-06 16:28:53 +02:00
ask = "I can haz user?"
2021-08-14 12:26:20 +02:00
type = "user"
2021-08-14 12:26:20 +02:00
[main.components.tags]
2021-09-06 16:28:53 +02:00
ask = "I can haz several emailz?"
2021-08-14 12:26:20 +02:00
type = "tags"
2021-09-02 02:31:39 +02:00
placeholder = "Enter some emails separated by commas"
limit = 3
pattern.regexp = '^.+@.+$'
pattern.error = 'An email is required for this field'
2021-09-02 02:31:39 +02:00
[main.components.tags2]
2021-09-06 16:28:53 +02:00
ask = "I can chose several tagz?"
2021-09-02 02:31:39 +02:00
type = "tags"
choices = ['table', 'chair', 'bed', 'desk']
placeholder = "Add some tags"
icon = "bed"
2021-09-02 02:31:39 +02:00
[main.components.file]
2021-09-06 16:28:53 +02:00
ask = "I can haz file?"
2021-09-02 02:31:39 +02:00
type = "file"
2021-09-16 03:07:08 +02:00
help = "(NB: this won't actually be uploaded anywhere unless 'bind' is defined in the question)"
2021-08-14 12:26:20 +02:00
[main.messages]
2021-09-06 16:28:53 +02:00
name = "Messages / Read-only components"
2021-08-14 12:26:20 +02:00
[main.messages.success]
ask = "I can haz success!"
2021-09-02 02:31:39 +02:00
type = "alert"
style = "success"
icon = "beer"
2021-08-14 12:26:20 +02:00
[main.messages.info]
2021-09-06 16:28:53 +02:00
ask = "I can haz info"
2021-09-02 02:31:39 +02:00
type = "alert"
style = "info"
2021-08-14 12:26:20 +02:00
[main.messages.warning]
2021-09-06 16:28:53 +02:00
ask = "Onoez i haz a warnin'"
2021-09-02 02:31:39 +02:00
type = "alert"
style = "warning"
[main.messages.danger]
2021-09-06 16:28:53 +02:00
ask = "Onoez i haz a Danger!!"
2021-09-02 02:31:39 +02:00
type = "alert"
style = "danger"
2021-08-14 12:26:20 +02:00
[main.messages.display_text]
2021-09-06 16:28:53 +02:00
ask = "I haz a simple text"
2021-08-14 12:26:20 +02:00
type = "display_text"
2021-08-14 12:26:20 +02:00
[main.messages.markdown]
2021-09-06 16:28:53 +02:00
ask = "I haz some **awesome** *markdown* text!!"
2021-08-14 12:26:20 +02:00
type = "markdown"
2021-08-14 12:26:20 +02:00
[main.generic]
name = "Specific question options demo"
2021-09-02 02:31:39 +02:00
[main.generic.pattern]
ask = "I can haz pattern validation!"
2021-08-14 12:26:20 +02:00
type = "string"
2021-09-02 02:31:39 +02:00
pattern.regexp = '^[A-F]\d\d$'
pattern.error = "Provide a room like F12 : one uppercase and 2 numbers"
2021-08-14 12:26:20 +02:00
[main.generic.example]
ask = "I can haz example value"
2021-08-14 12:26:20 +02:00
type = "string"
example = "Camille"
[main.generic.required]
ask = "I can haz required field"
2021-08-14 12:26:20 +02:00
type = "string"
optional = false
2021-09-06 17:58:02 +02:00
[main.generic.helptext]
ask = "I can haz some help tips"
type = "string"
help = "Im in ur help text helpin' yar userz"
[main.generic.triggervisible]
ask = "I can trigger visibility for other questionz or sectionz!!"
2021-09-02 02:31:39 +02:00
type = "select"
choices.nothing = "Not triggering any invisible question/section"
choices.nextquestion = "Display next question"
choices.nextsection = "Display next section"
2021-09-06 17:58:02 +02:00
[main.generic.visible_question]
2021-09-06 16:28:53 +02:00
ask = "This question is only displayed if previous question is set to 'Display next question'"
2021-09-02 02:31:39 +02:00
type = "string"
visible = "triggervisible == 'nextquestion'"
2021-09-02 02:31:39 +02:00
[main.ifsection]
2021-09-06 16:28:53 +02:00
name = "This section is only displayed if the previous question is set to 'Display next section'"
2021-09-06 16:57:47 +02:00
visible = "triggervisible == 'nextsection'"
2021-09-02 02:31:39 +02:00
[main.ifsection.sub]
2021-09-06 16:28:53 +02:00
ask = "I can haz cheezburgers?"
2021-08-14 12:26:20 +02:00
type = "string"
[bind]
name = "Bind panel"
[bind.settings]
2021-09-06 16:28:53 +02:00
name = "Bind to settings"
[bind.settings.arg1]
2021-08-14 12:26:20 +02:00
ask = "Save app settings arg1"
type = "string"
[bind.variable]
2021-09-06 16:28:53 +02:00
name = "Bind to key/value in files"
[bind.variable.arg2]
2021-09-06 16:28:53 +02:00
ask = "I can haz value for arg2 in test.yml ?"
2021-08-14 12:26:20 +02:00
type = "string"
bind = ":__FINALPATH__/test.yml"
[bind.variable.arg3]
2021-09-06 16:28:53 +02:00
ask = "I can haz value for arg3 in test.json ?"
2021-08-14 12:26:20 +02:00
type = "string"
bind = ":__FINALPATH__/test.json"
[bind.variable.arg4]
2021-09-06 16:28:53 +02:00
ask = "I can haz value for arg4 in test.ini ?"
2021-08-14 12:26:20 +02:00
type = "string"
bind = ":__FINALPATH__/test.ini"
[bind.variable.arg5]
2021-09-06 16:28:53 +02:00
ask = "I can haz value for arg5 in test.php ?"
2021-08-14 12:26:20 +02:00
type = "string"
bind = ":__FINALPATH__/test.php"
[bind.variable.arg6]
2021-09-06 16:28:53 +02:00
ask = "I can haz value for arg6 in test.py ?"
2021-08-14 12:26:20 +02:00
type = "string"
bind = ":__FINALPATH__/test.py"
2021-08-14 12:26:20 +02:00
[bind.file]
2021-09-06 16:28:53 +02:00
name = "Bind to an entire file"
[bind.file.arg7]
2021-09-06 16:28:53 +02:00
ask = "I can haz a .cube ?"
2021-09-02 02:31:39 +02:00
type = "file"
accept = ".cube"
bind = "__FINALPATH__/test.cube"
2021-09-02 02:31:39 +02:00
[bind.file.arg7b]
2021-09-06 16:28:53 +02:00
ask = "Emeged i can edit sum file!#1!"
2021-09-02 02:31:39 +02:00
type = "text"
bind = "__FINALPATH__/nginx.conf"
2021-08-14 12:26:20 +02:00
[bind.function]
name = "Bind to custom bash getters / validators / setters"
[bind.function.arg8]
ask = "I can haz a password ?"
help = "N.B. : This is mapped to a custom validate__/set__arg8 function in the config script"
2021-08-14 12:26:20 +02:00
type = "password"
bind = "null"
[bind.function.arg9]
2021-09-02 02:31:39 +02:00
ask = "Custom getter arg9"
help = "N.B.: This is mapped to a custom get__arg9 function in the config script"
2021-09-02 02:31:39 +02:00
type = "markdown"
bind = "null"
[bind.function.alert]
2021-09-02 02:31:39 +02:00
ask = "Custom getter alert"
help = "N.B.: This is mapped to a custom get__alert function in the config script"
2021-09-02 02:31:39 +02:00
type = "alert"
style = "info"
bind = "null"