Rework portal and add portal-app-manager.py

This commit is contained in:
Disassembler 2017-09-14 21:39:01 +02:00
parent f298a7c687
commit 9a1571ed86
24 changed files with 96 additions and 43 deletions

30
basic/portal-app-manager.py Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env python
import argparse
import json
def main(args):
jsonfile = '/srv/portal/js/apps.json'
data = {}
with open(jsonfile, 'r') as f:
data = json.load(f)
if not args.app in data:
data[args.app] = {}
if args.url:
data[args.app]['url'] = args.url
if args.login:
data[args.app]['login'] = args.login
if args.password:
data[args.app]['password'] = args.password
with open(jsonfile, 'w') as f:
json.dump(data, f)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Spotter Cluster portal application manager')
parser.add_argument('app', help='Application ID.')
parser.add_argument('url', default=None, help='URL to the application. Use "{host}" as a host placeholder.')
parser.add_argument('login', default=None, help='Administrative login.')
parser.add_argument('password', default=None, help='Administrative password.')
main(parser.parse_args())

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1,13 +1,15 @@
<!DOCTYPE html>
<html lang="cs">
<head>
<title>Cluster NGO</title>
<link rel="stylesheet" href="web.css" type="text/css" media="screen">
<link rel="icon" href="cluster_spotter.png" type="image/png">
<meta charset="utf-8">
<meta name="author" content="TS">
<meta name="copyright" content="page is under CC BY-NC-ND 3.0 CZ">
<meta name="generator" content="Spotter.ngo">
<title>Cluster NGO</title>
<link rel="icon" href="img/cluster_spotter.png" type="image/png">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<script src="js/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="js/script.js" type="text/javascript"></script>
</head>
<body>
<header>
@ -16,143 +18,142 @@
</header>
<div class="c2" id="sahana-eden">
<h2><a href="#"><img src="EDEN.png" alt="Sahana EDEN" title="Sahana EDEN">Sahana EDEN</a></h2>
<h2><a href="#"><img src="img/EDEN.png" alt="Sahana EDEN" title="Sahana EDEN">Sahana EDEN</a></h2>
<p><strong>Registr kontaktů</strong> asociací, organizací, jednotek zaměstnanců, dobrovolníků, <strong>Registr prostředků</strong>, materiálních zdrojů určených pro činnost v krizových situacích, <strong>logistika</strong> krizového zboží ve skladištích, úkrytech, <strong>organizace lidských zdrojů</strong>, diobrovolníků, <strong>mapová vizualizace</strong> pro lokalizaci a popis krizové události a <strong>mnoho dalších funkcí</strong>.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<!--<div class="c" id="sahana-eden-demo">
<h2><a href="#"><img src="EDEN.png" alt="Sahana EDEN DEMO" title="Sahana EDEN DEMO">Sahana EDEN DEMO</a></h2>
<div class="c" id="sahana-eden-demo">
<h2><a href="#"><img src="img/EDEN.png" alt="Sahana EDEN DEMO" title="Sahana EDEN DEMO">Sahana EDEN DEMO</a></h2>
<p>Přístup určený k bezpečnému vyzkoušení aplikace. Zde můžete přidávat i mazat testovací data.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Demo</span></li>
<li><strong>Heslo:</strong> <span class="heslo">Demo2018</span></li>
<li><strong>Heslo:</strong> <span class="password">Demo2018</span></li>
</ul>
</div>-->
</div>
<!--<div class="c" id="sambro-mobile">
<h2><a href="#"><img src="EDEN.png" alt="SAMBRO Mobile" title="SAMBRO Mobile">SAMBRO Mobile</a></h2>
<div class="c" id="sambro-mobile">
<h2><a href="#"><img src="img/EDEN.png" alt="SAMBRO Mobile" title="SAMBRO Mobile">SAMBRO Mobile</a></h2>
<p>Mobilní klient k aplikaci Sahana EDEN. Po stažení se zaregistrujte a pro přístup k serveru zadejte IP vaší instalace Sahana EDEN.<br>
<a href="https://itunes.apple.com/us/app/sambro-mobile/id1127251669"><img src="ios.png" class="ico" alt="IOS">IOS 6.0 a vyšší</a><br>
<a href="https://play.google.com/store/apps/details?id=io.sahana.sambro.mobile&amp;hl=cs"><img src="android.png" class="ico" alt="Android">Android 4.0 a vyšší.</a>
<a href="https://itunes.apple.com/us/app/sambro-mobile/id1127251669"><img src="img/ios.png" class="ico" alt="IOS">IOS 6.0 a vyšší</a><br>
<a href="https://play.google.com/store/apps/details?id=io.sahana.sambro.mobile&amp;hl=cs"><img src="img/android.png" class="ico" alt="Android">Android 4.0 a vyšší</a>
</p>
</div>-->
</div>
<div class="c" id="crisis-cleanup">
<h2><a href="#"><img src="Crisis_Cleanup.png" alt="Crisis Cleanup" title="Crisis Cleanup">Crisis Cleanup</a></h2>
<h2><a href="#"><img src="img/Crisis_Cleanup.png" alt="Crisis Cleanup" title="Crisis Cleanup">Crisis Cleanup</a></h2>
<p><strong>Mapování krizové pomoci</strong> při odstraňování následků katastrof a koordinaci práce. Jde o majetek, ne o lidi.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="ckan">
<h2><a href="#"><img src="CKAN.png" alt="CKAN" title="CKAN">CKAN</a></h2>
<h2><a href="#"><img src="img/CKAN.png" alt="CKAN" title="CKAN">CKAN</a></h2>
<p><strong>Repository</strong> management a datová analýza pro vytváření otevřených dat.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="open-data-kit">
<h2><a href="#"><img src="ODK.png" alt="Open Data Kit" title="Open Data Kit">Open Data Kit</a></h2>
<h2><a href="#"><img src="img/ODK.png" alt="Open Data Kit" title="Open Data Kit">Open Data Kit</a></h2>
<p><strong>Sběr dat s pomocí smartphone</strong>.<br>
<a href="http://geoodk.com/xlsform_converter.html">XLSForm</a> - online konverter XLS.<br>
<a href="httbap://geoodk.com">GeoODK Collect</a> - náhrada papírových dotazníků smartphonem.
</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="frontlinesms">
<h2><a href="#"><img src="FrontlineSMS.png" alt="FrontlineSMS" title="FrontlineSMS">FrontlineSMS</a></h2>
<h2><a href="#"><img src="img/FrontlineSMS.png" alt="FrontlineSMS" title="FrontlineSMS">FrontlineSMS</a></h2>
<p><strong>SMS messaging</strong> přes veřejné datové brány</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="seeddms">
<h2><a href="#"><img src="SeedDMS.png" alt="SeedDMS" title="SeedDMS">SeedDMS</a></h2>
<h2><a href="#"><img src="img/SeedDMS.png" alt="SeedDMS" title="SeedDMS">SeedDMS</a></h2>
<p><strong>Dokument management</strong> na dokumentaci a projektovou dokumentaci</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="pandora">
<h2><a href="#"><img src="Pandora.png" alt="Pan.do/ra" title="Pan.do/ra">Pan.do/ra</a></h2>
<h2><a href="#"><img src="img/Pandora.png" alt="Pan.do/ra" title="Pan.do/ra">Pan.do/ra</a></h2>
<p><strong>Media management</strong> na foto a video z krizové události. Tvorba metadat, komentářů, lokalizace v čase a na mapě.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="pandora-client">
<h2><a href="#"><img src="Pandora.png" alt="Pan.do/ra" title="Pan.do/ra">Pan.do/ra Client</a></h2>
<h2><a href="#"><img src="img/Pandora.png" alt="Pan.do/ra" title="Pan.do/ra">Pan.do/ra Client</a></h2>
<p><strong>Dávkový upload videa</strong> do aplikace Pan.do/ra. Podpora rozlišení HD. Videa nahrávejte pouze pod licencí Creative Commons nebo Public Domain.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="ushahidi">
<h2><a href="#"><img src="Ushahidi.png" alt="Ushahidi" title="Ushahidi">Ushahidi</a></h2>
<h2><a href="#"><img src="img/Ushahidi.png" alt="Ushahidi" title="Ushahidi">Ushahidi</a></h2>
<p>Reakce na krizovou událost. Shromažďujte zprávy od obětí a pracovníků v terénu prostřednictvím SMS, e-mailu, webu, Twitteru.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<div class="c" id="ushahidi-mobile">
<h2><a href="https://itunes.apple.com/us/app/ushahidi-mobile/id1205994516?mt=8"><img src="Ushahidi_mobile.png" alt="Ushahidi" title="Ushahidi">Ushahidi Mobile</a></h2>
<h2><a href="https://itunes.apple.com/us/app/ushahidi-mobile/id1205994516?mt=8"><img src="img/Ushahidi_mobile.png" alt="Ushahidi" title="Ushahidi">Ushahidi Mobile</a></h2>
<p>Mobilní aplikace Ushahidi pro<br>
<a href="https://itunes.apple.com/us/app/ushahidi-mobile/id1205994516?mt=8"><img src="ios.png" class="ico" alt="IOS">IOS 9.0 a vyšší</a><br>
<a href="https://play.google.com/store/apps/details?id=com.ushahidi.mobile&amp;hl=cs"><img src="android.png" class="ico" alt="Android">Android 4.4 a vyšší</a><br>
<a href="https://play.google.com/store/apps/details?id=com.ushahidi.mobile&amp;hl=cs"><img src="android.png" class="ico" alt="Android">Android 2.2 a vyšší</a>
<a href="https://itunes.apple.com/us/app/ushahidi-mobile/id1205994516?mt=8"><img src="img/ios.png" class="ico" alt="IOS">IOS 9.0 a vyšší</a><br>
<a href="https://play.google.com/store/apps/details?id=com.ushahidi.mobile&amp;hl=cs"><img src="img/android.png" class="ico" alt="Android">Android 4.4 a vyšší</a>
</p>
</div>
<div class="c" id="sms-sync-gateway">
<h2><a href="https://play.google.com/store/apps/details?id=org.addhen.smssync&amp;hl=cs"><img src="SMS_Sync.png" alt="Ushahidi" title="Ushahidi">SMS Sync Gateway</a></h2>
<h2><a href="https://play.google.com/store/apps/details?id=org.addhen.smssync&amp;hl=cs"><img src="img/SMS_Sync.png" alt="Ushahidi" title="Ushahidi">SMS Sync Gateway</a></h2>
<p>Mobilní aplikace pro<br>
<a href="https://play.google.com/store/apps/details?id=org.addhen.smssync&amp;hl=cs"><img src="android.png" class="ico" alt="Android">Android 2.3 a vyšší</a>
<a href="https://play.google.com/store/apps/details?id=org.addhen.smssync&amp;hl=cs"><img src="img/android.png" class="ico" alt="Android">Android 2.3 a vyšší</a>
</p>
</div>
<div class="c" id="diaspora">
<h2><a href="#"><img src="Diaspora.png" alt="diaspora*" title="diaspora*">diaspora*</a></h2>
<h2><a href="#"><img src="img/Diaspora.png" alt="diaspora*" title="diaspora*">diaspora*</a></h2>
<p>Autonomní sociání síť s možností propojení do cizích sociálních sítí.</p>
<ul>
<li><strong>Login:</strong> <span class="login">Admin</span></li>
<li><strong>Heslo:</strong> <span class="heslo">admin2018</span></li>
<li><strong>Heslo:</strong> <span class="password">admin2018</span></li>
</ul>
</div>
<!--<div class="c" id="openid">
<h2><a href="http://openid.net"><img src="OpenID.png" alt="OpenID" title="OpenID">OpenID</a></h2>
<div class="c" id="openid">
<h2><a href="http://openid.net"><img src="img/OpenID.png" alt="OpenID" title="OpenID">OpenID</a></h2>
<p>Pro ověření identity budete potřebovat účet OpenID. Zaregistrujte se. Registraci využijete v software Sahana EDEN.</p>
</div>-->
</div>
<div class="c" id="posm">
<h2><a href="#"><img src="POSM.png" alt="POSM" title="POSM">POSM</a></h2>
<h2><a href="#"><img src="img/POSM.png" alt="POSM" title="POSM">POSM</a></h2>
<p><strong>Portable Open Street Map</strong> - softwarový balík na offline používání OpenStreet Map v samostatné virtuální image.</p>
</div>
<div class="c" id="cluster-spotter">
<h2><a href="http://spotter.ngo"><img src="cluster_spotter.png" alt="Cluster Spotter" title="Cluster Spotter">Cluster Spotter</a></h2>
<h2><a href="http://spotter.ngo"><img src="img/cluster_spotter.png" alt="Cluster Spotter" title="Cluster Spotter">Cluster Spotter</a></h2>
<p>Info o Misi a Vizi projektu, včetně kontaktu. Zachovejte data bezpečná a neposkytujte je nepovolaným osobám.<br>
<small>CC 4.0 CZ by <a href="http://trendspotter.cz">TS</a>. Content is based on PD, CC, GNU/GPL. Brand names, trademarks belong to their respective holders.</small>
</p>

View File

@ -0,0 +1 @@
{"cluster-spotter": {}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,17 @@
$(function() {
$.getJSON('js/apps.json', function(data) {
$('div').each(function() {
var div = $(this);
var id = div.attr('id');
if (data.hasOwnProperty(id)) {
if (data[id].hasOwnProperty('url'))
div.find('h2 a').attr('href', data[id].url.replace('{host}', window.location.hostname));
if (data[id].hasOwnProperty('login'))
div.find('.login').text(data[id].login);
if (data[id].hasOwnProperty('password'))
div.find('.password').text(data[id].password);
} else
div.hide();
});
});
});