mirror of
				https://github.com/optim-enterprises-bv/Mailu.git
				synced 2025-10-31 10:08:02 +00: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 | @access.global_admin | ||||||
| def services(): | def services(): | ||||||
|     containers = {} |     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/'): |         if brief['Image'].startswith('freeposte/'): | ||||||
|             container = dockercli.inspect_container(brief['Id']) |             container = dockercli.inspect_container(brief['Id']) | ||||||
|             container['Image'] = dockercli.inspect_image(container['Image']) |             container['Image'] = dockercli.inspect_image(container['Image']) | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ msgid "" | |||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: PROJECT VERSION\n" | "Project-Id-Version: PROJECT VERSION\n" | ||||||
| "Report-Msgid-Bugs-To: EMAIL@ADDRESS\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" | "PO-Revision-Date: 2016-10-02 15:02+0200\n" | ||||||
| "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||||
| "Language: en\n" | "Language: en\n" | ||||||
| @@ -182,6 +182,14 @@ msgstr "" | |||||||
| msgid "You are about to %(action)s. Please confirm your action." | msgid "You are about to %(action)s. Please confirm your action." | ||||||
| msgstr "" | 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 | #: freeposte/admin/templates/login.html:6 | ||||||
| msgid "Your account" | msgid "Your account" | ||||||
| msgstr "" | msgstr "" | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ msgid "" | |||||||
| msgstr "" | msgstr "" | ||||||
| "Project-Id-Version: PROJECT VERSION\n" | "Project-Id-Version: PROJECT VERSION\n" | ||||||
| "Report-Msgid-Bugs-To: EMAIL@ADDRESS\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" | "PO-Revision-Date: 2016-10-02 16:32+0200\n" | ||||||
| "Last-Translator: \n" | "Last-Translator: \n" | ||||||
| "Language: fr\n" | "Language: fr\n" | ||||||
| @@ -182,6 +182,14 @@ msgstr "Confirmer" | |||||||
| msgid "You are about to %(action)s. Please confirm your action." | msgid "You are about to %(action)s. Please confirm your action." | ||||||
| msgstr "Vous allez %(action)s. Merci de confirmer votre 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 | #: freeposte/admin/templates/login.html:6 | ||||||
| msgid "Your account" | msgid "Your account" | ||||||
| msgstr "" | msgstr "" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pierre Jaury
					Pierre Jaury