Commit 2bd43c4c by tarokkk

Merge branch 'master' of giccero.cloud.ik.bme.hu:cloud

parents 6d78f082 d30fc623
...@@ -197,6 +197,7 @@ store_settings = { ...@@ -197,6 +197,7 @@ store_settings = {
"store_client_key": "/opt/webadmin/cloud/client.key", "store_client_key": "/opt/webadmin/cloud/client.key",
"store_client_cert": "/opt/webadmin/cloud/client.crt", "store_client_cert": "/opt/webadmin/cloud/client.crt",
"store_url": "http://localhost:9000", "store_url": "http://localhost:9000",
"store_public": "store.ik.bme.hu",
} }
......
...@@ -93,11 +93,16 @@ urlpatterns = patterns('', ...@@ -93,11 +93,16 @@ urlpatterns = patterns('',
url(r'^ajax/group/(?P<gid>\d+)/add/$', url(r'^ajax/group/(?P<gid>\d+)/add/$',
'school.views.group_ajax_add_new_member', 'school.views.group_ajax_add_new_member',
name='group_ajax_add_new_member'), name='group_ajax_add_new_member'),
url(r'^ajax/group/(?P<gid>\d+)/addOwner/$',
'school.views.group_ajax_add_new_owner',
name='group_ajax_add_new_owner'),
url(r'^ajax/group/(?P<gid>\d+)/remove/$', url(r'^ajax/group/(?P<gid>\d+)/remove/$',
'school.views.group_ajax_remove_member', 'school.views.group_ajax_remove_member',
name='group_ajax_remove_member'), name='group_ajax_remove_member'),
url(r'^ajax/group/delete/$', 'school.views.group_ajax_delete', url(r'^ajax/group/delete/$', 'school.views.group_ajax_delete',
name='group_ajax_delete'), name='group_ajax_delete'),
url(r'^ajax/group/autocomplete/$', 'school.views.group_ajax_owner_autocomplete',
name='group_ajax_autocomplete'),
url(r'^key/add/$', 'one.views.key_add', name='key_add'), url(r'^key/add/$', 'one.views.key_add', name='key_add'),
url(r'^ajax/key/delete/$', 'one.views.key_ajax_delete', url(r'^ajax/key/delete/$', 'one.views.key_ajax_delete',
name='key_ajax_delete'), name='key_ajax_delete'),
......
...@@ -300,8 +300,8 @@ class firewall: ...@@ -300,8 +300,8 @@ class firewall:
'\n'.join(self.RULES_NAT) + '\n') '\n'.join(self.RULES_NAT) + '\n')
def ipset(): def ipset():
week = datetime.now()-timedelta(days=7) week = datetime.now()-timedelta(days=2)
return models.Blacklist.objects.filter(Q(type='tempban', modified_at__gte=week) | Q(type='permban')).values_list('ipv4', flat=True) return models.Blacklist.objects.filter(Q(type='tempban', modified_at__gte=week) | Q(type='permban')).values('ipv4', 'reason')
def ipv6_to_octal(ipv6): def ipv6_to_octal(ipv6):
...@@ -450,8 +450,8 @@ def dhcp(): ...@@ -450,8 +450,8 @@ def dhcp():
'router': i_vlan.ipv4, 'router': i_vlan.ipv4,
'ntp': i_vlan.ipv4, 'ntp': i_vlan.ipv4,
'dnsserver': settings['rdns_ip'], 'dnsserver': settings['rdns_ip'],
'extra': "range %s" % (i_vlan.dhcp_pool 'extra': ("range %s" % i_vlan.dhcp_pool
if m else "deny unknown clients"), if m else "deny unknown-clients"),
'interface': i_vlan.interface, 'interface': i_vlan.interface,
'name': i_vlan.name, 'name': i_vlan.name,
'tftp': i_vlan.ipv4 'tftp': i_vlan.ipv4
......
...@@ -45,7 +45,7 @@ def firewall_api(request): ...@@ -45,7 +45,7 @@ def firewall_api(request):
obj.reason=data["reason"] obj.reason=data["reason"]
obj.snort_message=data["snort_message"] obj.snort_message=data["snort_message"]
obj.save() obj.save()
return HttpResponse(_("OK")); return HttpResponse(unicode(_("OK")));
if not (data["vlan"] == "vm-net" or data["vlan"] == "war"): if not (data["vlan"] == "vm-net" or data["vlan"] == "war"):
raise Exception(_("Only vm-net and war can be used.")) raise Exception(_("Only vm-net and war can be used."))
...@@ -88,4 +88,4 @@ def firewall_api(request): ...@@ -88,4 +88,4 @@ def firewall_api(request):
except: except:
return HttpResponse(_("Something went wrong!\n")); return HttpResponse(_("Something went wrong!\n"));
return HttpResponse(_("OK")); return HttpResponse(unicode(_("OK")));
from celery import Celery, task from celery import Celery, task
import subprocess import subprocess
import time, re import time, re
import socket
BROKER_URL = 'amqp://nyuszi:teszt@localhost:5672/django'
IRC_CHANNEL = '/home/cloud/irc/irc.atw.hu/#ik/in'
try:
from local_settings import *
except:
pass
CELERY_CREATE_MISSING_QUEUES=True CELERY_CREATE_MISSING_QUEUES=True
celery = Celery('tasks', broker='amqp://nyuszi:teszt@localhost:5672/django') celery = Celery('tasks', broker=BROKER_URL)
@task(name="firewall.tasks.reload_firewall_task") @task(name="firewall.tasks.reload_firewall_task")
def t(data4, data6): def t(data4, data6):
...@@ -28,7 +37,7 @@ def t(data): ...@@ -28,7 +37,7 @@ def t(data):
print "blacklist" print "blacklist"
r = re.compile(r'^add blacklist ([0-9.]+)$') r = re.compile(r'^add blacklist ([0-9.]+)$')
data_new = data data_new = [ x['ipv4'] for x in data]
data_old = [] data_old = []
p = subprocess.Popen(['/usr/bin/sudo', '/usr/sbin/ipset', 'save', 'blacklist'], shell=False, stdout=subprocess.PIPE) p = subprocess.Popen(['/usr/bin/sudo', '/usr/sbin/ipset', 'save', 'blacklist'], shell=False, stdout=subprocess.PIPE)
...@@ -37,8 +46,8 @@ def t(data): ...@@ -37,8 +46,8 @@ def t(data):
if x: if x:
data_old.append(x.group(1)) data_old.append(x.group(1))
l_add = list(set(data).difference(set(data_old))) l_add = list(set(data_new).difference(set(data_old)))
l_del = list(set(data_old).difference(set(data))) l_del = list(set(data_old).difference(set(data_new)))
ipset = [] ipset = []
ipset.append('create blacklist hash:ip family inet hashsize 4096 maxelem 65536') ipset.append('create blacklist hash:ip family inet hashsize 4096 maxelem 65536')
...@@ -50,4 +59,12 @@ def t(data): ...@@ -50,4 +59,12 @@ def t(data):
p = subprocess.Popen(['/usr/bin/sudo', '/usr/sbin/ipset', 'restore', '-exist'], shell=False, stdin=subprocess.PIPE) p = subprocess.Popen(['/usr/bin/sudo', '/usr/sbin/ipset', 'restore', '-exist'], shell=False, stdin=subprocess.PIPE)
p.communicate("\n".join(ipset) + "\n") p.communicate("\n".join(ipset) + "\n")
try:
with open(IRC_CHANNEL, 'w') as f:
for x in data:
if x['ipv4'] in l_add:
f.write('%(ip)s(%(hostname)s) kibachva %(reason)s miatt\n' % { 'ip': x['ipv4'], 'reason': x['reason'], 'hostname': socket.gethostbyaddr(x['ipv4'])[0]})
except:
print "nem sikerult mircre irni"
raise
...@@ -7,10 +7,10 @@ msgid "" ...@@ -7,10 +7,10 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-19 18:42+0100\n" "POT-Creation-Date: 2013-02-21 18:06+0100\n"
"PO-Revision-Date: 2013-02-19 18:46+0100\n" "PO-Revision-Date: 2013-02-21 18:07+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Hungarian <kde-l10n-hu@kde.org>\n" "Language-Team: Hungarian <cloud@ik.bme.hu>\n"
"Language: hu\n" "Language: hu\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
...@@ -46,7 +46,7 @@ msgstr "VM folytatása" ...@@ -46,7 +46,7 @@ msgstr "VM folytatása"
msgid "user" msgid "user"
msgstr "felhasználó" msgstr "felhasználó"
#: models.py:39 templates/home.html:17 #: models.py:39
msgid "Samba password" msgid "Samba password"
msgstr "Samba jelszó" msgstr "Samba jelszó"
...@@ -331,63 +331,63 @@ msgstr "példány" ...@@ -331,63 +331,63 @@ msgstr "példány"
msgid "instances" msgid "instances"
msgstr "példányok" msgstr "példányok"
#: views.py:59 #: views.py:68
msgid "Invalid template ID." msgid "Invalid template ID."
msgstr "Nincs ilyen sablon." msgstr "Nincs ilyen sablon."
#: views.py:62 #: views.py:71
msgid "There are running instances of this template." msgid "There are running instances of this template."
msgstr "A sablonnak még vannak futó példányai." msgstr "A sablonnak még vannak futó példányai."
#: views.py:64 #: views.py:73
msgid "Template is still shared." msgid "Template is still shared."
msgstr "A sablon még meg van osztva." msgstr "A sablon még meg van osztva."
#: views.py:66 #: views.py:75
msgid "You don't have permission to delete this template." msgid "You don't have permission to delete this template."
msgstr "Nincs joga törölni a sablont." msgstr "Nincs joga törölni a sablont."
#: views.py:69 #: views.py:78
msgid "Template successfully deleted." msgid "Template successfully deleted."
msgstr "A sablon törlése sikeres." msgstr "A sablon törlése sikeres."
#: views.py:71 #: views.py:80
msgid "Unexpected error happened." msgid "Unexpected error happened."
msgstr "Váratlan hiba történt." msgstr "Váratlan hiba történt."
#: views.py:85 #: views.py:94
msgid "Could not get Virtual Machine credentials." msgid "Could not get Virtual Machine credentials."
msgstr "Nem találhatóak a virutális gép adatai." msgstr "Nem találhatóak a virutális gép adatai."
#: views.py:86 views.py:420 #: views.py:95 views.py:434
msgid "Failed to power off virtual machine." msgid "Failed to power off virtual machine."
msgstr "A virtuális gép kikapcsolása sikertelen." msgstr "A virtuális gép kikapcsolása sikertelen."
#: views.py:114 #: views.py:123
msgid "You do not have any free share quota." msgid "You do not have any free share quota."
msgstr "Nincs szabad kvótája." msgstr "Nincs szabad kvótája."
#: views.py:148 #: views.py:157
msgid "You do not have enough free share quota." msgid "You do not have enough free share quota."
msgstr "Nincs elég szabad kvótája." msgstr "Nincs elég szabad kvótája."
#: views.py:153 #: views.py:162
#, python-format #, python-format
msgid "Successfully shared %s." msgid "Successfully shared %s."
msgstr "„%s” megosztása sikeres." msgstr "„%s” megosztása sikeres."
#: views.py:167 #: views.py:176
msgid "Template is being saved..." msgid "Template is being saved..."
msgstr "A sablon mentése folyamatban van…" msgstr "A sablon mentése folyamatban van…"
#: views.py:198 #: views.py:207
msgid "" msgid ""
"You do not have any free quota. You can not launch this until you stop an " "You do not have any free quota. You can not launch this until you stop an "
"other instance." "other instance."
msgstr "" msgstr ""
"Nincs szabad kvótája. Addig nem tud gépet indítani, amíg le nem állít egyet." "Nincs szabad kvótája. Addig nem tud gépet indítani, amíg le nem állít egyet."
#: views.py:202 #: views.py:211
msgid "" msgid ""
"The share does not have any free quota. You can not launch this until " "The share does not have any free quota. You can not launch this until "
"someone stops an instance." "someone stops an instance."
...@@ -395,7 +395,7 @@ msgstr "" ...@@ -395,7 +395,7 @@ msgstr ""
"Ennek a megosztásnak elfogyott a kvótája. Nem tudja addig elindítani, amíg " "Ennek a megosztásnak elfogyott a kvótája. Nem tudja addig elindítani, amíg "
"valaki le nem állít egy példányt." "valaki le nem állít egy példányt."
#: views.py:205 #: views.py:214
msgid "" msgid ""
"You do not have any free quota for this share. You can not launch this until " "You do not have any free quota for this share. You can not launch this until "
"you stop an other instance." "you stop an other instance."
...@@ -403,15 +403,15 @@ msgstr "" ...@@ -403,15 +403,15 @@ msgstr ""
"Nincs szabad kvótája ehhez a megosztáshoz. Nem tudja addig elindítani, amíg " "Nincs szabad kvótája ehhez a megosztáshoz. Nem tudja addig elindítani, amíg "
"nem állít le egy másik példányt." "nem állít le egy másik példányt."
#: views.py:208 #: views.py:217
msgid "You are not a member of the share group." msgid "You are not a member of the share group."
msgstr "Nem tagja a megosztás csoportjának." msgstr "Nem tagja a megosztás csoportjának."
#: views.py:229 #: views.py:238
msgid "Can not create template." msgid "Can not create template."
msgstr "Sablon létrehozása sikertelen." msgstr "Sablon létrehozása sikertelen."
#: views.py:234 #: views.py:243
msgid "" msgid ""
"You have no permission to try this instance without a share. Launch a new " "You have no permission to try this instance without a share. Launch a new "
"instance through a share." "instance through a share."
...@@ -419,100 +419,104 @@ msgstr "" ...@@ -419,100 +419,104 @@ msgstr ""
"Nincs joga a sablon kipróbálására megosztás nélkül. Próbálja egy megosztáson " "Nincs joga a sablon kipróbálására megosztás nélkül. Próbálja egy megosztáson "
"keresztül." "keresztül."
#: views.py:247 #: views.py:256
msgid "Failed to create virtual machine." msgid "Failed to create virtual machine."
msgstr "A virtuális gép indítása sikertelen." msgstr "A virtuális gép indítása sikertelen."
#: views.py:316 #: views.py:332
msgid "Port number is in a restricted domain (22000 to 24000)." msgid "Port number is in a restricted domain (22000 to 24000)."
msgstr "A megadott port foglalt tartományba esik (22000-től 24000-ig)." msgstr "A megadott port foglalt tartományba esik (22000-től 24000-ig)."
#: views.py:320 #: views.py:335
#, python-format #, python-format
msgid "Port %d successfully added." msgid "Port %d successfully added."
msgstr "%d számú port hozzáadása sikeres." msgstr "%d számú port hozzáadása sikeres."
#: views.py:322 #: views.py:337
msgid "Adding port failed." msgid "Adding port failed."
msgstr "Port hozzáadása sikertelen." msgstr "Port hozzáadása sikertelen."
#: views.py:339 #: views.py:353
#, python-format #, python-format
msgid "Port %d successfully removed." msgid "Port %d successfully removed."
msgstr "%d számú port eltávolítása sikeres." msgstr "%d számú port eltávolítása sikeres."
#: views.py:341 #: views.py:355
msgid "Removing port failed." msgid "Removing port failed."
msgstr "Port eltávolítása sikertelen." msgstr "Port eltávolítása sikertelen."
#: views.py:351 #: views.py:365
msgid "Virtual machine is successfully deleted." msgid "Virtual machine is successfully deleted."
msgstr "A virtuális gép törlése sikeres." msgstr "A virtuális gép törlése sikeres."
#: views.py:353 #: views.py:367
msgid "Failed to delete virtual machine." msgid "Failed to delete virtual machine."
msgstr "A virtuális gép törlése sikertelen." msgstr "A virtuális gép törlése sikertelen."
#: views.py:375 #: views.py:389
msgid "There are machines running of this share." msgid "There are machines running of this share."
msgstr "A sablonnak még vannak futó példányai." msgstr "A sablonnak még vannak futó példányai."
#: views.py:378 #: views.py:392
msgid "Share is successfully removed." msgid "Share is successfully removed."
msgstr "Megosztás eltávolítása sikeres." msgstr "Megosztás eltávolítása sikeres."
#: views.py:380 #: views.py:394
msgid "Failed to remove share." msgid "Failed to remove share."
msgstr "Megosztás törlése sikertelen." msgstr "Megosztás törlése sikertelen."
#: views.py:388 #: views.py:402
msgid "Virtual machine is successfully stopped." msgid "Virtual machine is successfully stopped."
msgstr "A virtuális gép sikeresen leállt." msgstr "A virtuális gép sikeresen leállt."
#: views.py:390 #: views.py:404
msgid "Failed to stop virtual machine." msgid "Failed to stop virtual machine."
msgstr "A virtuális gép leállítása sikertelen." msgstr "A virtuális gép leállítása sikertelen."
#: views.py:398 #: views.py:412
msgid "Virtual machine is successfully resumed." msgid "Virtual machine is successfully resumed."
msgstr "A virtuális gép sikeresen folytatva." msgstr "A virtuális gép sikeresen folytatva."
#: views.py:400 #: views.py:414
msgid "Failed to resume virtual machine." msgid "Failed to resume virtual machine."
msgstr "A virtuális gép visszatöltése sikertelen." msgstr "A virtuális gép visszatöltése sikertelen."
#: views.py:408 #: views.py:422
msgid "Virtual machine is successfully renewed." msgid "Virtual machine is successfully renewed."
msgstr "A virtuális gép sikeresen meghosszabbítva." msgstr "A virtuális gép sikeresen meghosszabbítva."
#: views.py:410 #: views.py:424
msgid "Failed to renew virtual machine." msgid "Failed to renew virtual machine."
msgstr "A virtuális gép meghosszabbítása sikertelen." msgstr "A virtuális gép meghosszabbítása sikertelen."
#: views.py:418 #: views.py:432
msgid "Virtual machine is successfully powered off." msgid "Virtual machine is successfully powered off."
msgstr "A virtuális gép kikapcsolása sikeres." msgstr "A virtuális gép kikapcsolása sikeres."
#: views.py:428 #: views.py:442
msgid "Virtual machine is successfully restarted." msgid "Virtual machine is successfully restarted."
msgstr "A virtuális gép újraindítása sikeres." msgstr "A virtuális gép újraindítása sikeres."
#: views.py:430 #: views.py:444
msgid "Failed to restart virtual machine." msgid "Failed to restart virtual machine."
msgstr "A virtuális gép újraindítása sikertelen." msgstr "A virtuális gép újraindítása sikertelen."
#: views.py:459
msgid "Failed to add public key"
msgstr "Nyilvános kulcs hozzáadása sikertelen."
#: views.py:469
msgid "Failed to delete public key"
msgstr "Nyilvános kulcs törlése sikertelen."
#: views.py:480
msgid "Failed to reset keys"
msgstr "Kulcsok újragenerálása"
#: templates/404.html:7 templates/404.html.py:10 #: templates/404.html:7 templates/404.html.py:10
msgid ":(" msgid ":("
msgstr ":(" msgstr ":("
#: templates/home.html:8
msgid "User details"
msgstr "Felhasználói adatok"
#: templates/home.html:12
msgid "Public key"
msgstr "Nyilvános kulcs"
#: templates/new-share.html:7 #: templates/new-share.html:7
#, python-format #, python-format
msgid "Sharing template: %(t)s" msgid "Sharing template: %(t)s"
...@@ -539,16 +543,16 @@ msgid "Name of share" ...@@ -539,16 +543,16 @@ msgid "Name of share"
msgstr "Megosztás neve" msgstr "Megosztás neve"
#: templates/new-share.html:40 templates/box/file/entry.html:31 #: templates/new-share.html:40 templates/box/file/entry.html:31
#: templates/box/vm/box.html:72 templates/box/vm/entry.html:28 #: templates/box/vm/box.html:87 templates/box/vm/entry.html:28
msgid "Type" msgid "Type"
msgstr "Típus" msgstr "Típus"
#: templates/new-share.html:58 templates/box/vm/box.html:76 #: templates/new-share.html:58 templates/box/vm/box.html:91
#, python-format #, python-format
msgid "Suspend after %(time)s." msgid "Suspend after %(time)s."
msgstr "Felfüggesztés %(time)s után." msgstr "Felfüggesztés %(time)s után."
#: templates/new-share.html:61 templates/box/vm/box.html:80 #: templates/new-share.html:61 templates/box/vm/box.html:95
#, python-format #, python-format
msgid "Delete after %(time)s." msgid "Delete after %(time)s."
msgstr "Törlés %(time)s után." msgstr "Törlés %(time)s után."
...@@ -562,8 +566,8 @@ msgid "Maximal count of instaces/user" ...@@ -562,8 +566,8 @@ msgid "Maximal count of instaces/user"
msgstr "Példányok max. száma/felhasználó" msgstr "Példányok max. száma/felhasználó"
#: templates/new-share.html:79 templates/new-template-flow.html:49 #: templates/new-share.html:79 templates/new-template-flow.html:49
#: templates/box/template/box.html:92 templates/box/template/entry.html:32 #: templates/box/template/box.html:107 templates/box/template/entry.html:32
#: templates/box/vm/box.html:84 #: templates/box/vm/box.html:99
msgid "Description" msgid "Description"
msgstr "Leírás" msgstr "Leírás"
...@@ -572,8 +576,8 @@ msgstr "Leírás" ...@@ -572,8 +576,8 @@ msgstr "Leírás"
msgid "Cancel" msgid "Cancel"
msgstr "Mégsem" msgstr "Mégsem"
#: templates/new-share.html:86 templates/box/template/box.html:50 #: templates/new-share.html:86 templates/box/template/box.html:65
#: templates/box/template/box.html.py:51 #: templates/box/template/box.html.py:66
#: templates/box/template/summary.html:46 #: templates/box/template/summary.html:46
#: templates/box/template/summary.html:47 templates/box/vm/entry.html:33 #: templates/box/template/summary.html:47 templates/box/vm/entry.html:33
msgid "Share" msgid "Share"
...@@ -597,11 +601,11 @@ msgstr "Válasszon egy alaprendszert, amelyet testre kíván szabni." ...@@ -597,11 +601,11 @@ msgstr "Válasszon egy alaprendszert, amelyet testre kíván szabni."
msgid "There are no available templates." msgid "There are no available templates."
msgstr "Nincs elérhető sablon." msgstr "Nincs elérhető sablon."
#: templates/new-template-flow-1.html:31 templates/box/template/box.html:41 #: templates/new-template-flow-1.html:31 templates/box/template/box.html:56
msgid "locked" msgid "locked"
msgstr "zárolt" msgstr "zárolt"
#: templates/new-template-flow-1.html:32 templates/box/template/box.html:42 #: templates/new-template-flow-1.html:32 templates/box/template/box.html:57
msgid "This is a shared template." msgid "This is a shared template."
msgstr "Ez egy megosztott sablon." msgstr "Ez egy megosztott sablon."
...@@ -613,8 +617,8 @@ msgstr "Tovább &raquo;" ...@@ -613,8 +617,8 @@ msgstr "Tovább &raquo;"
msgid "Name" msgid "Name"
msgstr "Név" msgstr "Név"
#: templates/new-template-flow.html:24 templates/box/template/box.html:83 #: templates/new-template-flow.html:24 templates/box/template/box.html:98
#: templates/box/template/entry.html:23 templates/box/vm/box.html:63 #: templates/box/template/entry.html:23 templates/box/vm/box.html:78
#: templates/box/vm/entry.html:43 #: templates/box/vm/entry.html:43
msgid "Size" msgid "Size"
msgstr "Méret" msgstr "Méret"
...@@ -634,7 +638,7 @@ msgstr "Mesterpéldány indítása" ...@@ -634,7 +638,7 @@ msgstr "Mesterpéldány indítása"
msgid "This is a master image for your new template." msgid "This is a master image for your new template."
msgstr "Ez egy mestergép az új sablonhoz." msgstr "Ez egy mestergép az új sablonhoz."
#: templates/show.html:34 #: templates/show.html:34 templates/box/file/box.html:106
msgid "Save" msgid "Save"
msgstr "Mentés" msgstr "Mentés"
...@@ -686,47 +690,115 @@ msgstr "Váratlan hiba történt" ...@@ -686,47 +690,115 @@ msgstr "Váratlan hiba történt"
msgid "Login credentials" msgid "Login credentials"
msgstr "Belépési adatok" msgstr "Belépési adatok"
#: templates/show.html:91 #: templates/show.html:94 templates/vm-credentials.html:11
#: templates/box/file/box.html:12 templates/box/template/box.html:13
#: templates/box/vm/box.html:13
msgid "Help"
msgstr "Súgó"
#: templates/show.html:97
msgid ""
"This is a list about the network ports\n"
" forwarded to the public internet."
msgstr "Ez a nyilvános internet felé továbbított hálózati portok listája."
#: templates/show.html:99
msgid ""
"You can access the given private port of\n"
" the VM trough the public address of the network.\n"
" "
msgstr "A VM megadott belső portját elérheti a hálózat külső címén keresztül."
#: templates/show.html:102
msgid ""
"On the IPV6 network you can access the\n"
" listed private ports direcly using the VM's global IPV6\n"
" address (connections to other ports are dropped).\n"
" "
msgstr ""
"Az IPV6 hálózaton a megadott belső portokat közvetlenül érheti el a VM "
"globális IPV6 címén (a többi portra érkező kapcsolatokat eldobjuk)."
#: templates/show.html:108
msgid "Port administration" msgid "Port administration"
msgstr "Portok kezelése" msgstr "Portok kezelése"
#: templates/show.html:97 templates/vm-credentials.html:6 #: templates/show.html:114 templates/vm-credentials.html:6
msgid "Protocol" msgid "Protocol"
msgstr "Protokoll" msgstr "Protokoll"
#: templates/show.html:98 #: templates/show.html:115
msgid "Public port" msgid "Public port"
msgstr "Külső port" msgstr "Külső port"
#: templates/show.html:99 #: templates/show.html:116
msgid "Private port" msgid "Private port"
msgstr "Belső port" msgstr "Belső port"
#: templates/show.html:107 templates/box/template/box.html:67 #: templates/show.html:124 templates/box/template/box.html:82
#: templates/box/template/summary.html:20 templates/box/vm/summary.html:31 #: templates/box/template/summary.html:20 templates/box/vm/summary.html:39
#: templates/box/vm/summary.html.py:32 templates/box/vm/summary.html:44 #: templates/box/vm/summary.html.py:40 templates/box/vm/summary.html:49
#: templates/box/vm/summary.html.py:45 templates/box/vm/summary.html:48 #: templates/box/vm/summary.html.py:50 templates/box/vm/summary.html:56
#: templates/box/vm/summary.html.py:49 #: templates/box/vm/summary.html.py:57 templates/box/vm/summary.html:60
#: templates/box/vm/summary.html.py:61
msgid "Delete" msgid "Delete"
msgstr "Törlés" msgstr "Törlés"
#: templates/show.html:125 #: templates/show.html:142
msgid "Add" msgid "Add"
msgstr "Hozzáadás" msgstr "Hozzáadás"
#: templates/vm-credentials.html:10 #: templates/vm-credentials.html:15
msgid ""
"You can access Linux machines through\n"
" the SSH protocol (we recommend\n"
" <a href=\"http://www.chiark.greenend.org.uk/"
"~sgtatham/putty/\">\n"
" PuTTY</a> for Windows and OpenSSH for all other "
"systems).\n"
" "
msgstr ""
"A Linux gépeket az SSH protokollon érheti el. Windowshoz a <a href=\"http://"
"www.chiark.greenend.org.uk/~sgtatham/putty/\">PuTTY</a>-ot, minden más "
"rendszerhez az OpenSSH klienst ajánljuk."
#: templates/vm-credentials.html:21
msgid ""
"Graphical log in is also supported with\n"
" the <a href=\"http://www.nomachine.com/download.php"
"\">\n"
" NoMachine NX Client</a> application."
msgstr ""
"Grafikus bejelentkezés a <a href=\"http://www.nomachine.com/download.php\"> "
"NoMachine NX Client</a> alkalmazással lehetséges."
#: templates/vm-credentials.html:26
msgid ""
"You can access Windows machines through\n"
" the remote desktop protocol."
msgstr "A Windows gépeket a távoli asztal protokollon érheti el."
#: templates/vm-credentials.html:28
msgid ""
"We recommend the built-in remote desktop\n"
" client for Windows and Remmina for Linux."
msgstr ""
"Windowshoz a beépített távoli asztali kapcsolat alkalmazást, Linuxhoz a "
"Remminát ajánljuk."
#: templates/vm-credentials.html:37
msgid "IP" msgid "IP"
msgstr "IP" msgstr "IP"
#: templates/vm-credentials.html:14 #: templates/vm-credentials.html:41
msgid "Port" msgid "Port"
msgstr "Port" msgstr "Port"
#: templates/vm-credentials.html:18 #: templates/vm-credentials.html:45
msgid "Username" msgid "Username"
msgstr "Felhasználónév" msgstr "Felhasználónév"
#: templates/vm-credentials.html:22 #: templates/vm-credentials.html:49
msgid "Password" msgid "Password"
msgstr "Jelszó" msgstr "Jelszó"
...@@ -734,31 +806,87 @@ msgstr "Jelszó" ...@@ -734,31 +806,87 @@ msgstr "Jelszó"
msgid "Data store" msgid "Data store"
msgstr "Adattár" msgstr "Adattár"
#: templates/box/file/box.html:40 #: templates/box/file/box.html:15
msgid "This is your global data store."
msgstr "Ez az ön központi adattárja."
#: templates/box/file/box.html:16
msgid ""
"You can access it from all your own virtual machines,\n"
" the lab client, this web interface, or through SFTP protocol.\n"
" "
msgstr ""
"A fájlokat elérheti az összes virtuális gépéről, a laborkliensről, erről a "
"webes felületről, vagy SFTP protokollon."
#: templates/box/file/box.html:19
msgid ""
"This directory is mounted on Windows machines as Z:\n"
" drive, and on Linux ones as ~/sshfs."
msgstr ""
"A windowsos gépeken a Z: meghajtóra, Linuxon a ~/sshfs katalógusba van "
"csatolva."
#: templates/box/file/box.html:21
msgid ""
"If you log in on lab machines (currently Ubuntu only),\n"
" you can see this folder also as ~/sshfs."
msgstr ""
"Ha a laborgépekre bejelentkezik (jelenleg csak Ubuntu alatt), akkor a "
"fájlokat szintén a ~/sshfs katalógusban találja."
#: templates/box/file/box.html:23
#, python-format
msgid ""
"You can also use an SFTP client (eg.\n"
" WinSCP) to access your files at %(serv)s. You will need to register "
"a\n"
" public key bellow."
msgstr ""
"SFTP klienst (pl. WinSCP) is használhat a %(serv)s címre csatlakozva. Ehhez "
"alább tudja nyilvános kulcsát regisztrálni."
#: templates/box/file/box.html:60
msgid "No files." msgid "No files."
msgstr "Nincs megjeleníthető fájl." msgstr "Nincs megjeleníthető fájl."
#: templates/box/file/box.html:53 #: templates/box/file/box.html:73
msgid "Create folder" msgid "Create folder"
msgstr "Mappa létrehozása" msgstr "Mappa létrehozása"
#: templates/box/file/box.html:55 #: templates/box/file/box.html:75
msgid "Name of new folder" msgid "Name of new folder"
msgstr "Új mappa neve" msgstr "Új mappa neve"
#: templates/box/file/box.html:63 #: templates/box/file/box.html:83
msgid "Toplist" msgid "Toplist"
msgstr "Legújabb fájlok" msgstr "Legújabb fájlok"
#: templates/box/file/box.html:72 #: templates/box/file/box.html:89
msgid "Manage keys"
msgstr "Kulcsok kezelése"
#: templates/box/file/box.html:98
msgid "Add public key"
msgstr "Nyilvános kulcs hozzáadása"
#: templates/box/file/box.html:105
msgid "Public key in OpenSSH format"
msgstr "Nyilvános kulcs OpenSSH formátumban"
#: templates/box/file/box.html:113
msgid "Reset key"
msgstr "Kulcsok újragenerálása"
#: templates/box/file/box.html:122
msgid "File upload" msgid "File upload"
msgstr "Fájlfeltöltés" msgstr "Fájlfeltöltés"
#: templates/box/file/box.html:78 #: templates/box/file/box.html:128
msgid "Drag and drop files here to start uploading." msgid "Drag and drop files here to start uploading."
msgstr "Húzza ide a fájlt a feltöltés megkezdéséhez." msgstr "Húzza ide a fájlt a feltöltés megkezdéséhez."
#: templates/box/file/box.html:80 #: templates/box/file/box.html:130
msgid "" msgid ""
"You can also use the <a href=\"#\" id=\"old-upload\">the traditional upload " "You can also use the <a href=\"#\" id=\"old-upload\">the traditional upload "
"form</a>." "form</a>."
...@@ -766,35 +894,35 @@ msgstr "" ...@@ -766,35 +894,35 @@ msgstr ""
"Használhatja a <a href=\"#\" id=\"old-upload\">hagyományos feltöltő űrlapot</" "Használhatja a <a href=\"#\" id=\"old-upload\">hagyományos feltöltő űrlapot</"
"a> is." "a> is."
#: templates/box/file/box.html:82 #: templates/box/file/box.html:132
msgid "Upload limit is 1GB per file!" msgid "Upload limit is 1GB per file!"
msgstr "A feltöltési limit 1GiB fájlonként!" msgstr "A feltöltési limit 1GiB fájlonként!"
#: templates/box/file/box.html:86 #: templates/box/file/box.html:136
msgid "Error: File is bigger than 1GB!" msgid "Error: File is bigger than 1GB!"
msgstr "Hiba: a fájl nagyobb 1 GiB-nál." msgstr "Hiba: a fájl nagyobb 1 GiB-nál."
#: templates/box/file/box.html:87 #: templates/box/file/box.html:137
msgid "Error: Upload server is not available!" msgid "Error: Upload server is not available!"
msgstr "Hiba: a feltöltő kiszolgáló nem érhető el." msgstr "Hiba: a feltöltő kiszolgáló nem érhető el."
#: templates/box/file/box.html:88 #: templates/box/file/box.html:138
msgid "Error: File already exists!" msgid "Error: File already exists!"
msgstr "Hiba: a fájl már létezik." msgstr "Hiba: a fájl már létezik."
#: templates/box/file/box.html:107 #: templates/box/file/box.html:157
msgid "File quota" msgid "File quota"
msgstr "Fájlkvóta" msgstr "Fájlkvóta"
#: templates/box/file/box.html:107 #: templates/box/file/box.html:157
msgid "Used space" msgid "Used space"
msgstr "Használt terület" msgstr "Használt terület"
#: templates/box/file/box.html:108 #: templates/box/file/box.html:158
msgid "soft limit" msgid "soft limit"
msgstr "puha limit" msgstr "puha limit"
#: templates/box/file/box.html:110 #: templates/box/file/box.html:160
msgid "hard limit" msgid "hard limit"
msgstr "kemény limit" msgstr "kemény limit"
...@@ -814,91 +942,130 @@ msgstr "letöltés" ...@@ -814,91 +942,130 @@ msgstr "letöltés"
msgid "Last modification" msgid "Last modification"
msgstr "Utolsó módosítás" msgstr "Utolsó módosítás"
#: templates/box/key/entry.html:18 templates/box/template/summary.html:50
#: templates/box/template/summary.html:51
msgid "Remove"
msgstr "Törlés"
#: templates/box/template/box.html:7 #: templates/box/template/box.html:7
msgid "Templates" msgid "Templates"
msgstr "Sablonok" msgstr "Sablonok"
#: templates/box/template/box.html:19 #: templates/box/template/box.html:16
msgid "This is the list of your own templates."
msgstr "Ez a saját sablonjainak listája."
#: templates/box/template/box.html:17
msgid "Templates are customized versions of the base images."
msgstr "A sablonok alaprendszerek testre szabott változatai."
#: templates/box/template/box.html:18
msgid ""
"You can install all the needed software on a master\n"
" machine, and it will be ready to run by your students in minutes.\n"
" "
msgstr ""
"Telepítheti az összes szükséges szoftvert egy mestergépen, és az így készült "
"sablon pár perc múltán készen is állhat a hallgatók számára."
#: templates/box/template/box.html:34
msgid "You have no own templates." msgid "You have no own templates."
msgstr "Még nincs egy sablonja sem." msgstr "Még nincs egy sablonja sem."
#: templates/box/template/box.html:21 #: templates/box/template/box.html:36
msgid "" msgid ""
"Create a new one, and share it with your students. Or you can also use a " "Create a new one, and share it with your students. Or you can also use a "
"common one." "common one."
msgstr "" msgstr ""
"Hozzon létre egyet, és ossza meg hallgatóival. Vagy használjon egy közöset." "Hozzon létre egyet, és ossza meg hallgatóival. Vagy használjon egy közöset."
#: templates/box/template/box.html:47 templates/box/template/summary.html:40 #: templates/box/template/box.html:62 templates/box/template/summary.html:40
msgid "Try" msgid "Try"
msgstr "Kipróbálás" msgstr "Kipróbálás"
#: templates/box/template/box.html:48 templates/box/template/summary.html:41 #: templates/box/template/box.html:63 templates/box/template/summary.html:41
msgid "Start" msgid "Start"
msgstr "Indítás" msgstr "Indítás"
#: templates/box/template/box.html:78 templates/box/template/entry.html:18 #: templates/box/template/box.html:93 templates/box/template/entry.html:18
#: templates/box/vm/box.html:58 templates/box/vm/entry.html:23 #: templates/box/vm/box.html:73 templates/box/vm/entry.html:23
msgid "System" msgid "System"
msgstr "Rendszer" msgstr "Rendszer"
#: templates/box/template/box.html:97 templates/box/template/entry.html:37 #: templates/box/template/box.html:112 templates/box/template/entry.html:37
#: templates/box/vm/entry.html:52 #: templates/box/vm/entry.html:52
msgid "Created at" msgid "Created at"
msgstr "Létrehozás ideje" msgstr "Létrehozás ideje"
#: templates/box/template/box.html:102 templates/box/template/entry.html:42 #: templates/box/template/box.html:117 templates/box/template/entry.html:42
msgid "Running instances" msgid "Running instances"
msgstr "Futó példányok" msgstr "Futó példányok"
#: templates/box/template/box.html:116 #: templates/box/template/box.html:131
#, python-format #, python-format
msgid "Share quota: %(used)s/%(all)s" msgid "Share quota: %(used)s/%(all)s"
msgstr "Megosztó kvóta: %(used)s/%(all)s" msgstr "Megosztó kvóta: %(used)s/%(all)s"
#: templates/box/template/summary.html:43 #: templates/box/template/summary.html:43
#: templates/box/template/summary.html:44 #: templates/box/template/summary.html:44
#: templates/box/template/summary.html:53
#: templates/box/template/summary.html:54
msgid "Edit" msgid "Edit"
msgstr "Szerkesztés" msgstr "Szerkesztés"
#: templates/box/template/summary.html:50
#: templates/box/template/summary.html:51
msgid "Remove"
msgstr "Törlés"
#: templates/box/vm/box.html:7 #: templates/box/vm/box.html:7
msgid "Virtual machines" msgid "Virtual machines"
msgstr "Virtuális gépek" msgstr "Virtuális gépek"
#: templates/box/vm/box.html:16
msgid "This is the list of your running virtual machines."
msgstr "Ez az ön futó virtuális gépeinek listája."
#: templates/box/vm/box.html:17
msgid ""
"You can launch a new VM instance if it is shared by\n"
" a teacher for one of your groups."
msgstr ""
"Egy VM példányt akkor tud elindítani, ha egy oktató megosztotta egy olyan "
"csoporttal, amelynek tagja."
#: templates/box/vm/box.html:19 #: templates/box/vm/box.html:19
msgid ""
"Please note, that users and shares both have a limit\n"
" of launchable instances."
msgstr ""
"Vegye figyelembe, hogy a felhasználóknak és az egyes megosztásoknak is "
"korlátozva van a futtatható példányszám."
#: templates/box/vm/box.html:34
msgid "You have not started any machines yet." msgid "You have not started any machines yet."
msgstr "Még nem indított egy gépet sem." msgstr "Még nem indított egy gépet sem."
#: templates/box/vm/box.html:21 #: templates/box/vm/box.html:36
msgid "Choose a template, and you can use the system in a minute." msgid "Choose a template, and you can use the system in a minute."
msgstr "Válasszon egy sablont, és egy percen belül használhatja a rendszert." msgstr "Válasszon egy sablont, és egy percen belül használhatja a rendszert."
#: templates/box/vm/box.html:30 #: templates/box/vm/box.html:45
msgid "Start new machine" msgid "Start new machine"
msgstr "Új gép indítása" msgstr "Új gép indítása"
#: templates/box/vm/box.html:35 #: templates/box/vm/box.html:50
msgid "Available shares" msgid "Available shares"
msgstr "Elérhető megosztások" msgstr "Elérhető megosztások"
#: templates/box/vm/box.html:37 #: templates/box/vm/box.html:52
msgid "Choose one of the following shared templates to launch." msgid "Choose one of the following shared templates to launch."
msgstr "Válasszon egyet az alábbi megosztott sablonok közül." msgstr "Válasszon egyet az alábbi megosztott sablonok közül."
#: templates/box/vm/box.html:93 #: templates/box/vm/box.html:108
msgid "Quota reached" msgid "Quota reached"
msgstr "Kvóta betelt" msgstr "Kvóta betelt"
#: templates/box/vm/box.html:93 #: templates/box/vm/box.html:108
msgid "Launch" msgid "Launch"
msgstr "Indítás" msgstr "Indítás"
#: templates/box/vm/box.html:113 #: templates/box/vm/box.html:128
#, python-format #, python-format
msgid "Personal quota: %(used)s/%(all)s" msgid "Personal quota: %(used)s/%(all)s"
msgstr "Személyes kvóta: %(used)s/%(all)s" msgstr "Személyes kvóta: %(used)s/%(all)s"
...@@ -919,30 +1086,39 @@ msgstr "Felfüggesztési idő meghosszabbítása" ...@@ -919,30 +1086,39 @@ msgstr "Felfüggesztési idő meghosszabbítása"
msgid "Renew deletion time" msgid "Renew deletion time"
msgstr "Törlési idő meghosszabbítása" msgstr "Törlési idő meghosszabbítása"
#: templates/box/vm/entry.html:78 templates/box/vm/summary.html:13 #: templates/box/vm/entry.html:78 templates/box/vm/summary.html:15
msgid "More details" msgid "More details"
msgstr "További részletek" msgstr "További részletek"
#: templates/box/vm/summary.html:25 templates/box/vm/summary.html.py:26 #: templates/box/vm/summary.html:25 templates/box/vm/summary.html.py:26
msgid "Edit name"
msgstr "Név szerkesztése"
#: templates/box/vm/summary.html:33 templates/box/vm/summary.html.py:34
msgid "Connect" msgid "Connect"
msgstr "Csatlakozás" msgstr "Csatlakozás"
#: templates/box/vm/summary.html:28 templates/box/vm/summary.html.py:29 #: templates/box/vm/summary.html:36 templates/box/vm/summary.html.py:37
msgid "Pause" msgid "Pause"
msgstr "Felfüggesztés" msgstr "Felfüggesztés"
#: templates/box/vm/summary.html:34 #: templates/box/vm/summary.html:42
msgid "Restart" msgid "Restart"
msgstr "Újraindítás" msgstr "Újraindítás"
#: templates/box/vm/summary.html:39 #: templates/box/vm/summary.html:53 templates/box/vm/summary.html.py:54
msgid "starting…"
msgstr "indítás…"
#: templates/box/vm/summary.html:41 templates/box/vm/summary.html.py:42
msgid "Resume" msgid "Resume"
msgstr "Folytatás" msgstr "Folytatás"
#~ msgid "Public keys"
#~ msgstr "Nyilvános kulcsok"
#~ msgid "User details"
#~ msgstr "Felhasználói adatok"
#~ msgid "starting…"
#~ msgstr "indítás…"
#~ msgid "My Groups" #~ msgid "My Groups"
#~ msgstr "Saját csoportok" #~ msgstr "Saját csoportok"
......
...@@ -6,8 +6,8 @@ msgid "" ...@@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-19 18:42+0100\n" "POT-Creation-Date: 2013-02-21 18:06+0100\n"
"PO-Revision-Date: 2013-02-10 14:27+0100\n" "PO-Revision-Date: 2013-02-21 18:09+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Hungarian <cloud@ik.bme.hu>\n" "Language-Team: Hungarian <cloud@ik.bme.hu>\n"
"Language: hu\n" "Language: hu\n"
...@@ -17,75 +17,108 @@ msgstr "" ...@@ -17,75 +17,108 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Lokalize 1.4\n" "X-Generator: Lokalize 1.4\n"
#: static/cloud.js:187 static/cloud.js.c:764 #: static/script/cloud.js:24
msgid "Are you sure deleting key?"
msgstr "Biztosan törli a kulcsot?"
#: static/script/cloud.js:24 static/script/cloud.js.c:246
#: static/script/cloud.js:320 static/script/cloud.js.c:533
#: static/script/store.js:273
msgid "Delete"
msgstr "Törlés"
#: static/script/cloud.js:36
msgid ""
"Are you sure about reseting store credentials?<br /> You will lose your "
"access to your store account on your existing virtual machines!"
msgstr ""
"Biztosan újragenerálja az adattár-kulcsait?<br /> "
"El fogja veszteni az adattár-hozzáférést a már futó virtuális gépekből!"
#: static/script/cloud.js:36
msgid "Reset"
msgstr "Újragenerálás"
#: static/script/cloud.js:65 static/script/store.js:309
msgid "Rename"
msgstr "Átnevezés"
#: static/script/cloud.js:221 static/script/store.js:273
msgid "Cancel" msgid "Cancel"
msgstr "Mégsem" msgstr "Mégsem"
#: static/cloud.js:201 #: static/script/cloud.js:235
#, c-format #, c-format
msgid "Are you sure stopping %s?" msgid "Are you sure stopping %s?"
msgstr "Biztosan felfüggeszti a következőt: %s?" msgstr "Biztosan felfüggeszti a következőt: %s?"
#: static/cloud.js:202 #: static/script/cloud.js:236
msgid "Stop" msgid "Stop"
msgstr "Felfüggesztés" msgstr "Felfüggesztés"
#: static/cloud.js:211 #: static/script/cloud.js:245
#, c-format #, c-format
msgid "Are you sure deleting %s?" msgid "Are you sure deleting %s?"
msgstr "Biztosan törli a következőt: %s?" msgstr "Biztosan törli a következőt: %s?"
#: static/cloud.js:212 static/cloud.js.c:286 static/cloud.js.c:430 #: static/script/cloud.js:255
#: static/cloud.js:764
msgid "Delete"
msgstr "Törlés"
#: static/cloud.js:221
#, c-format #, c-format
msgid "Are you sure restarting %s?" msgid "Are you sure restarting %s?"
msgstr "Biztosan újraindítja a következőt: %s?" msgstr "Biztosan újraindítja a következőt: %s?"
#: static/cloud.js:222 #: static/script/cloud.js:256
msgid "Restart" msgid "Restart"
msgstr "Újraindítás" msgstr "Újraindítás"
#: static/cloud.js:285 #: static/script/cloud.js:319
#, c-format #, c-format
msgid "Are you sure deleting this %s template?" msgid "Are you sure deleting this %s template?"
msgstr "Biztosan törli a következő sablont: %s?" msgstr "Biztosan törli a következő sablont: %s?"
#: static/cloud.js:430 #: static/script/cloud.js:452 static/script/cloud.js.c:459
msgid "Add owner"
msgstr "Tulajdonos hozzáadása"
#: static/script/cloud.js:457
msgid "Unknown"
msgstr "Ismeretlen"
#: static/script/cloud.js:533
#, c-format #, c-format
msgid "Are you sure deleting <strong>%s</strong>" msgid "Are you sure deleting <strong>%s</strong>"
msgstr "Törli a következő fájlt: <strong>%s</strong>" msgstr "Törli a következő fájlt: <strong>%s</strong>"
#: static/cloud.js:554 static/cloud.js.c:563 static/cloud.js.c:572 #: static/script/store.js:57 static/script/store.js.c:66
#: static/cloud.js:703 static/cloud.js.c:758 #: static/script/store.js:75 static/script/store.js.c:205
#: static/script/store.js:267
msgid "file" msgid "file"
msgstr "fájl" msgstr "fájl"
#: static/cloud.js:759 #: static/script/store.js:268
#, c-format #, c-format
msgid "You are removing the file <strong>%s</strong>." msgid "You are removing the file <strong>%s</strong>."
msgstr "Törli a következő fájlt: <strong>%s</strong>." msgstr "Törli a következő fájlt: <strong>%s</strong>."
#: static/cloud.js:761 #: static/script/store.js:270
#, c-format #, c-format
msgid "You are removing the folder <strong>%s</strong> (and its content)." msgid "You are removing the folder <strong>%s</strong> (and its content)."
msgstr "Törli a következő könyvtárat és tartalmát: <strong>%s</strong>." msgstr "Törli a következő könyvtárat és tartalmát: <strong>%s</strong>."
#: static/cloud.js:764 #: static/script/store.js:273
msgid "Are you sure?" msgid "Are you sure?"
msgstr "Biztos benne?" msgstr "Biztos benne?"
#: static/cloud.js:916 static/cloud.js.c:918 #: static/script/store.js:427 static/script/store.js.c:429
msgid "Upload" msgid "Upload"
msgstr "Feltöltés" msgstr "Feltöltés"
#: static/cloud.js:918 #: static/script/store.js:429
msgid "done, processing..." msgid "done, processing..."
msgstr "kész, feldolgozás..." msgstr "kész, feldolgozás..."
#: static/cloud.js:981 #, fuzzy
msgid "Please choose a different name." #~ msgid "Are you sure about reseting store credentials"
msgstr "Kérem, válasszon eltérő nevet." #~ msgstr "Biztosan újraindítja a következőt: %s?"
#~ msgid "Please choose a different name."
#~ msgstr "Kérem, válasszon eltérő nevet."
...@@ -9,6 +9,9 @@ $(function() { ...@@ -9,6 +9,9 @@ $(function() {
$(this).next('.details').slideDown(700); $(this).next('.details').slideDown(700);
} }
}) })
$('a').click(function(e){
e.stopPropagation();
});
$('.delete-template').click(function(e) { $('.delete-template').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
...@@ -30,7 +33,7 @@ $(function() { ...@@ -30,7 +33,7 @@ $(function() {
}); });
}); });
$('#reset-key').click(function(e){ $('#reset-key').click(function(e){
vm_confirm_popup(gettext('Are you sure about reseting store credentials'), gettext('Reset'), function(){ vm_confirm_popup(gettext('Are you sure about reseting store credentials?<br /> You will lose your access to your store account on your existing virtual machines!'), gettext('Reset'), function(){
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/ajax/key/reset/', url: '/ajax/key/reset/',
...@@ -41,7 +44,7 @@ $(function() { ...@@ -41,7 +44,7 @@ $(function() {
}); });
}); });
$('.entry .summary').click(toggleDetails); $('.entry .summary').click(toggleDetails);
if(window.navigator.userAgent.indexOf('cloud-gui') > -1) { if(window.navigator.userAgent.indexOf('cloud-gui') < 0) {
$('.connect-vm').click(function(e) { $('.connect-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
...@@ -179,24 +182,16 @@ $(function() { ...@@ -179,24 +182,16 @@ $(function() {
$('#new-group-semester').change(updateSummary); $('#new-group-semester').change(updateSummary);
$('#new-group-members').change(updateSummary); $('#new-group-members').change(updateSummary);
}); });
$('#vm-password-show').click(function() {
$('#vm-password-show').hide();
$('#vm-password').show();
});
$('.hidden-password').each(function() {
$(this).val('******');
});
$('.hidden-password').click(function() { $('.hidden-password').click(function() {
if(!$(this).hasClass('shown')) { if($(this).attr('type') == 'password'){
$(this).val($(this).data('value')); $(this).attr('type', 'text');
$(this).addClass('shown'); $(this).addClass('shown');
} else { } else {
$(this).val('******'); $(this).attr('type', 'password');
$(this).removeClass('shown'); $(this).removeClass('shown');
} }
}) });
toggleDetails.apply($('.selected-summary')); $('.selected-summary').next().show();
toggleDetails.apply($('.selected-summary'));
/** /**
* Connect button new window * Connect button new window
*/ */
...@@ -204,15 +199,12 @@ $(function() { ...@@ -204,15 +199,12 @@ $(function() {
function get_vm_details(id) { function get_vm_details(id) {
$.get('/vm/credentials/' + id, function(data) { $.get('/vm/credentials/' + id, function(data) {
$('#modal-container').html(data); $('#modal-container').html(data);
$('.hidden-password').each(function() { $('#modal-container .hidden-password').click(function() {
$(this).val('******'); if($(this).attr('type') == 'password'){
}); $(this).attr('type', 'text');
$('.hidden-password').click(function() {
if(!$(this).hasClass('shown')) {
$(this).val($(this).data('value'));
$(this).addClass('shown'); $(this).addClass('shown');
} else { } else {
$(this).val('******'); $(this).attr('type', 'password');
$(this).removeClass('shown'); $(this).removeClass('shown');
} }
}) })
...@@ -430,11 +422,64 @@ $(function() { ...@@ -430,11 +422,64 @@ $(function() {
}); });
$('#new-owner').click(function() { $('#new-owner').click(function() {
$('#new-owner-form').toggle(); $('#new-owner-form input[type=text]').focus();
}); });
$('#new-owner-form input').click(function(e) { $('#new-owner-form input').click(function(e) {
e.stopPropagation(); e.stopPropagation();
}); });
$('#new-owner-form input').keyup(function() {
var timer;
return function(e){
var val=$(this).val().split(' ')[0];
clearTimeout(timer);
timer=setTimeout(function(){
if(val.length<1) return;
$.ajax({
type: 'POST',
data: 'q='+val,
url: '/ajax/group/autocomplete/',
dataType: 'json',
success: function(data){
console.log(data);
$('#new-owner-autocomplete')[0].innerHTML='<ul>';
var el=$('#new-owner-autocomplete')[0];
for(var i in data){
var d=data[i];
el.innerHTML+='<li>'
+d.name+': '
+d.neptun
+' <input type="button" value="'+gettext('Add owner')+'" data-neptun="'+d.neptun+'" />'
+'<div class="clear"></div></li>';
}
if(data.length == 0){
el.innerHTML+='<li>'
+gettext('Unknown')+': '
+val
+' <input type="button" value="'+gettext('Add owner')+'" data-neptun="'+val+'" />'
+'<div class="clear"></div></li>';
}
el.innerHTML+='</ul>';
$(el).find('input').each(function(){
var self=this;
$(this).click(function(e){
e.stopPropagation();
$.ajax({
type: 'POST',
data: 'neptun='+$(self).data('neptun'),
url: '/ajax/group/'+$('#new-owner').data('gid')+'/addOwner/',
dataType: 'json',
success: function(data){
window.location.reload();
}
})
})
})
}
});
},1000);
e.stopPropagation();
}
}());
$('#new-owner-form input[type=submit]').click(function() { $('#new-owner-form input[type=submit]').click(function() {
var neptun = $(this).prev().val(); var neptun = $(this).prev().val();
$.ajax({ $.ajax({
...@@ -464,6 +509,19 @@ $(function() { ...@@ -464,6 +509,19 @@ $(function() {
} }
}); });
}); });
/*$('#group-owners .remove').click(function(e) {
e.preventDefault();
e.stopPropagation();
var neptun = $(this).data('neptun');
$.ajax({
type: 'POST',
url: '/ajax/group/' + $(this).data('gid') + '/remove/',
data: 'neptun=' + neptun,
success: function(data) {
$('#member-' + neptun).slideUp(700);
}
});
});*/
$('#groups .delete').click(function(e) { $('#groups .delete').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
......
...@@ -218,9 +218,9 @@ var cloud = (function(cloud) { ...@@ -218,9 +218,9 @@ var cloud = (function(cloud) {
*/ */
self.fadeIn = function(e) { self.fadeIn = function(e) {
//firefox sucks :S //firefox sucks :S
try{ try {
$(e).hide().slideDown(500); $(e).hide().slideDown(500);
}catch(ex){ } catch(ex) {
} }
} }
...@@ -479,6 +479,10 @@ var cloud = (function(cloud) { ...@@ -479,6 +479,10 @@ var cloud = (function(cloud) {
var model = new Model(); var model = new Model();
$(function() { $(function() {
ko.applyBindings(model); ko.applyBindings(model);
$('#keys').click(function(e) {
$('.key').slideDown(700);
$('#keys').slideUp(700);
});
}); });
document.addEventListener('dragenter', function(e) { document.addEventListener('dragenter', function(e) {
e.stopPropagation(); e.stopPropagation();
......
...@@ -42,6 +42,7 @@ body ...@@ -42,6 +42,7 @@ body
font-size:1.5em; font-size:1.5em;
margin-top:0; margin-top:0;
padding:10px; padding:10px;
position: relative;
} }
&.wide { &.wide {
margin-right: 30px; margin-right: 30px;
......
...@@ -101,6 +101,21 @@ ...@@ -101,6 +101,21 @@
float: none; float: none;
} }
} }
&.key {
.name {
background-image: url(/static/icons/key.png);
}
textarea {
margin: 10px;
width: 93%;
}
#new-key .name {
background-image: url(/static/icons/key--plus.png);
}
#reset-key .name {
background-image: url(/static/icons/key--exclamation.png);
}
}
.quota{ .quota{
left: 0; left: 0;
top: 0; top: 0;
...@@ -445,10 +460,10 @@ ...@@ -445,10 +460,10 @@
background-image: url(/static/icons/computer-off.png); background-image: url(/static/icons/computer-off.png);
} }
#template .wm .summary .name{ #template .entry .summary .name{
background-image: url(/static/icons/document-template.png) background-image: url(/static/icons/document-template.png)
} }
#template .wm .public-template .name{ #template .entry .public-template .name{
background-image: url(/static/icons/blue-document-share.png) background-image: url(/static/icons/blue-document-share.png)
} }
#new-template-button .name{ #new-template-button .name{
...@@ -599,18 +614,35 @@ table { ...@@ -599,18 +614,35 @@ table {
} }
} }
#keys {
.name {
background-image: url(/static/icons/key.png); .boxhelp {
position: relative;
.boxhelp-box {
color:#000;
position: absolute;
left: -100px;
width: 500px;
z-index: 1000000;
font-size: .7em;
background-color: #ffc;
border-radius:4px;
border:1px solid #aaa;
box-shadow:0 0 30px rgba(0,0,0,0.3);
margin:20px;
display: none;
} }
textarea { &:hover .boxhelp-box {
margin: 10px; display: block;
width: 93%;
} }
#new-key .name { .icon {
background-image: url(/static/icons/key--plus.png); display: block;
float: right;
} }
#reset-key .name { }
background-image: url(/static/icons/key--exclamation.png);
#new-owner-autocomplete {
input[type=button] {
float: right;
} }
} }
p.rightbuttons body{min-height:100%;font-family:'Titillium Web',sans-serif;font-size:.9em;background:#dadada url(/static/image/site_bgr.png) repeat-x;background-position:80px 0;margin:0;padding:0;overflow:scroll}#content{width:970px;text-align:left;margin:0 auto}.contentblock{background-color:#ccc;border-radius:4px;border:1px solid #aaa;box-shadow:0 0 30px rgba(0,0,0,0.3);margin:20px}.contentblock p,.contentblock dl{margin:0;padding:5px}.contentblock h2{background-color:#000;background-image:url(/static/image/hexabar.png);background-position:right center;background-repeat:no-repeat;border-radius:4px;border-bottom-left-radius:0;border-bottom-right-radius:0;color:#eee;font-size:1.5em;margin-top:0;padding:10px;position:relative}.contentblock.wide{margin-right:30px}.contentblock.note{background-color:#ffc}.contentblock ol{margin-left:2em}.contentblock ol li.done{color:#aaa}.big{font-size:2em}ul.messagelist{text-align:left;margin:0;padding:0 0 5px}ul.messagelist li{font-size:12px;display:block;border-bottom:1px solid #ddd;color:#666;background:#ffc url(/static/admin/img/icon_success.gif) 5px .3em no-repeat;margin:0 0 3px;padding:4px 5px 4px 25px}ul.messagelist li.warning{background-image:url(/static/admin/img/icon_alert.gif)}ul.messagelist li.error{background-image:url(/static/admin/img/icon_error.gif)}input.validated{padding-right:15px;background-image:url(/static/admin/img/icon_success.gif);background-repeat:no-repeat;background-position:right center}input.validated.error{background:#fcc url(/static/admin/img/icon_error.gif) right center no-repeat;padding-right:15px}.errornote{font-size:12px!important;display:block;border:1px solid red;color:red;background:#ffc url(/static/admin/img/icon_error.gif) 5px .3em no-repeat;margin:0 0 3px;padding:4px 5px 4px 25px}.errorlist li{font-size:12px!important;display:block;border:1px solid red;color:#FFF;background:#f00 url(/static/admin/img/icon_alert.gif) 5px .3em no-repeat;margin:0 0 3px;padding:4px 5px 4px 25px}.errorlist li a{color:#FFF;text-decoration:underline}td ul.errorlist li{margin:0!important}.errors{background:#ffc}.errors input,.errors select,.errors textarea{border:1px solid red}div.system-message{background:#ffc;font-size:.8em;margin:10px;padding:6px 8px}div.system-message p.system-message-title{color:red;background:#ffc url(/static/admin/img/icon_error.gif) 5px .3em no-repeat;margin:0;padding:4px 5px 4px 25px}small{font-size:.8em}input{border-radius:2px;border:1px solid #777;padding:2px;margin:1px 5px;background:rgba(0,0,0,0.1);font-family:'Titillium Web',sans-serif;outline:0;box-shadow:inset 0 0 10px rgba(0,0,0,0.2),0 0 5px rgba(0,0,0,0.2);-webkit-transition:box-shadow .5s;-moz-transition:box-shadow .5s;-o-transition:box-shadow .5s;transition:box-shadow .5s}input:hover{border:1px solid #666;box-shadow:inset 0 0 10px rgba(0,0,0,0.2),0 0 5px rgba(255,255,0,0.5)}input:focus{border:1px solid #555;box-shadow:inset 0 0 10px rgba(0,0,0,0.2),0 0 10px rgba(255,255,0,0.8)}input[type=submit],input[type=button],input[type=reset]{border:1px solid #777;cursor:pointer;box-shadow:0 0 5px rgba(0,0,0,0.2);-webkit-transition:background .5s;-moz-transition:background .5s;-o-transition:background .5s;transition:background .5s}input[type=submit]:hover,input[type=button]:hover,input[type=reset]:hover{background:rgba(0,0,0,0.2)}textarea{border-radius:2px;border:1px solid #777;padding:5px;margin:10px 5px;width:300px;height:100px;background:rgba(0,0,0,0.1);font-family:'Titillium Web',sans-serif;outline:0;box-shadow:inset 0 0 10px rgba(0,0,0,0.2),0 0 5px rgba(0,0,0,0.2);-webkit-transition:box-shadow .5s;-moz-transition:box-shadow .5s;-o-transition:box-shadow .5s;transition:box-shadow .5s}textarea:hover{border:1px solid #666;box-shadow:inset 0 0 10px rgba(0,0,0,0.2),0 0 5px rgba(255,255,0,0.5)}textarea:focus{border:1px solid #555;box-shadow:inset 0 0 10px rgba(0,0,0,0.2),0 0 10px rgba(255,255,0,0.8)}.hilight{background-color:#ff6}.hidden-password{padding-right:25px;background-image:url(/static/icons/eye-half.png);background-repeat:no-repeat;background-position:right center;cursor:pointer}.hidden-password.shown{background-image:url(/static/icons/eye.png)}input::-webkit-input-placeholder{color:#444}input:-moz-placeholder{color:#444}input::-moz-placeholder{color:#444}input:-ms-input-placeholder{color:#444}textarea::-webkit-input-placeholder{color:#444}textarea:-moz-placeholder{color:#444}textarea::-moz-placeholder{color:#444}textarea:-ms-input-placeholder{color:#444}#header{height:80px;background-color:#072c61;background-image:url(/static/image/bme_feher2.png);background-repeat:no-repeat;background-position:20px 18px;border-bottom:3px solid #0b4599;box-shadow:0 0 30px rgba(0,0,0,0.4);margin:0;padding:0 0 0 200px}#header h1{font-size:2em;line-height:80px;float:left;margin:0;padding:0 1em}#header h1 a{color:#fff;text-decoration:none}#loginblock{position:absolute;right:0;top:0;background-color:#000;background-image:url(/static/image/hexabar.png);background-position:center center;border-radius:0 0 0 10px;color:#fff;font-weight:700;margin:0;padding:7px}#loginblock a{color:#fff;text-decoration:underline}#loginblock a:hover{color:#aaa}.boxes{width:480px;float:left}.box{background-color:#000;background-image:url(/static/image/hexa.png);background-position:center 30%;background-repeat:no-repeat;color:#fff;font-weight:700;line-height:1.5em;width:400px;border-radius:10px;border-top-width:30px;margin:10px 420px 10px 10px;padding:2px}.box h3{color:#fff;text-align:center;margin:0;padding:3px}.box .content{min-height:100px;margin:0;padding:5px}.tooltip{position:relative;z-index:1}.tooltip .container{margin:10px 10px 5px 150px;border-radius:4px;border:1px solid #888;background:#ff6;box-shadow:0 0 20px rgba(0,0,0,0.2)}.tooltip .container p{text-align:left;font-size:.8em;word-spacing:2px;padding:5px}.tooltip .container .tail{position:absolute;left:350px;border-width:17px;border-style:solid;border-color:#888 transparent transparent transparent}.tooltip .container .tail:after{content:"";position:absolute;left:-17px;top:-18px;border-width:17px;border-style:solid;border-color:#ff6 transparent transparent transparent}.entry-list{list-style-type:none}.entry.opened .actions{display:block!important}.entry.opened .summary .name .details{display:inline;border:0}.entry.small .summary{padding:5px;cursor:default}.entry.small .summary:hover{background-color:#c1c1c1}.entry.small .summary .name{background:none!important;text-align:center;float:none}.entry.small-row .summary{padding:5px}.entry.small-row .summary:hover{background-color:#b1b1b1}.entry.small-row .summary .name{float:none}.entry.key .name{background-image:url(/static/icons/key.png)}.entry.key textarea{margin:10px;width:93%}.entry.key #new-key .name{background-image:url(/static/icons/key--plus.png)}.entry.key #reset-key .name{background-image:url(/static/icons/key--exclamation.png)}.entry .quota{left:0;top:0;z-index:0;position:absolute;width:100%;height:100%}.entry .quota .used{height:100%;position:absolute}.entry .quota .softLimit{height:100%;position:absolute;border-left:1px solid red}.entry .summary{padding:15px 5px;line-height:1.7em;border-top:1px solid #888;cursor:pointer;background-color:#c1c1c1;position:relative;-webkit-transition:background-color .3s;-moz-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s}.entry .summary.unfinished{background-color:#fcfc6c;background-image:url(/static/image/constr.png);background-position:right top;background-repeat:no-repeat}.entry .summary.unfinished:hover{background-color:#ecec6a;background-image:url(/static/image/constr.png)}.entry .summary.selected-summary{background-color:#7cec67}.entry .summary.selected-summary:hover{background-color:#87d378}.entry .summary.public-template{background-color:#a7b3c3}.entry .summary.public-template:hover{background-color:#9da9b9}.entry .summary:hover{background-color:#b1b1b1;background-image:none}.entry .summary:hover .actions{display:block}.entry .summary:hover .name .details{display:inline;border:0}.entry .summary .id{float:right;width:30px}.entry .summary .name{float:left;padding-left:25px;background-repeat:no-repeat;background-position:left center;z-index:2;position:relative;height:24px}.entry .summary .name.filetype-new-folder{float:left}.entry .summary .name .details{display:none}.entry .summary .status{text-align:right;float:right;width:60px;z-index:2;position:relative}.entry .summary .actions{float:right;margin-left:5px;display:none;z-index:2;position:relative}.entry .summary .actions a{margin:2px 0;height:16px;width:16px;display:block;float:left;margin-left:2px}.entry .summary .actions a:hover{box-shadow:0 0 10px rgba(0,0,0,0.4);background-color:rgba(0,0,0,0.4)}.entry .summary #new-folder-form{float:right;margin-left:5px;display:none;z-index:2;position:relative}.entry.opened #new-folder-form{display:block}.entry .details{border-top:1px solid #888;display:none}.entry .details .container{padding:5px 5px}.entry .details .container .upload-zone{margin:10px;border-radius:10px;border:2px dashed #666;text-align:center;font-size:.8em;padding:10px}.entry .details .container .upload-zone p{padding:0}.entry .details h3{font-weight:normal}.entry .details ul{list-style:none;margin:0 5px}.entry .details li{margin:8px 0;padding:3px 0 3px 20px;border-bottom:1px dotted #aaa;background-repeat:no-repeat;background-position:0 4px}.entry .details li:last-child{border-bottom:0}.entry .details a{text-decoration:underline}.entry .details .name{float:none;background-image:url(/static/icons/computer.png)}.entry .details .os-win{background-image:url(/static/icons/windows.png)}.entry .details .os-linux{background-image:url(/static/icons/animal-penguin.png)}.entry .details .template{background-image:url(/static/icons/document-template.png)}.entry .details .type{background-image:url(/static/icons/box-share.png)}.entry .details .date{background-image:url(/static/icons/calendar-day.png)}.entry .details .cpu{background-image:url(/static/icons/processor.png)}.entry .details .memory{background-image:url(/static/icons/memory.png)}.entry .details .count{background-image:url(/static/icons/documents-stack.png)}.entry .details .value{float:right;width:200px;text-align:right}.entry .details .description{font-size:inherit;background-image:url(/static/icons/document-snippet.png)}.entry .details .description .value{font-size:.8em;word-spacing:3px;width:350px}.entry.new .name{background-image:url(/static/icons/computer--plus.png)}#new-share .type-summary.type-summary,.share-type .value.type-summary{font-size:.8em;text-align:right}#new-share .type-summary span,.share-type .value span{background-position:left center;background-repeat:no-repeat;padding-left:18px}#new-share .type-summary span.suspend,.share-type .value span.suspend{background-image:url(/static/icons/control-pause.png)}#new-share .type-summary span.delete,.share-type .value span.delete{background-image:url(/static/icons/minus-circle.png)}#template-wizard .size-summary.size-summary,.type .value.size-summary{font-size:.8em;text-align:right}#template-wizard .size-summary span,.type .value span{background-position:left center;background-repeat:no-repeat;padding-left:18px}#template-wizard .size-summary span.cpu,.type .value span.cpu{background-image:url(/static/icons/processor.png)}#template-wizard .size-summary span.memory,.type .value span.memory{background-image:url(/static/icons/memory.png)}#template-wizard .size-summary span.credit,.type .value span.credit{background-image:url(/static/icons/point.png)}.file-list{list-style:none;max-height:400px}.file-list .name{float:left}.file-list .info{float:right;width:65px;text-align:right;font-size:.8em}.file-list select{position:absolute;left:10px;top:5px;z-index:10}#file-list{overflow-y:scroll}#file-list li:nth-child(3) .summary{border-top:0}#file-list li:nth-child(2) .summary{border-top:0}#file-list li:nth-child(1) .summary{border-top:0;border-bottom:1px solid #888}#current-location .summary{border-bottom:1px solid #888;height:25px}#current-location .summary .name{position:absolute;left:100px;text-align:left}.filetype-c{background-image:url(/static/icons/document-visual-studio.png)}.filetype-text{background-image:url(/static/icons/document.png)}.filetype-image{background-image:url(/static/icons/document-image.png)}.filetype-zip{background-image:url(/static/icons/folder-zipper.png)}.filetype-pdf{background-image:url(/static/icons/document-pdf.png)}.filetype-doc{background-image:url(/static/icons/document-word.png)}.filetype-excel{background-image:url(/static/icons/document-excel.png)}.filetype-csv{background-image:url(/static/icons/document-excel-csv.png)}.filetype-php{background-image:url(/static/icons/document-php.png)}.filetype-tex{background-image:url(/static/icons/document-tex.png)}.filetype-ppt{background-image:url(/static/icons/document-powerpoint.png)}.filetype-music{background-image:url(/static/icons/document-music.png)}.filetype-movie{background-image:url(/static/icons/document-film.png)}.filetype-folder{background-image:url(/static/icons/folder.png)}.toplist{background-image:url(/static/icons/arrow-circle-double.png)}.filetype-up{background-image:url(/static/icons/upload-cloud.png)}.filetype-new-folder{background-image:url(/static/icons/folder--plus.png)}.filetype-jump-out{background-image:url(/static/icons/arrow-curve-090.png)}.vm-on{background-image:url(/static/icons/computer-cloud.png)}.vm-off{background-image:url(/static/icons/computer-off.png)}#template .wm .summary .name{background-image:url(/static/icons/document-template.png)}#template .wm .public-template .name{background-image:url(/static/icons/blue-document-share.png)}#new-template-button .name{background-image:url(/static/icons/document--plus.png)!important}.wm-list.modal{border-radius:4px;border:1px solid #666}.wm-list.modal input{padding:2px 10px}.wm-list.modal .wm:nth-child(1) .summary{border-top:0}#template .entry .template-details{margin:0;padding:0;border-top:1px solid #888;display:none}#template .entry .template-details ul{list-style-type:none}#template .entry .template-details li{padding-left:10px;border-top:1px solid #aaa;position:relative}#template .entry .template-details li:first-child{border-top:0}#template .entry .template-details li .status{float:right;padding:0 5px}#template .entry .template-details li .group-name{float:left;line-height:1.5em;z-index:2;position:relative}#vm-credentials .content,#ports .content{padding:15px}table{width:100%;border-collapse:collapse}table tr{width:100%}table tr:hover{background-color:rgba(0,0,0,0.1)}table tr td,table tr th{padding:5px}table tr td{width:150px}#groups .entry .summary .name{background-image:url(/static/icons/users.png)}#groups #new-group .summary .name{background-image:url(/static/icons/user--plus.png)}#groups #show-hidden-groups .summary .name{background-image:url(/static/icons/eye.png)}#group-members .summary .name,#group-owners .summary .name{background-image:url(/static/icons/user.png);float:left}#new-member .name,#new-owner .name{background-image:url(/static/icons/user--plus.png)!important;float:left}#new-member #new-member-form,#new-owner #new-member-form,#new-member #new-owner-form,#new-owner #new-owner-form{float:right;margin-left:5px;display:none;z-index:2;position:relative}.shares{margin:5px;list-style:none}.shares li{overflow:hidden;border-radius:2px;border:1px solid #888;height:30px;position:relative;margin:5px 0;line-height:30px;padding-left:10px;background-color:rgba(0,0,0,0.05);-webkit-transition:background-color .3s;-moz-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s}.shares li:hover{background-color:rgba(0,0,0,0.1);border:1px solid #666}.shares li:hover input{border-left:1px solid #666}.shares li form{position:relative}.shares li input{border:0;border-radius:0;border-left:1px solid #888;box-shadow:none;position:relative;top:-1px;height:30px;right:-5px}.boxhelp{position:relative}.boxhelp .boxhelp-box{color:#000;position:absolute;left:-100px;width:500px;z-index:1000000;font-size:.7em;background-color:#ffc;border-radius:4px;border:1px solid #aaa;box-shadow:0 0 30px rgba(0,0,0,0.3);margin:20px;display:none}.boxhelp:hover .boxhelp-box{display:block}.boxhelp .icon{display:block;float:right}#modal{top:0;position:absolute;width:100%;height:100%;z-index:999}#shadow{position:fixed;height:100%;width:100%;background-color:rgba(0,0,0,0.6)}#modal-container{min-width:500px;position:fixed;left:50%;top:100px;margin-left:-270px;margin-top:0;min-height:50px;background-color:#fff;border-radius:4px;padding:20px;box-shadow:0 0 30px rgba(0,0,0,0.4);border:1px solid #333;max-height:60%;overflow:auto}#modal-container .container{max-height:400px;overflow:auto;border-radius:2px;border:1px solid #888;background-color:#ccc}#modal-container ul{list-style:none}#modal-container ul li:first-child .summary{border:0}.wizard li{border-bottom:1px dotted #999}.wizard label{display:inline-block;padding:3px;margin:10px 5px}.wizard h2{margin:10px 0}.wizard .progress{text-align:center;position:relative;width:100%;height:15px}.wizard .progress .bar{height:20px;background-color:#66c400;border-right:1px solid #468600}.wizard .progress .bar-container{border:1px solid #666;box-shadow:0 0 20px rgba(0,0,0,0.2);border-radius:4px;height:20px;position:absolute;width:500px}.wizard .progress h3{width:100%;position:absolute}.wizard input[type=text],.wizard input[type=number],.wizard select{display:block;float:right;margin-top:8px}.wizard input[type=number]{width:4em}.wizard textarea{float:right;text-align:right}.wizard nav{margin-top:15px}.wizard nav a{text-decoration:underline;display:block}.wizard nav .prev{float:left}.wizard nav .next{float:right}.wizard ul.radio{float:right}.wizard ul.radio label{float:left;margin:0}.wizard .radio li{float:left;padding:5px;margin:5px 3px;border-bottom:none!important}.wizard .size-summary{margin:10px}#new-template-name input{margin:10px 5px}*{margin:0;padding:0}.clear{clear:both}abbr{border-bottom:1px dotted #666}a:link,a:visited{color:black}
{ \ No newline at end of file
float:right;
margin:7px 0;
}
table p.help
{
font-size:.85em;
color:#666;
}
th.fieldset
{
background-color:#000;
background-image:url(hexabar.png);
background-position:right center;
background-repeat:no-repeat;
border-radius:10px;
color:#fff;
font-weight:700;
margin-bottom:5px;
font-size:1.3em;
border-style:none!important;
padding:10px;
}
ul.messagelist
{
text-align:left;
margin:0;
padding:0 0 5px;
}
ul.messagelist li
{
font-size:12px;
display:block;
border-bottom:1px solid #ddd;
color:#666;
background:#ffc url(admin/img/icon_success.gif) 5px .3em no-repeat;
margin:0 0 3px;
padding:4px 5px 4px 25px;
}
ul.messagelist li.warning
{
background-image:url(admin/img/icon_alert.gif);
}
ul.messagelist li.error
{
background-image:url(admin/img/icon_error.gif);
}
.errornote
{
font-size:12px!important;
display:block;
border:1px solid red;
color:red;
background:#ffc url(admin/img/icon_error.gif) 5px .3em no-repeat;
margin:0 0 3px;
padding:4px 5px 4px 25px;
}
.errorlist li
{
font-size:12px!important;
display:block;
border:1px solid red;
color:#FFF;
background:red url(admin/img/icon_alert.gif) 5px .3em no-repeat;
margin:0 0 3px;
padding:4px 5px 4px 25px;
}
.errorlist li a
{
color:#FFF;
text-decoration:underline;
}
td ul.errorlist li
{
margin:0!important;
}
.errors
{
background:#ffc;
}
.errors input,.errors select,.errors textarea
{
border:1px solid red;
}
div.system-message
{
background:#ffc;
font-size:.8em;
margin:10px;
padding:6px 8px;
}
div.system-message p.system-message-title
{
color:red;
background:#ffc url(admin/img/icon_error.gif) 5px .3em no-repeat;
margin:0;
padding:4px 5px 4px 25px;
}
.description
{
font-size:12px;
padding:5px 0 0 12px;
}
#state .content p
{
text-align:center;
}
input.widebutton
{
font-size:25px;
line-height:1em;
text-align:left;
width:100%;
display:block;
cursor:pointer;
}
.icon-delete
{
background-image:url(/static/icons/Edit-delete-2.png);
background-repeat:no-repeat;
padding-left:26px!important;
}
div#header a:link,div#header a:visited,div.box a:link,div.box a:visited
{
color:#fff;
}
div#header h1 a,#project_running ul a:link,#project_running ul a:visited,#project_closed ul a:link,#project_closed ul a:visited
{
color:#fff;
text-decoration:none;
}
ul.errorlist,td ul.errorlist
{
margin:0!important;
padding:0!important;
}
...@@ -11,13 +11,12 @@ ...@@ -11,13 +11,12 @@
<script src="/static/script/jquery.min.js"></script> <script src="/static/script/jquery.min.js"></script>
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script> <script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
<script type="text/javascript"> <script type="text/javascript">
//window.localStorage.clear(); window.localStorage.removeItem('https://cloud.ik.bme.hu/static/style/style.less:timestamp');
var current_user={{user.id}}; var current_user={{user.id}};
</script> </script>
<script src="/static/script/less.min.js"></script> <script src="/static/script/less.min.js"></script>
<script src="/static/script/knockout.min.js"></script> <script src="/static/script/knockout.min.js"></script>
<script type="text/javascript" src="/static/script/util.js"></script> <script type="text/javascript" src="/static/script/util.js"></script>
<script type="text/javascript" src="/static/script/store.js"></script>
<script type="text/javascript" src="/static/script/cloud.js"></script> <script type="text/javascript" src="/static/script/cloud.js"></script>
{{ form.media }} {{ form.media }}
{% block js %}{% endblock %} {% block js %}{% endblock %}
......
<div class="contentblock"> <div class="contentblock">
<h2>{% block title %}Doboz címe (cseréld le){% endblock title %}</h2> <h2>{% block boxhelp %}{% endblock %}{% block title %}Doboz címe (cseréld le){% endblock title %}</h2>
<div class="content"> <div class="content">
{% block content %} {% block content %}
Doboz tartalma (cseréld le) Doboz tartalma (cseréld le)
......
...@@ -6,6 +6,26 @@ ...@@ -6,6 +6,26 @@
{% block title %} {% block title %}
{% trans "Data store" %} {% trans "Data store" %}
{% endblock title %} {% endblock title %}
{% block boxhelp %}
<div class="boxhelp">
<div class="icon">
<img src="/static/icons/information-frame.png" alt="{% trans "Help" %}" />
</div>
<div class="boxhelp-box">
<p>{% blocktrans %}This is your global data store.{% endblocktrans %}</p>
<p>{% blocktrans %}You can access it from all your own virtual machines,
the lab client, this web interface, or through SFTP protocol.
{% endblocktrans %}</p>
<p>{% blocktrans %}This directory is mounted on Windows machines as Z:
drive, and on Linux ones as ~/sshfs.{% endblocktrans %}</p>
<p>{% blocktrans %}If you log in on lab machines (currently Ubuntu only),
you can see this folder also as ~/sshfs.{% endblocktrans %}</p>
<p>{% blocktrans with serv=storeserv %}You can also use an SFTP client (eg.
WinSCP) to access your files at {{serv}}. You will need to register a
public key bellow.{% endblocktrans %}</p>
</div>
</div>
{% endblock %}
{% block content %} {% block content %}
<ul class="file-list"> <ul class="file-list">
...@@ -47,7 +67,7 @@ ...@@ -47,7 +67,7 @@
</li> </li>
<!-- /ko --> <!-- /ko -->
</ul> </ul>
<ul class="file-list"> <ul class="entry-list">
<li class="entry small-row"> <li class="entry small-row">
<div class="summary" id="new-folder"> <div class="summary" id="new-folder">
<div class="name filetype-new-folder">{% trans "Create folder" %}</div> <div class="name filetype-new-folder">{% trans "Create folder" %}</div>
...@@ -64,6 +84,36 @@ ...@@ -64,6 +84,36 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</li> </li>
<li class="entry small-row key">
<div class="summary" id="keys">
<div class="name keys">{% trans "Manage keys" %}</div>
<div class="clear"></div>
</div>
</li>
{% for key in keys %}
{% include "box/key/entry.html" %}
{% endfor %}
<li class="entry small-row key" style="display: none">
<div class="summary" id="new-key">
<div class="name">{% trans "Add public key" %}</div>
<div class="clear"></div>
</div>
<div class="details">
<div class="container">
<form style="padding-bottom: 10px" action="/key/add/" method="POST">
{% csrf_token %}
<textarea style="margin-bottom: 5px" name="key" placeholder="{% trans "Public key in OpenSSH format" %}"></textarea><br />
<input type="submit" style="margin-left: 10px;" value="{% trans "Save" %}" />
</form>
</div>
</div>
</li>
<li class="entry small-row key" style="display: none">
<div class="summary" id="reset-key">
<div class="name">{% trans "Reset key" %}</div>
<div class="clear"></div>
</div>
</li>
<li class="file-upload entry small-row"> <li class="file-upload entry small-row">
<div class="summary" data-bind="click: getUploadURL"> <div class="summary" data-bind="click: getUploadURL">
<div class="quota"> <div class="quota">
......
{% extends "box/base/box.html" %}
{% load i18n %}
{% load l10n %}
{% get_current_language as LANGUAGE_CODE %}
{% block title %}
{% trans "Public keys" %}
{% endblock title %}
{% block content %}
<ul class="entry-list" id="keys">
{% for key in keys %}
{% include "box/key/entry.html" %}
{% endfor %}
<li class="entry small-row">
<div class="summary" id="new-key">
<div class="name">{% trans "Add public key" %}</div>
<div class="clear"></div>
</div>
<div class="details">
<form style="padding-bottom: 10px" action="/key/add/" method="POST">
{% csrf_token %}
<textarea style="margin-bottom: 5px" name="key" placeholder="{% trans "Public key in OpenSSH format" %}"></textarea><br />
<input type="submit" style="margin-left: 10px;" value="{% trans "Save" %}" />
</form>
</div>
</li>
<li class="entry small-row">
<div class="summary" id="reset-key">
<div class="name">{% trans "Reset key" %}</div>
<div class="clear"></div>
</div>
</li>
</ul>
{% endblock content %}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry" id="key-{{key.id}}"> <li class="entry key" id="key-{{key.id}}" style="display: none">
{{block.super}} {{block.super}}
</li> </li>
{% endblock content %} {% endblock content %}
......
...@@ -7,8 +7,23 @@ ...@@ -7,8 +7,23 @@
{% trans "Templates" %} {% trans "Templates" %}
{% endblock title %} {% endblock title %}
{% block boxhelp %}
<div class="boxhelp">
<div class="icon">
<img src="/static/icons/information-frame.png" alt="{% trans "Help" %}" />
</div>
<div class="boxhelp-box">
<p>{% blocktrans %}This is the list of your own templates.{% endblocktrans %}</p>
<p>{% blocktrans %}Templates are customized versions of the base images.{% endblocktrans %}</p>
<p>{% blocktrans %}You can install all the needed software on a master
machine, and it will be ready to run by your students in minutes.
{% endblocktrans %}</p>
</div>
</div>
{% endblock %}
{% block content %} {% block content %}
<ul class="vm-list entry-list"> <ul class="vm-list entry-list" id="template">
{% for t in mytemplates %} {% for t in mytemplates %}
{% include "box/template/entry.html" %} {% include "box/template/entry.html" %}
{% endfor %} {% endfor %}
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<a href="#" class="try-template" data-id="{{t.id}}" title="{% trans "Try" %}"> <a href="#" class="try-template" data-id="{{t.id}}" title="{% trans "Try" %}">
<img src="/static/icons/control.png" alt="{% trans "Start" %}"/> <img src="/static/icons/control.png" alt="{% trans "Start" %}"/>
</a> </a>
<a href="#" title="{% trans "Edit" %}"> <!--<a href="#" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a> </a>-->
<a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}"> <a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}">
<img src="/static/icons/user-share.png" alt="{% trans "Share" %}" /> <img src="/static/icons/user-share.png" alt="{% trans "Share" %}" />
</a> </a>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<a href="#" class="delete-template" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}"> <a href="#" class="delete-template" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" />
</a> </a>
<a href="#" class="edit-template" data-id="{{ t.id }}" title="{% trans "Edit" %}"> <!--<a href="#" class="edit-template" data-id="{{ t.id }}" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a> </a>-->
{% endblock actions %} {% endblock actions %}
...@@ -7,6 +7,21 @@ ...@@ -7,6 +7,21 @@
{% trans "Virtual machines" %} {% trans "Virtual machines" %}
{% endblock title %} {% endblock title %}
{% block boxhelp %}
<div class="boxhelp">
<div class="icon">
<img src="/static/icons/information-frame.png" alt="{% trans "Help" %}" />
</div>
<div class="boxhelp-box">
<p>{% blocktrans %}This is the list of your running virtual machines.{% endblocktrans %}</p>
<p>{% blocktrans %}You can launch a new VM instance if it is shared by
a teacher for one of your groups.{% endblocktrans %}</p>
<p>{% blocktrans %}Please note, that users and shares both have a limit
of launchable instances.{% endblocktrans %}</p>
</div>
</div>
{% endblock %}
{% block content %} {% block content %}
<ul class="vm-list entry-list"> <ul class="vm-list entry-list">
{% if instances %} {% if instances %}
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{% endblock content %} {% endblock content %}
{% block name %} {% block name %}
<div class="name {% if i.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}"> <div class="name {% if vm.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}">
<span id="vm-{{vm.id}}-name">{{vm.name|truncatechars:20}}</span> <span id="vm-{{vm.id}}-name">{{vm.name|truncatechars:20}}</span>
<small id="vm-{{vm.id}}-name-details" class="details"> <small id="vm-{{vm.id}}-name-details" class="details">
(<a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a>) (<a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a>)
......
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block js %}
<script type="text/javascript" src="/static/script/store.js"></script>
{% endblock %}
{% block content %} {% block content %}
<div class="boxes"> <div class="boxes">
{% include "box/vm/box.html" %} {% include "box/vm/box.html" %}
{% include "box/key/box.html" %}
{% if userdetails.share_quota %} {% if userdetails.share_quota %}
{% include "box/template/box.html" %} {% include "box/template/box.html" %}
{% include "box/group/box.html" %} {% include "box/group/box.html" %}
......
...@@ -88,7 +88,24 @@ ...@@ -88,7 +88,24 @@
</div> </div>
{% if i.firewall_host %} {% if i.firewall_host %}
<div class="contentblock" id="ports"> <div class="contentblock" id="ports">
<h2>{% trans "Port administration" %}</h2> <h2>
<div class="boxhelp">
<div class="icon">
<img src="/static/icons/information-frame.png" alt="{% trans "Help" %}" />
</div>
<div class="boxhelp-box">
<p>{% blocktrans %}This is a list about the network ports
forwarded to the public internet.{% endblocktrans %}</p>
<p>{% blocktrans %}You can access the given private port of
the VM trough the public address of the network.
{% endblocktrans %}</p>
<p>{% blocktrans %}On the IPV6 network you can access the
listed private ports direcly using the VM's global IPV6
address (connections to other ports are dropped).
{% endblocktrans %}</p>
</div>
</div>
{% trans "Port administration" %}</h2>
<div class="content"> <div class="content">
<form action="{% url vm_port_add i.id %}" method="post"> <form action="{% url vm_port_add i.id %}" method="post">
{% csrf_token %} {% csrf_token %}
......
...@@ -4,7 +4,34 @@ ...@@ -4,7 +4,34 @@
<table> <table>
<tr> <tr>
<th>{% trans "Protocol" %}:</th> <th>{% trans "Protocol" %}:</th>
<td>{{i.template.access_type|upper}}</td> <td>
<div class="boxhelp">
<div class="icon">
<img src="/static/icons/information-frame.png" alt="{% trans "Help" %}" />
</div>
<div class="boxhelp-box">
{% if i.template.os_type == 'linux' %}
<p>{% blocktrans %}You can access Linux machines through
the SSH protocol (we recommend
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">
PuTTY</a> for Windows and OpenSSH for all other systems).
{% endblocktrans %}</p>
{% if i.template.access_type == 'nx' %}
<p>{% blocktrans %}Graphical log in is also supported with
the <a href="http://www.nomachine.com/download.php">
NoMachine NX Client</a> application.{% endblocktrans %}</p>
{% endif %}
{% else %}
<p>{% blocktrans %}You can access Windows machines through
the remote desktop protocol.{% endblocktrans %}</p>
<p>{% blocktrans %}We recommend the built-in remote desktop
client for Windows and Remmina for Linux.{% endblocktrans %}</p>
{% endif %}
</div>
</div>
{{i.template.access_type|upper}}
</td>
</tr> </tr>
<tr> <tr>
<th>{% trans "IP" %}:</th> <th>{% trans "IP" %}:</th>
...@@ -20,7 +47,7 @@ ...@@ -20,7 +47,7 @@
</tr> </tr>
<tr> <tr>
<th>{% trans "Password" %}:</th> <th>{% trans "Password" %}:</th>
<td><input type="text" class="hidden-password" data-value="{{ i.pw }}" /></td> <td><input type="password" class="hidden-password" value="{{ i.pw }}" /></td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -20,6 +20,7 @@ from django.utils.translation import ugettext_lazy as _ ...@@ -20,6 +20,7 @@ from django.utils.translation import ugettext_lazy as _
from django.views.decorators.http import * from django.views.decorators.http import *
from django.views.generic import * from django.views.generic import *
from firewall.tasks import * from firewall.tasks import *
from cloud.settings import store_settings
from one.models import * from one.models import *
from school.models import * from school.models import *
import django.contrib.auth as auth import django.contrib.auth as auth
...@@ -41,6 +42,15 @@ def home(request): ...@@ -41,6 +42,15 @@ def home(request):
for i, s in enumerate(shares): for i, s in enumerate(shares):
s.running_shared = s.instance_set.all().exclude(state="DONE").filter(owner=request.user).count() s.running_shared = s.instance_set.all().exclude(state="DONE").filter(owner=request.user).count()
shares[i] = s shares[i] = s
try:
details = UserCloudDetails.objects.get(user=request.user)
except UserCloudDetails.DoesNotExist:
details = UserCloudDetails(user=request.user)
details.save()
try:
generated_public_key = details.ssh_key.id
except:
generated_public_key = -1
return render_to_response("home.html", RequestContext(request, { return render_to_response("home.html", RequestContext(request, {
'shares': shares, 'shares': shares,
'templates': Template.objects.filter(state='READY'), 'templates': Template.objects.filter(state='READY'),
...@@ -48,8 +58,9 @@ def home(request): ...@@ -48,8 +58,9 @@ def home(request):
'instances': _list_instances(request), 'instances': _list_instances(request),
'groups': request.user.person_set.all()[0].owned_groups.all(), 'groups': request.user.person_set.all()[0].owned_groups.all(),
'semesters': Semester.objects.all(), 'semesters': Semester.objects.all(),
'userdetails': UserCloudDetails.objects.get(user=request.user), 'userdetails': details,
'keys': request.user.sshkey_set.all() 'keys': request.user.sshkey_set.exclude(id=generated_public_key).all(),
'storeserv': store_settings['store_public'],
})) }))
@login_required @login_required
...@@ -324,7 +335,6 @@ class VmPortAddView(View): ...@@ -324,7 +335,6 @@ class VmPortAddView(View):
raise ValidationError(_("Port number is in a restricted domain (22000 to 24000).")) raise ValidationError(_("Port number is in a restricted domain (22000 to 24000)."))
inst = get_object_or_404(Instance, id=iid, owner=request.user) inst = get_object_or_404(Instance, id=iid, owner=request.user)
inst.firewall_host.add_port(proto=request.POST['proto'], public=public, private=int(request.POST['private'])) inst.firewall_host.add_port(proto=request.POST['proto'], public=public, private=int(request.POST['private']))
reload_firewall_lock()
messages.success(request, _(u"Port %d successfully added.") % public) messages.success(request, _(u"Port %d successfully added.") % public)
except: except:
messages.error(request, _(u"Adding port failed.")) messages.error(request, _(u"Adding port failed."))
...@@ -343,7 +353,6 @@ def vm_port_del(request, iid, proto, public): ...@@ -343,7 +353,6 @@ def vm_port_del(request, iid, proto, public):
inst = get_object_or_404(Instance, id=iid, owner=request.user) inst = get_object_or_404(Instance, id=iid, owner=request.user)
try: try:
inst.firewall_host.del_port(proto=proto, public=public) inst.firewall_host.del_port(proto=proto, public=public)
reload_firewall_lock()
messages.success(request, _(u"Port %d successfully removed.") % public) messages.success(request, _(u"Port %d successfully removed.") % public)
except: except:
messages.error(request, _(u"Removing port failed.")) messages.error(request, _(u"Removing port failed."))
...@@ -447,9 +456,10 @@ def key_add(request): ...@@ -447,9 +456,10 @@ def key_add(request):
key.user=request.user key.user=request.user
key.full_clean() key.full_clean()
key.save() key.save()
_update_keys(request.user)
except ValidationError as e: except ValidationError as e:
messages.error(request, unicode(e)) messages.error(request, ''.join(e.messages))
except e: except:
messages.error(request, _('Failed to add public key')) messages.error(request, _('Failed to add public key'))
return redirect('/') return redirect('/')
...@@ -459,6 +469,7 @@ def key_ajax_delete(request): ...@@ -459,6 +469,7 @@ def key_ajax_delete(request):
try: try:
key=get_object_or_404(SshKey, id=request.POST['id'], user=request.user) key=get_object_or_404(SshKey, id=request.POST['id'], user=request.user)
key.delete() key.delete()
_update_keys(request.user)
except: except:
messages.error(request, _('Failed to delete public key')) messages.error(request, _('Failed to delete public key'))
return HttpResponse('OK') return HttpResponse('OK')
...@@ -470,8 +481,19 @@ def key_ajax_reset(request): ...@@ -470,8 +481,19 @@ def key_ajax_reset(request):
det=UserCloudDetails.objects.get(user=request.user) det=UserCloudDetails.objects.get(user=request.user)
det.reset_smb() det.reset_smb()
det.reset_keys() det.reset_keys()
_update_keys(request.user)
except: except:
messages.error(request, _('Failed to reset keys')) messages.error(request, _('Failed to reset keys'))
return HttpResponse('OK') return HttpResponse('OK')
def _update_keys(user):
details = user.cloud_details
password = details.smb_password
key_list = []
for key in user.sshkey_set.all():
key_list.append(key.key)
user = user.username
StoreApi.updateauthorizationinfo(user, password, key_list)
# vim: et sw=4 ai fenc=utf8 smarttab : # vim: et sw=4 ai fenc=utf8 smarttab :
...@@ -6,7 +6,7 @@ msgid "" ...@@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-19 18:42+0100\n" "POT-Creation-Date: 2013-02-21 18:06+0100\n"
"PO-Revision-Date: 2013-02-19 18:47+0100\n" "PO-Revision-Date: 2013-02-19 18:47+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: American English <kde-l10n-hu@kde.org>\n" "Language-Team: American English <kde-l10n-hu@kde.org>\n"
...@@ -155,7 +155,7 @@ msgstr "Nem található Személy objektum." ...@@ -155,7 +155,7 @@ msgstr "Nem található Személy objektum."
msgid "Invalid NEPTUN code found." msgid "Invalid NEPTUN code found."
msgstr "Érvénytelen Neptun-kód." msgstr "Érvénytelen Neptun-kód."
#: views.py:208 views.py:223 #: views.py:208 views.py:223 views.py:262
msgid "Invalid NEPTUN code" msgid "Invalid NEPTUN code"
msgstr "Érvénytelen Neptun-kód" msgstr "Érvénytelen Neptun-kód"
...@@ -163,35 +163,35 @@ msgstr "Érvénytelen Neptun-kód" ...@@ -163,35 +163,35 @@ msgstr "Érvénytelen Neptun-kód"
msgid "Owners of" msgid "Owners of"
msgstr "Tulajdonosok" msgstr "Tulajdonosok"
#: templates/show-group.html:22 templates/box/person/box.html:24 #: templates/show-group.html:22 templates/box/person/entry.html:22
msgid "Remove" msgid "Remove"
msgstr "Eltávolítás" msgstr "Eltávolítás"
#: templates/show-group.html:30 templates/box/person/box.html:32 #: templates/show-group.html:30 templates/box/person/entry.html:31
msgid "This user never logged in, no data available" msgid "This user never logged in, no data available"
msgstr "Ez a felhasználó még nem lépett be, nincs adat róla" msgstr "Ez a felhasználó még nem lépett be, nincs adat róla"
#: templates/show-group.html:34 templates/box/person/box.html:36 #: templates/show-group.html:34 templates/box/person/entry.html:35
msgid "Name" msgid "Name"
msgstr "Név" msgstr "Név"
#: templates/show-group.html:37 templates/box/person/box.html:39 #: templates/show-group.html:37 templates/box/person/entry.html:38
msgid "NEPTUN" msgid "NEPTUN"
msgstr "NEPTUN" msgstr "NEPTUN"
#: templates/show-group.html:50 templates/show-group.html.py:53 #: templates/show-group.html:50
msgid "Add owner" msgid "Add owner"
msgstr "Tulajdonos hozzáadása" msgstr "Tulajdonos hozzáadása"
#: templates/show-group.html:52 #: templates/show-group.html:55
msgid "Owner name/NEPTUN" msgid "Owner name/NEPTUN"
msgstr "Tulajdonos neve/NEPTUN-kódja" msgstr "Tulajdonos neve/NEPTUN-kódja"
#: templates/show-group.html:66 #: templates/show-group.html:68
msgid "This group has no shared templates." msgid "This group has no shared templates."
msgstr "Ennek a csoportnak egy sablon sincs megosztva." msgstr "Ennek a csoportnak egy sablon sincs megosztva."
#: templates/show-group.html:69 #: templates/show-group.html:71
msgid "Share one, and the group members can start their own virtual machine." msgid "Share one, and the group members can start their own virtual machine."
msgstr "" msgstr ""
"Osszon meg egyet, hogy a csoport tagjai is elindíthassák egy példányát." "Osszon meg egyet, hogy a csoport tagjai is elindíthassák egy példányát."
...@@ -221,7 +221,6 @@ msgid "Group name" ...@@ -221,7 +221,6 @@ msgid "Group name"
msgstr "Csoport neve" msgstr "Csoport neve"
#: templates/box/group/box.html:48 templates/box/group/entry.html:42 #: templates/box/group/box.html:48 templates/box/group/entry.html:42
#: templates/box/person/entry.html:36
msgid "Semester" msgid "Semester"
msgstr "Félév" msgstr "Félév"
...@@ -242,11 +241,10 @@ msgid "Done" ...@@ -242,11 +241,10 @@ msgid "Done"
msgstr "Kész" msgstr "Kész"
#: templates/box/group/entry.html:15 templates/box/group/entry.html.py:56 #: templates/box/group/entry.html:15 templates/box/group/entry.html.py:56
#: templates/box/person/entry.html:50
msgid "More details" msgid "More details"
msgstr "Részletek" msgstr "Részletek"
#: templates/box/group/entry.html:19 templates/box/person/entry.html:16 #: templates/box/group/entry.html:19
msgid "Delete" msgid "Delete"
msgstr "Törlés" msgstr "Törlés"
...@@ -254,19 +252,19 @@ msgstr "Törlés" ...@@ -254,19 +252,19 @@ msgstr "Törlés"
msgid "Hide" msgid "Hide"
msgstr "Elrejtés" msgstr "Elrejtés"
#: templates/box/group/entry.html:32 templates/box/person/entry.html:26 #: templates/box/group/entry.html:32
msgid "Course" msgid "Course"
msgstr "Tárgy" msgstr "Tárgy"
#: templates/box/group/entry.html:37 templates/box/person/entry.html:31 #: templates/box/group/entry.html:37
msgid "Not assigned" msgid "Not assigned"
msgstr "Nincs hozzárendelve" msgstr "Nincs hozzárendelve"
#: templates/box/group/entry.html:46 templates/box/person/entry.html:40 #: templates/box/group/entry.html:46
msgid "Owner(s)" msgid "Owner(s)"
msgstr "Tulajdonosok" msgstr "Tulajdonosok"
#: templates/box/group/entry.html:50 templates/box/person/entry.html:44 #: templates/box/group/entry.html:50
msgid "Member count" msgid "Member count"
msgstr "Tagok száma" msgstr "Tagok száma"
...@@ -274,11 +272,11 @@ msgstr "Tagok száma" ...@@ -274,11 +272,11 @@ msgstr "Tagok száma"
msgid "Members of" msgid "Members of"
msgstr "Tagok" msgstr "Tagok"
#: templates/box/person/box.html:52 templates/box/person/box.html.py:55 #: templates/box/person/box.html:17 templates/box/person/box.html.py:20
msgid "Add user" msgid "Add user"
msgstr "Felhasználó hozzáadása" msgstr "Felhasználó hozzáadása"
#: templates/box/person/box.html:54 #: templates/box/person/box.html:19
msgid "User NEPTUN code" msgid "User NEPTUN code"
msgstr "Felhasználó Neptun-kódja" msgstr "Felhasználó Neptun-kódja"
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
{{owner}} ({{owner.code}}) {{owner}} ({{owner.code}})
{% endif %} {% endif %}
</div> </div>
<div class="actions"> <!--<div class="actions">
<a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{owner.code}}"> <a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{owner.code}}">
<img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
</a> </a>
</div> </div>-->
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="details"> <div class="details">
...@@ -46,14 +46,16 @@ ...@@ -46,14 +46,16 @@
</li> </li>
{% endfor %} {% endfor %}
<li class="entry small-row"> <li class="entry small-row">
<div class="summary" id="new-owner"> <div class="summary" id="new-owner" data-gid="{{group.id}}">
<div class="name">{% trans "Add owner" %}</div> <div class="name">{% trans "Add owner" %}</div>
<div id="new-owner-form">
<input type="text" placeholder="{% trans "Owner name/NEPTUN" %}" disabled="disabled" />
<input type="submit" value="{% trans "Add owner" %}" data-id="{{group.id}}" disabled="disabled" />
</div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="details" id="new-owner-form">
<div class="container">
<input type="text" placeholder="{% trans "Owner name/NEPTUN" %}" />
<div id="new-owner-autocomplete"></div>
</div>
</div>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -183,7 +183,7 @@ def group_new(request): ...@@ -183,7 +183,7 @@ def group_new(request):
members_list = re.split('\r?\n', request.POST['members']) members_list = re.split('\r?\n', request.POST['members'])
members = [] members = []
for member in members_list: for member in members_list:
if re.match('^[a-zA-Z][a-zA-Z0-9]{5}$', member) == None: if re.match('^[a-zA-Z][a-zA-Z0-9]{5}$', member.strip()) == None:
messages.error(request, _('Invalid NEPTUN code found.')) messages.error(request, _('Invalid NEPTUN code found.'))
return redirect('/') return redirect('/')
person, created = Person.objects.get_or_create(code=member) person, created = Person.objects.get_or_create(code=member)
...@@ -203,7 +203,7 @@ def group_new(request): ...@@ -203,7 +203,7 @@ def group_new(request):
def group_ajax_add_new_member(request, gid): def group_ajax_add_new_member(request, gid):
group = get_object_or_404(Group, id=gid) group = get_object_or_404(Group, id=gid)
member = request.POST['neptun'] member = request.POST['neptun']
if re.match('^[a-zA-Z][a-zA-Z0-9]{5}$', member) == None: if re.match('^[a-zA-Z][a-zA-Z0-9]{5}$', member.strip()) == None:
status = json.dumps({'status': 'Error'}) status = json.dumps({'status': 'Error'})
messages.error(request, _('Invalid NEPTUN code')) messages.error(request, _('Invalid NEPTUN code'))
return HttpResponse(status) return HttpResponse(status)
...@@ -236,3 +236,34 @@ def group_ajax_delete(request): ...@@ -236,3 +236,34 @@ def group_ajax_delete(request):
return HttpResponse(json.dumps({ return HttpResponse(json.dumps({
'status': 'OK' 'status': 'OK'
})) }))
@login_required
def group_ajax_owner_autocomplete(request):
results = map(lambda u: {
'name': u.get_full_name(),
'neptun': u.username }, User.objects.filter(last_name__istartswith=request.POST['q'])[:5])
results += map(lambda u: {
'name': u.get_full_name(),
'neptun': u.username }, User.objects.filter(first_name__istartswith=request.POST['q'])[:5])
results += map(lambda u: {
'name': u.get_full_name(),
'neptun': u.username }, User.objects.filter(username__istartswith=request.POST['q'])[:5])
return HttpResponse(json.dumps(results, ensure_ascii=False))
@login_required
def group_ajax_add_new_owner(request, gid):
if request.user.cloud_details.share_quota == 0:
return HttpResponse({'status': 'denied'})
group = get_object_or_404(Group, id=gid)
member = request.POST['neptun']
if re.match('^[a-zA-Z][a-zA-Z0-9]{5}$', member.strip()) == None:
status = json.dumps({'status': 'Error'})
messages.error(request, _('Invalid NEPTUN code'))
return HttpResponse(status)
person, created = Person.objects.get_or_create(code=member)
group.owners.add(person)
group.save()
return HttpResponse(json.dumps({
'status': 'OK'
}))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment