From 20a6d670cab5c23694d222040e17ad53e9254d3c Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 31 Oct 2018 11:27:15 +0100 Subject: [PATCH] Make AppMgr table more rigid --- basic/srv/vm/mgr/wsgiapp.py | 3 ++- basic/srv/vm/static/css/style.css | 4 ++++ basic/srv/vm/templates/setup-apps-row.html | 4 ++++ basic/srv/vm/templates/setup-apps.html | 8 ++++---- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/basic/srv/vm/mgr/wsgiapp.py b/basic/srv/vm/mgr/wsgiapp.py index 97f706e..6480868 100644 --- a/basic/srv/vm/mgr/wsgiapp.py +++ b/basic/srv/vm/mgr/wsgiapp.py @@ -202,8 +202,9 @@ class WSGIApp(object): else: status = 'Není nainstalována' actions = 'Instalovat' + is_error = isinstance(item.data, BaseException) t = self.jinja_env.get_template('setup-apps-row.html') - return t.render({'conf': self.conf, 'session': request.session, 'app': app, 'app_title': app_title, 'status': status, 'actions': actions}) + return t.render({'conf': self.conf, 'session': request.session, 'app': app, 'app_title': app_title, 'status': status, 'actions': actions, 'is_error': is_error}) def update_host_action(self, request): # Update domain and port, then restart nginx diff --git a/basic/srv/vm/static/css/style.css b/basic/srv/vm/static/css/style.css index bd748bd..7ec9407 100644 --- a/basic/srv/vm/static/css/style.css +++ b/basic/srv/vm/static/css/style.css @@ -155,6 +155,10 @@ header p, padding-top: 5px; } +#app-manager { + table-layout: fixed; +} + .center { text-align: center; } diff --git a/basic/srv/vm/templates/setup-apps-row.html b/basic/srv/vm/templates/setup-apps-row.html index 551a1bc..520baa7 100644 --- a/basic/srv/vm/templates/setup-apps-row.html +++ b/basic/srv/vm/templates/setup-apps-row.html @@ -15,5 +15,9 @@ {{ app_title }} +{% if is_error %} +{{ status|safe }} +{% else %} {{ status|safe }} {{ actions|safe }} +{% endif %} diff --git a/basic/srv/vm/templates/setup-apps.html b/basic/srv/vm/templates/setup-apps.html index fec010a..651a285 100644 --- a/basic/srv/vm/templates/setup-apps.html +++ b/basic/srv/vm/templates/setup-apps.html @@ -7,10 +7,10 @@ - - - - + + + +
AplikaceZobrazenaAutostartStavAplikaceZobrazenaAutostartStav Akce