You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-03 00:47:16 +02:00
Display error messages when Docker is unreachable properly, related to #78
This commit is contained in:
14
admin/freeposte/admin/templates/docker-error.html
Normal file
14
admin/freeposte/admin/templates/docker-error.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Docker error{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block subtitle %}
|
||||
{{ action }}
|
||||
{% endblock %}
|
||||
|
||||
{% block box_content %}
|
||||
<p>{% trans action %}An error occurred while talking to the Docker server.{% endtrans %}</p>
|
||||
<pre>{{ error }}</pre>
|
||||
{% endblock %}
|
@ -35,7 +35,11 @@ def logout():
|
||||
@access.global_admin
|
||||
def services():
|
||||
containers = {}
|
||||
for brief in dockercli.containers(all=True):
|
||||
try:
|
||||
all_containers = dockercli.containers(all=True)
|
||||
except Exception as error:
|
||||
return flask.render_template('docker-error.html', error=error)
|
||||
for brief in all_containers:
|
||||
if brief['Image'].startswith('freeposte/'):
|
||||
container = dockercli.inspect_container(brief['Id'])
|
||||
container['Image'] = dockercli.inspect_image(container['Image'])
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2016-10-02 17:33+0200\n"
|
||||
"POT-Creation-Date: 2016-10-13 09:28+0200\n"
|
||||
"PO-Revision-Date: 2016-10-02 15:02+0200\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@ -182,6 +182,14 @@ msgstr ""
|
||||
msgid "You are about to %(action)s. Please confirm your action."
|
||||
msgstr ""
|
||||
|
||||
#: freeposte/admin/templates/docker-error.html:4
|
||||
msgid "Docker error"
|
||||
msgstr ""
|
||||
|
||||
#: freeposte/admin/templates/docker-error.html:12
|
||||
msgid "An error occurred while talking to the Docker server."
|
||||
msgstr ""
|
||||
|
||||
#: freeposte/admin/templates/login.html:6
|
||||
msgid "Your account"
|
||||
msgstr ""
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2016-10-02 17:33+0200\n"
|
||||
"POT-Creation-Date: 2016-10-13 09:28+0200\n"
|
||||
"PO-Revision-Date: 2016-10-02 16:32+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: fr\n"
|
||||
@ -182,6 +182,14 @@ msgstr "Confirmer"
|
||||
msgid "You are about to %(action)s. Please confirm your action."
|
||||
msgstr "Vous allez %(action)s. Merci de confirmer votre action."
|
||||
|
||||
#: freeposte/admin/templates/docker-error.html:4
|
||||
msgid "Docker error"
|
||||
msgstr ""
|
||||
|
||||
#: freeposte/admin/templates/docker-error.html:12
|
||||
msgid "An error occurred while talking to the Docker server."
|
||||
msgstr ""
|
||||
|
||||
#: freeposte/admin/templates/login.html:6
|
||||
msgid "Your account"
|
||||
msgstr ""
|
||||
|
Reference in New Issue
Block a user