Make AppMgr table more rigid

This commit is contained in:
Disassembler 2018-10-31 11:27:15 +01:00
parent b76a350d7b
commit 20a6d670ca
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
4 changed files with 14 additions and 5 deletions

View File

@ -202,8 +202,9 @@ class WSGIApp(object):
else: else:
status = 'Není nainstalována' status = 'Není nainstalována'
actions = '<a href="#" class="app-install">Instalovat</a>' actions = '<a href="#" class="app-install">Instalovat</a>'
is_error = isinstance(item.data, BaseException)
t = self.jinja_env.get_template('setup-apps-row.html') 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): def update_host_action(self, request):
# Update domain and port, then restart nginx # Update domain and port, then restart nginx

View File

@ -155,6 +155,10 @@ header p,
padding-top: 5px; padding-top: 5px;
} }
#app-manager {
table-layout: fixed;
}
.center { .center {
text-align: center; text-align: center;
} }

View File

@ -15,5 +15,9 @@
<td>{{ app_title }}</td> <td>{{ app_title }}</td>
<td class="center"><input type="checkbox" class="app-visible"{% if not_installed %} disabled{% elif conf['apps'][app]['visible'] %} checked{% endif %}></td> <td class="center"><input type="checkbox" class="app-visible"{% if not_installed %} disabled{% elif conf['apps'][app]['visible'] %} checked{% endif %}></td>
<td class="center"><input type="checkbox" class="app-autostart"{% if not_installed %} disabled{% elif is_service_autostarted(app) %} checked{% endif %}></td> <td class="center"><input type="checkbox" class="app-autostart"{% if not_installed %} disabled{% elif is_service_autostarted(app) %} checked{% endif %}></td>
{% if is_error %}
<td colspan="2">{{ status|safe }}</td>
{% else %}
<td>{{ status|safe }}</td> <td>{{ status|safe }}</td>
<td>{{ actions|safe }}</td> <td>{{ actions|safe }}</td>
{% endif %}

View File

@ -7,10 +7,10 @@
<table id="app-manager"> <table id="app-manager">
<thead> <thead>
<tr> <tr>
<td>Aplikace</td> <td style="width:190px">Aplikace</td>
<td>Zobrazena</td> <td style="width:70px">Zobrazena</td>
<td>Autostart</td> <td style="width:70px">Autostart</td>
<td>Stav</td> <td style="width:190px">Stav</td>
<td>Akce</td> <td>Akce</td>
</tr> </tr>
</thead> </thead>