mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] List available domains when installing an app by CLI.
This commit is contained in:
parent
656bb809d1
commit
64af6a1dbf
2 changed files with 9 additions and 1 deletions
|
@ -84,6 +84,7 @@
|
||||||
"domain_zone_exists": "DNS zone file already exists",
|
"domain_zone_exists": "DNS zone file already exists",
|
||||||
"domain_zone_not_found": "DNS zone file not found for domain {:s}",
|
"domain_zone_not_found": "DNS zone file not found for domain {:s}",
|
||||||
"done": "Done",
|
"done": "Done",
|
||||||
|
"domains_available": "Available domains:",
|
||||||
"downloading": "Downloading...",
|
"downloading": "Downloading...",
|
||||||
"dyndns_cron_installed": "The DynDNS cron job has been installed",
|
"dyndns_cron_installed": "The DynDNS cron job has been installed",
|
||||||
"dyndns_cron_remove_failed": "Unable to remove the DynDNS cron job",
|
"dyndns_cron_remove_failed": "Unable to remove the DynDNS cron job",
|
||||||
|
|
|
@ -1497,7 +1497,7 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
args -- A dictionnary of arguments to parse
|
args -- A dictionnary of arguments to parse
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.domain import domain_list
|
from yunohost.domain import domain_list, _get_maindomain
|
||||||
from yunohost.user import user_info
|
from yunohost.user import user_info
|
||||||
|
|
||||||
args_dict = OrderedDict()
|
args_dict = OrderedDict()
|
||||||
|
@ -1537,6 +1537,13 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
# Check for a password argument
|
# Check for a password argument
|
||||||
is_password = True if arg_type == 'password' else False
|
is_password = True if arg_type == 'password' else False
|
||||||
|
|
||||||
|
if arg_type == 'domain':
|
||||||
|
arg_default = _get_maindomain()
|
||||||
|
ask_string += ' (default: {0})'.format(arg_default)
|
||||||
|
msignals.display(m18n.n('domains_available'))
|
||||||
|
for domain in domain_list(auth)['domains']:
|
||||||
|
msignals.display("- {}".format(domain))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
input_string = msignals.prompt(ask_string, is_password)
|
input_string = msignals.prompt(ask_string, is_password)
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
|
|
Loading…
Add table
Reference in a new issue