show all apps in one box
This commit is contained in:
parent
ac69aebf4e
commit
a0cf39811c
@ -138,7 +138,8 @@ class WSGIApp(object):
|
|||||||
# Application manager view.
|
# Application manager view.
|
||||||
pkgmgr = PackageManager()
|
pkgmgr = PackageManager()
|
||||||
pkgmgr.fetch_online_packages()
|
pkgmgr.fetch_online_packages()
|
||||||
return self.render_template('setup-apps.html', request, online_packages=pkgmgr.online_packages)
|
all_apps = sorted(set([p for p in pkgmgr.online_packages if 'title' in p] + self.vmmgr.conf['apps'].keys()))
|
||||||
|
return self.render_template('setup-apps.html', request, all_apps=all_apps, online_packages=pkgmgr.online_packages)
|
||||||
|
|
||||||
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
|
||||||
|
@ -33,20 +33,22 @@
|
|||||||
|
|
||||||
<div class="setup-box">
|
<div class="setup-box">
|
||||||
<h2>Správce aplikací</h2>
|
<h2>Správce aplikací</h2>
|
||||||
<p>Vyberte které aplikace se mají zobrazovat na hlavní straně portálu a které mají být automaticky spuštěny při startu virtuálního stroje.</p>
|
<p>Vyberte které aplikace mají být nainstalovány, které se mají zobrazovat na hlavní straně portálu a které mají být automaticky spuštěny při startu virtuálního stroje.</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Aplikace</td>
|
<td>Aplikace</td>
|
||||||
|
<td>Nainstalována</td>
|
||||||
<td>Zobrazena</td>
|
<td>Zobrazena</td>
|
||||||
<td>Autostart</td>
|
<td>Autostart</td>
|
||||||
<td>Stav</td>
|
<td>Stav</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for app in conf['apps']|sort %}
|
{% for app in all_apps %}
|
||||||
<tr data-app="{{ app }}">
|
<tr data-app="{{ app }}">
|
||||||
<td>{{ conf['apps'][app]['title'] }}</td>
|
<td>{{ conf['apps'][app]['title'] if app in conf['apps'] else online_packages[app]['title'] }}</td>
|
||||||
|
<td class="center"><input type="checkbox" class="app-installed"{% if app in conf['apps'] %} checked{% endif %}></td>
|
||||||
<td class="center"><input type="checkbox" class="app-visible"{% if conf['apps'][app]['visible'] %} checked{% endif %}></td>
|
<td class="center"><input type="checkbox" class="app-visible"{% if conf['apps'][app]['visible'] %} checked{% endif %}></td>
|
||||||
<td class="center"><input type="checkbox" class="app-autostart"{% if is_service_autostarted(app) %} checked{% endif %}></td>
|
<td class="center"><input type="checkbox" class="app-autostart"{% if is_service_autostarted(app) %} checked{% endif %}></td>
|
||||||
<td>{% if is_service_started(app) %}<span class="info">Spuštěna</span> (<a href="#" class="app-stop">zastavit</a>){% else %}<span class="error">Zastavena</span> (<a href="#" class="app-start">spustit</a>){% endif %}</td>
|
<td>{% if is_service_started(app) %}<span class="info">Spuštěna</span> (<a href="#" class="app-stop">zastavit</a>){% else %}<span class="error">Zastavena</span> (<a href="#" class="app-start">spustit</a>){% endif %}</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user