Sorry Aleks that I got rid of the template, it does not apply here.
So @Bram @Bram @Bram @Bram @Bram @Bram @Bram @Bram, if I can’t summon you that way, I don’t know how to do it…
Here the issues I have with config-panel and actions.
Considering I’m only using the admin panel, that’s the purpose of those features.
- There’s no log of what 's going on. Looks like we still have stderr, but not stdout and the info output.
- Arguments in an action does not print properly, I only have a checkbox.
The default values aren’t from the values read into the files. But only the default values as set into the toml file.- And more importantly since it breaks fallback_ynh’s config-panel entirely, there’s a laconic error saying:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/api.py", line 439, in process
ret = self.actionsmap.process(arguments, timeout=30, route=_route)
File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 527, in process
return func(**arguments)
File "/usr/lib/moulinette/yunohost/log.py", line 287, in func_wrapper
result = func(*args, **kwargs)
File "/usr/lib/moulinette/yunohost/app.py", line 1824, in app_config_show_panel
config_panel = _get_app_config_panel(app)
File "/usr/lib/moulinette/yunohost/app.py", line 2163, in _get_app_config_panel
option["ask"] = {"en": option["ask"]}
KeyError: 'ask'
just because it doesn’t allow sub entry like:
[main]
name = "Fallback configuration"
[main.main_server]
name = "Fallback, main server configuration"
[main.main_server.encryption]
name = "Encryption"
[main.main_server.encryption.encrypt]
ask = "Do you want to encrypt your backups ?"
type = "boolean"
default = true
It works only with:
[main]
name = "Fallback configuration"
[main.main_server]
name = "Fallback, main server configuration"
# [main.main_server.encryption]
# name = "Encryption"
# [main.main_server.encryption.encrypt]
[main.main_server.encrypt]
ask = "Do you want to encrypt your backups ?"
type = "boolean"
default = true
Which change completely the shape of the menu, as well as all the variables used by the script.
toml files used for those test were https://github.com/YunoHost-Apps/fallback_ynh/blob/master/config_panel.toml and https://github.com/YunoHost-Apps/etherpad_mypads_ynh/blob/testing/config_panel.toml.
For the action, especially with arguments, it’s this one https://github.com/YunoHost-Apps/etherpad_mypads_ynh/blob/testing/actions.toml
It could as well be because of a misconfiguration or a syntax change that I didn’t heard about yet.
One way or the other, could be nice to go forward of these features.