Merge branch 'task/3620/ssh_keys' of https://github.com/tiwariav/dynamicweb into bug/3638/ssh_key_without_download_option

This commit is contained in:
PCoder 2017-08-04 01:45:55 +05:30
commit 0fa4c0ac94
8 changed files with 43 additions and 210 deletions

View file

@ -21,6 +21,7 @@ def change_lang(context, lang=None, *args, **kwargs):
return "%s" % url return "%s" % url
@register.filter('get_value_from_dict') @register.filter('get_value_from_dict')
def get_value_from_dict(dict_data, key): def get_value_from_dict(dict_data, key):
""" """

View file

@ -19,7 +19,6 @@ from hosting.models import HostingOrder, HostingBill
from utils.stripe_utils import StripeUtils from utils.stripe_utils import StripeUtils
from datetime import datetime from datetime import datetime
from membership.models import CustomUser, StripeCustomer from membership.models import CustomUser, StripeCustomer
from oca.pool import WrongIdError
from opennebula_api.models import OpenNebulaManager from opennebula_api.models import OpenNebulaManager
from opennebula_api.serializers import VirtualMachineTemplateSerializer, VirtualMachineSerializer, VMTemplateSerializer from opennebula_api.serializers import VirtualMachineTemplateSerializer, VirtualMachineSerializer, VMTemplateSerializer
@ -80,7 +79,8 @@ class PricingView(TemplateView):
manager = OpenNebulaManager() manager = OpenNebulaManager()
template = manager.get_template(template_id) template = manager.get_template(template_id)
request.session['template'] = VirtualMachineTemplateSerializer(template).data request.session['template'] = VirtualMachineTemplateSerializer(
template).data
if not request.user.is_authenticated(): if not request.user.is_authenticated():
request.session['next'] = reverse('hosting:payment') request.session['next'] = reverse('hosting:payment')
@ -132,7 +132,8 @@ class BetaAccessView(FormView):
email = BaseEmail(**email_data) email = BaseEmail(**email_data)
email.send() email.send()
messages.add_message(self.request, messages.SUCCESS, self.success_message) messages.add_message(
self.request, messages.SUCCESS, self.success_message)
return render(self.request, 'datacenterlight/beta_success.html', {}) return render(self.request, 'datacenterlight/beta_success.html', {})
@ -184,7 +185,8 @@ class BetaProgramView(CreateView):
email = BaseEmail(**email_data) email = BaseEmail(**email_data)
email.send() email.send()
messages.add_message(self.request, messages.SUCCESS, self.success_message) messages.add_message(
self.request, messages.SUCCESS, self.success_message)
return HttpResponseRedirect(self.get_success_url()) return HttpResponseRedirect(self.get_success_url())
@ -209,7 +211,6 @@ class IndexView(CreateView):
@cache_control(no_cache=True, must_revalidate=True, no_store=True) @cache_control(no_cache=True, must_revalidate=True, no_store=True)
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
for session_var in ['specs', 'user', 'billing_address_data']: for session_var in ['specs', 'user', 'billing_address_data']:
if session_var in request.session: if session_var in request.session:
del request.session[session_var] del request.session[session_var]
@ -229,7 +230,8 @@ class IndexView(CreateView):
storage_field = forms.IntegerField(validators=[self.validate_storage]) storage_field = forms.IntegerField(validators=[self.validate_storage])
price = request.POST.get('total') price = request.POST.get('total')
template_id = int(request.POST.get('config')) template_id = int(request.POST.get('config'))
template = VMTemplate.objects.filter(opennebula_vm_template_id=template_id).first() template = VMTemplate.objects.filter(
opennebula_vm_template_id=template_id).first()
template_data = VMTemplateSerializer(template).data template_data = VMTemplateSerializer(template).data
name = request.POST.get('name') name = request.POST.get('name')
@ -241,35 +243,40 @@ class IndexView(CreateView):
cores = cores_field.clean(cores) cores = cores_field.clean(cores)
except ValidationError as err: except ValidationError as err:
msg = '{} : {}.'.format(cores, str(err)) msg = '{} : {}.'.format(cores, str(err))
messages.add_message(self.request, messages.ERROR, msg, extra_tags='cores') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='cores')
return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form")
try: try:
memory = memory_field.clean(memory) memory = memory_field.clean(memory)
except ValidationError as err: except ValidationError as err:
msg = '{} : {}.'.format(memory, str(err)) msg = '{} : {}.'.format(memory, str(err))
messages.add_message(self.request, messages.ERROR, msg, extra_tags='memory') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='memory')
return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form")
try: try:
storage = storage_field.clean(storage) storage = storage_field.clean(storage)
except ValidationError as err: except ValidationError as err:
msg = '{} : {}.'.format(storage, str(err)) msg = '{} : {}.'.format(storage, str(err))
messages.add_message(self.request, messages.ERROR, msg, extra_tags='storage') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='storage')
return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form")
try: try:
name = name_field.clean(name) name = name_field.clean(name)
except ValidationError as err: except ValidationError as err:
msg = '{} {}.'.format(name, _('is not a proper name')) msg = '{} {}.'.format(name, _('is not a proper name'))
messages.add_message(self.request, messages.ERROR, msg, extra_tags='name') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='name')
return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form")
try: try:
email = email_field.clean(email) email = email_field.clean(email)
except ValidationError as err: except ValidationError as err:
msg = '{} {}.'.format(email, _('is not a proper email')) msg = '{} {}.'.format(email, _('is not a proper email'))
messages.add_message(self.request, messages.ERROR, msg, extra_tags='email') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='email')
return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form")
specs = { specs = {
@ -334,7 +341,8 @@ class IndexView(CreateView):
email = BaseEmail(**email_data) email = BaseEmail(**email_data)
email.send() email.send()
messages.add_message(self.request, messages.SUCCESS, self.success_message) messages.add_message(
self.request, messages.SUCCESS, self.success_message)
return super(IndexView, self).form_valid(form) return super(IndexView, self).form_valid(form)
@ -419,7 +427,6 @@ class OrderConfirmationView(DetailView):
context_object_name = "order" context_object_name = "order"
model = HostingOrder model = HostingOrder
@cache_control(no_cache=True, must_revalidate=True, no_store=True) @cache_control(no_cache=True, must_revalidate=True, no_store=True)
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
if 'specs' not in request.session or 'user' not in request.session: if 'specs' not in request.session or 'user' not in request.session:
@ -429,7 +436,8 @@ class OrderConfirmationView(DetailView):
stripe_customer_id = request.session.get('customer') stripe_customer_id = request.session.get('customer')
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
stripe_utils = StripeUtils() stripe_utils = StripeUtils()
card_details = stripe_utils.get_card_details(customer.stripe_id, request.session.get('token')) card_details = stripe_utils.get_card_details(
customer.stripe_id, request.session.get('token'))
context = { context = {
'site_url': reverse('datacenterlight:index'), 'site_url': reverse('datacenterlight:index'),
'cc_last4': card_details.get('response_object').get('last4'), 'cc_last4': card_details.get('response_object').get('last4'),
@ -445,7 +453,8 @@ class OrderConfirmationView(DetailView):
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
billing_address_data = request.session.get('billing_address_data') billing_address_data = request.session.get('billing_address_data')
billing_address_id = request.session.get('billing_address') billing_address_id = request.session.get('billing_address')
billing_address = BillingAddress.objects.filter(id=billing_address_id).first() billing_address = BillingAddress.objects.filter(
id=billing_address_id).first()
vm_template_id = template.get('id', 1) vm_template_id = template.get('id', 1)
final_price = specs.get('price') final_price = specs.get('price')

View file

@ -7,7 +7,6 @@ DEBUG = False
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
CACHES = { CACHES = {
'default': { 'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',

View file

@ -26,7 +26,7 @@ class HostingUserLoginForm(forms.Form):
is_auth = authenticate(email=email, password=password) is_auth = authenticate(email=email, password=password)
if not is_auth: if not is_auth:
raise forms.ValidationError( raise forms.ValidationError(
"Your username and/or password were incorrect.") _("Your username and/or password were incorrect."))
elif is_auth.validated == 0: elif is_auth.validated == 0:
raise forms.ValidationError( raise forms.ValidationError(
_("Your account is not activated yet.")) _("Your account is not activated yet."))

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-03 00:19+0530\n" "POT-Creation-Date: 2017-08-03 03:31+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,398 +18,271 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: .\hosting\forms.py:33 msgid "Your username and/or password were incorrect."
msgstr "Dein Benutzername und/oder Dein Passwort ist falsch."
msgid "Your account is not activated yet." msgid "Your account is not activated yet."
msgstr "Dein Account wurde noch nicht aktiviert." msgstr "Dein Account wurde noch nicht aktiviert."
#: .\hosting\forms.py:70
msgid "Paste here your public key" msgid "Paste here your public key"
msgstr "Füge deinen Public Key ein" msgstr "Füge deinen Public Key ein"
#: .\hosting\forms.py:76
msgid "Give a name to your key" msgid "Give a name to your key"
msgstr "Gebe deinem SSH-Key einen Name" msgstr "Gebe deinem SSH-Key einen Name"
#: .\hosting\forms.py:81
msgid "Key name" msgid "Key name"
msgstr "Key-Name" msgstr "Key-Name"
#: .\hosting\templates\hosting\base_short.html:74
msgid "My Virtual Machines" msgid "My Virtual Machines"
msgstr "Meine virtuellen Maschinen" msgstr "Meine virtuellen Maschinen"
#: .\hosting\templates\hosting\base_short.html:79
#: .\hosting\templates\hosting\orders.html:12
msgid "My Orders" msgid "My Orders"
msgstr "Meine Bestellungen" msgstr "Meine Bestellungen"
#: .\hosting\templates\hosting\base_short.html:93
msgid "Notifications " msgid "Notifications "
msgstr "Benachrichtigungen" msgstr "Benachrichtigungen"
#: .\hosting\templates\hosting\base_short.html:96
msgid "Logout" msgid "Logout"
msgstr "Abmelden" msgstr "Abmelden"
#: .\hosting\templates\hosting\bill_detail.html:11
msgid "Invoice" msgid "Invoice"
msgstr "Rechnung" msgstr "Rechnung"
#: .\hosting\templates\hosting\bill_detail.html:11
#: .\hosting\templates\hosting\order_detail.html:23
msgid "Order #" msgid "Order #"
msgstr "Bestellung #" msgstr "Bestellung #"
#: .\hosting\templates\hosting\bill_detail.html:25
msgid "ungleich GmbH" msgid "ungleich GmbH"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:26
msgid "buchhaltung@ungleich.ch" msgid "buchhaltung@ungleich.ch"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:27
msgid "Hauptstrasse 14" msgid "Hauptstrasse 14"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:28
msgid "CH-8775 Luchsingen" msgid "CH-8775 Luchsingen"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:29
msgid "Mwst-Nummer: CHE-109.549.333 MWST" msgid "Mwst-Nummer: CHE-109.549.333 MWST"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:60
msgid "Total:" msgid "Total:"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:68
#, python-format #, python-format
msgid "Alles Preise in CHF mit 8%% Mehrwertsteuer." msgid "Alles Preise in CHF mit 8%% Mehrwertsteuer."
msgstr "All prices in CHF including 8%% VAT" msgstr "All prices in CHF including 8%% VAT"
#: .\hosting\templates\hosting\bill_detail.html:69
msgid "Betrag zahlbar innerhalb von 30 Tagen ab Rechnungseingang." msgid "Betrag zahlbar innerhalb von 30 Tagen ab Rechnungseingang."
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:70
msgid "Kontoverbindung:" msgid "Kontoverbindung:"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:73
msgid "IBAN:" msgid "IBAN:"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:76
msgid "BIC:" msgid "BIC:"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:81
msgid "CH02 0900 0000 6071 8848 8" msgid "CH02 0900 0000 6071 8848 8"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bill_detail.html:84
msgid "POFICHBEXXX" msgid "POFICHBEXXX"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bills.html:12
msgid "Customers" msgid "Customers"
msgstr "Kunden" msgstr "Kunden"
#: .\hosting\templates\hosting\bills.html:16
#: .\hosting\templates\hosting\user_keys.html:25
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bills.html:17
msgid "Email" msgid "Email"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\bills.html:28
msgid "View Bill" msgid "View Bill"
msgstr "Rechnung anzeigen" msgstr "Rechnung anzeigen"
#: .\hosting\templates\hosting\bills.html:41
#: .\hosting\templates\hosting\orders.html:82
#: .\hosting\templates\hosting\virtual_machines.html:70
msgid "previous" msgid "previous"
msgstr "vorherige" msgstr "vorherige"
#: .\hosting\templates\hosting\bills.html:47
#: .\hosting\templates\hosting\orders.html:88
#: .\hosting\templates\hosting\virtual_machines.html:76
msgid "next" msgid "next"
msgstr "nächste" msgstr "nächste"
#: .\hosting\templates\hosting\choice_ssh_keys.html:8
msgid "SSH Key" msgid "SSH Key"
msgstr "SSH Key" msgstr "SSH Key"
#: .\hosting\templates\hosting\choice_ssh_keys.html:9
msgid "Choose a key option in order to access your VM" msgid "Choose a key option in order to access your VM"
msgstr "Wähle eine Option um Zugriff auf deine VM zu erhalten" msgstr "Wähle eine Option um Zugriff auf deine VM zu erhalten"
#: .\hosting\templates\hosting\choice_ssh_keys.html:20
msgid "Generating a new key pair" msgid "Generating a new key pair"
msgstr "Neuen SSH-Key erstellen" msgstr "Neuen SSH-Key erstellen"
#: .\hosting\templates\hosting\choice_ssh_keys.html:21
msgid "I want to generate a new key pair" msgid "I want to generate a new key pair"
msgstr "Ich möchte einen neuen SSH-Key erstellen" msgstr "Ich möchte einen neuen SSH-Key erstellen"
#: .\hosting\templates\hosting\choice_ssh_keys.html:25
#: .\hosting\templates\hosting\user_key.html:36
msgid "Generate" msgid "Generate"
msgstr "Generieren" msgstr "Generieren"
#: .\hosting\templates\hosting\choice_ssh_keys.html:31
msgid "Using existing key" msgid "Using existing key"
msgstr "Nutzung eines existierenden SSH-Keys" msgstr "Nutzung eines existierenden SSH-Keys"
#: .\hosting\templates\hosting\choice_ssh_keys.html:32
msgid "I want to use my existing public key" msgid "I want to use my existing public key"
msgstr "Ich möchte einen existierenden SSH-Key nutzen" msgstr "Ich möchte einen existierenden SSH-Key nutzen"
#: .\hosting\templates\hosting\choice_ssh_keys.html:35
#, fuzzy
#| msgid "Upload Key"
msgid "Upload" msgid "Upload"
msgstr "Schlüssel hochladen" msgstr "Hochladen"
#: .\hosting\templates\hosting\confirm_reset_password.html:10
#: .\hosting\templates\hosting\login.html:17
#: .\hosting\templates\hosting\reset_password.html:15
#: .\hosting\templates\hosting\signup.html:13
#: .\hosting\templates\hosting\signup_validate.html:9
msgid "Your VM hosted in Switzerland" msgid "Your VM hosted in Switzerland"
msgstr "deine VM in der Schweiz" msgstr "deine VM in der Schweiz"
#: .\hosting\templates\hosting\confirm_reset_password.html:14
msgid "Set your new password" msgid "Set your new password"
msgstr "Setze dein neues Passwort" msgstr "Setze dein neues Passwort"
#: .\hosting\templates\hosting\confirm_reset_password.html:29
#: .\hosting\templates\hosting\reset_password.html:28
msgid "Reset" msgid "Reset"
msgstr "Zurücksetzen" msgstr "Zurücksetzen"
#: .\hosting\templates\hosting\confirm_reset_password.html:35
#: .\hosting\templates\hosting\reset_password.html:34
#: .\hosting\templates\hosting\signup.html:31
msgid "Already have an account ?" msgid "Already have an account ?"
msgstr "Hast Du bereits ein Benutzerkonto?" msgstr "Hast Du bereits ein Benutzerkonto?"
#: .\hosting\templates\hosting\confirm_reset_password.html:38
#: .\hosting\templates\hosting\login.html:22
#: .\hosting\templates\hosting\login.html:31
#: .\hosting\templates\hosting\reset_password.html:37
#: .\hosting\templates\hosting\signup.html:34
msgid "Login" msgid "Login"
msgstr "Anmelden" msgstr "Anmelden"
#: .\hosting\templates\hosting\create_virtual_machine.html:20
msgid "New Virtual Machine" msgid "New Virtual Machine"
msgstr "Neue virtuelle Maschine" msgstr "Neue virtuelle Maschine"
#: .\hosting\templates\hosting\create_virtual_machine.html:28
msgid "Step 1. Select VM Template:" msgid "Step 1. Select VM Template:"
msgstr "Wähle eine Vorlage" msgstr "Wähle eine Vorlage"
#: .\hosting\templates\hosting\create_virtual_machine.html:42
msgid "Step2. Select VM Configuration" msgid "Step2. Select VM Configuration"
msgstr "Wähle eine Konfiguration" msgstr "Wähle eine Konfiguration"
#: .\hosting\templates\hosting\create_virtual_machine.html:59
msgid "Price " msgid "Price "
msgstr "Preis" msgstr "Preis"
#: .\hosting\templates\hosting\create_virtual_machine.html:59
msgid "CHF/Month" msgid "CHF/Month"
msgstr "CHF/Monat" msgstr "CHF/Monat"
#: .\hosting\templates\hosting\create_virtual_machine.html:61
msgid "Start VM" msgid "Start VM"
msgstr "VM jetzt starten" msgstr "VM jetzt starten"
#: .\hosting\templates\hosting\emails\password_reset_email.html:2
#: .\hosting\templates\hosting\emails\password_reset_email.txt:2
#, python-format #, python-format
msgid "" msgid ""
"You're receiving this email because you requested a password reset for your " "You're receiving this email because you requested a password reset for your "
"user account at %(site_name)s." "user account at %(site_name)s."
msgstr "" msgstr ""
#: .\hosting\templates\hosting\emails\password_reset_email.html:4
#: .\hosting\templates\hosting\emails\password_reset_email.txt:4
msgid "Please go to the following page and choose a new password:" msgid "Please go to the following page and choose a new password:"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\emails\password_reset_email.html:9
#: .\hosting\templates\hosting\emails\password_reset_email.txt:9
msgid "Thanks for using our site!" msgid "Thanks for using our site!"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\emails\password_reset_email.html:11
#: .\hosting\templates\hosting\emails\password_reset_email.txt:11
#, python-format #, python-format
msgid "The %(site_name)s team" msgid "The %(site_name)s team"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\login.html:39
msgid "Don't have an account yet ? " msgid "Don't have an account yet ? "
msgstr "Besitzt du kein Benutzerkonto?" msgstr "Besitzt du kein Benutzerkonto?"
#: .\hosting\templates\hosting\login.html:42
#: .\hosting\templates\hosting\signup.html:17
#: .\hosting\templates\hosting\signup.html:25 .\hosting\views.py:227
msgid "Sign up" msgid "Sign up"
msgstr "Registrieren" msgstr "Registrieren"
#: .\hosting\templates\hosting\login.html:44
msgid "Forgot your password ? " msgid "Forgot your password ? "
msgstr "Passwort vergessen?" msgstr "Passwort vergessen?"
#: .\hosting\templates\hosting\notifications.html:9
msgid "Notifications" msgid "Notifications"
msgstr "Benachrichtigungen" msgstr "Benachrichtigungen"
#: .\hosting\templates\hosting\notifications.html:16
msgid "Unread" msgid "Unread"
msgstr "Ungelesen" msgstr "Ungelesen"
#: .\hosting\templates\hosting\notifications.html:26
msgid "All" msgid "All"
msgstr "Alle" msgstr "Alle"
#: .\hosting\templates\hosting\notifications.html:38
msgid "Unread notifications" msgid "Unread notifications"
msgstr "Ungelesene Benachrichtigungen" msgstr "Ungelesene Benachrichtigungen"
#: .\hosting\templates\hosting\notifications.html:48
msgid "Mark as read" msgid "Mark as read"
msgstr "Als gelesen markieren" msgstr "Als gelesen markieren"
#: .\hosting\templates\hosting\notifications.html:59
msgid "All notifications" msgid "All notifications"
msgstr "Alle Benachrichtigungen" msgstr "Alle Benachrichtigungen"
#: .\hosting\templates\hosting\order_detail.html:23
msgid "Confirm Order" msgid "Confirm Order"
msgstr "Bestellung Bestätigen" msgstr "Bestellung Bestätigen"
#: .\hosting\templates\hosting\order_detail.html:29
#: .\hosting\templates\hosting\orders.html:17
msgid "Date" msgid "Date"
msgstr "Datum" msgstr "Datum"
#: .\hosting\templates\hosting\order_detail.html:31
msgid "Status:" msgid "Status:"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\order_detail.html:41
msgid "Billed To:" msgid "Billed To:"
msgstr "Rechnungsadresse" msgstr "Rechnungsadresse"
#: .\hosting\templates\hosting\order_detail.html:52
msgid "Payment Method:" msgid "Payment Method:"
msgstr "Bezahlmethode" msgstr "Bezahlmethode"
#: .\hosting\templates\hosting\order_detail.html:63
msgid "Order summary" msgid "Order summary"
msgstr "Bestellungsübersicht" msgstr "Bestellungsübersicht"
#: .\hosting\templates\hosting\order_detail.html:66
#: .\hosting\templates\hosting\payment.html:13
#: .\hosting\templates\hosting\virtual_machine_detail.html:76
msgid "Cores" msgid "Cores"
msgstr "Prozessorkerne" msgstr "Prozessorkerne"
#: .\hosting\templates\hosting\order_detail.html:68
#: .\hosting\templates\hosting\payment.html:16
#: .\hosting\templates\hosting\virtual_machine_detail.html:82
msgid "Memory" msgid "Memory"
msgstr "Arbeitsspeicher" msgstr "Arbeitsspeicher"
#: .\hosting\templates\hosting\order_detail.html:70
#: .\hosting\templates\hosting\payment.html:19
msgid "Disk space" msgid "Disk space"
msgstr "Festplattenkapazität" msgstr "Festplattenkapazität"
#: .\hosting\templates\hosting\order_detail.html:72
#: .\hosting\templates\hosting\payment.html:41
msgid "Total" msgid "Total"
msgstr "Gesamt" msgstr "Gesamt"
#: .\hosting\templates\hosting\order_detail.html:78
msgid "Finish Configuration" msgid "Finish Configuration"
msgstr "Konfiguration beenden" msgstr "Konfiguration beenden"
#: .\hosting\templates\hosting\orders.html:18
msgid "Amount" msgid "Amount"
msgstr "Betrag" msgstr "Betrag"
#: .\hosting\templates\hosting\orders.html:19
#: .\hosting\templates\hosting\virtual_machine_detail.html:30
#: .\hosting\templates\hosting\virtual_machines.html:31
msgid "Status" msgid "Status"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\orders.html:30
msgid "Approved" msgid "Approved"
msgstr "Akzeptiert" msgstr "Akzeptiert"
#: .\hosting\templates\hosting\orders.html:32
msgid "Declined" msgid "Declined"
msgstr "Abgelehnt" msgstr "Abgelehnt"
#: .\hosting\templates\hosting\orders.html:37
#: .\hosting\templates\hosting\virtual_machines.html:58
msgid "View Detail" msgid "View Detail"
msgstr "Details anzeigen" msgstr "Details anzeigen"
#: .\hosting\templates\hosting\orders.html:40
msgid "Cancel Order" msgid "Cancel Order"
msgstr "Bestellung stornieren" msgstr "Bestellung stornieren"
#: .\hosting\templates\hosting\orders.html:55 #, fuzzy
msgid "Do You want to delete your order?" #| msgid "Do You want to delete your order?"
msgid "Do you want to delete your order?"
msgstr "Willst du deine Bestellung löschen?" msgstr "Willst du deine Bestellung löschen?"
#: .\hosting\templates\hosting\orders.html:63
#: .\hosting\templates\hosting\user_keys.html:59
#: .\hosting\templates\hosting\user_keys.html:89
msgid "Close"
msgstr "Schliessen"
#: .\hosting\templates\hosting\orders.html:65
#: .\hosting\templates\hosting\user_keys.html:40
#: .\hosting\templates\hosting\user_keys.html:61
msgid "Delete" msgid "Delete"
msgstr "Löschen" msgstr "Löschen"
#: .\hosting\templates\hosting\payment.html:10
msgid "Your Order" msgid "Your Order"
msgstr "Deine Bestellung" msgstr "Deine Bestellung"
#: .\hosting\templates\hosting\payment.html:22
#: .\hosting\templates\hosting\virtual_machine_detail.html:98
msgid "Configuration" msgid "Configuration"
msgstr "Konfiguration" msgstr "Konfiguration"
#: .\hosting\templates\hosting\payment.html:41
msgid "including VAT" msgid "including VAT"
msgstr "inkl. Mehrwertsteuer" msgstr "inkl. Mehrwertsteuer"
#: .\hosting\templates\hosting\payment.html:55
msgid "Billing Address" msgid "Billing Address"
msgstr "Rechnungsadresse" msgstr "Rechnungsadresse"
#: .\hosting\templates\hosting\payment.html:66
msgid "Credit Card" msgid "Credit Card"
msgstr "Kreditkarte" msgstr "Kreditkarte"
#: .\hosting\templates\hosting\payment.html:71
msgid "" msgid ""
"\n" "\n"
" Please fill in your credit card information " " Please fill in your credit card information "
@ -424,7 +297,6 @@ msgstr ""
"\"https://stripe.com\" target=\"_blank\">Stripe</a> für die Bezahlung und " "\"https://stripe.com\" target=\"_blank\">Stripe</a> für die Bezahlung und "
"speichern keine Informationen in unserer Datenbank." "speichern keine Informationen in unserer Datenbank."
#: .\hosting\templates\hosting\payment.html:90
msgid "" msgid ""
"\n" "\n"
" You are not making any payment yet. " " You are not making any payment yet. "
@ -438,28 +310,21 @@ msgstr ""
"Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " "Kreditkateninformationen wirst du auf die Bestellbestätigungsseite "
"weitergeleitet." "weitergeleitet."
#: .\hosting\templates\hosting\payment.html:100
#: .\hosting\templates\hosting\payment.html:142
msgid "Submit" msgid "Submit"
msgstr "Absenden" msgstr "Absenden"
#: .\hosting\templates\hosting\payment.html:112
msgid "Card Number" msgid "Card Number"
msgstr "Kreditkartennummer" msgstr "Kreditkartennummer"
#: .\hosting\templates\hosting\payment.html:116
msgid "Expiry Date" msgid "Expiry Date"
msgstr "Ablaufdatum" msgstr "Ablaufdatum"
#: .\hosting\templates\hosting\payment.html:121
msgid "CVC" msgid "CVC"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\payment.html:125
msgid "Card Type" msgid "Card Type"
msgstr "Kartentyp" msgstr "Kartentyp"
#: .\hosting\templates\hosting\payment.html:134
msgid "" msgid ""
"\n" "\n"
" You are not making any payment " " You are not making any payment "
@ -473,40 +338,30 @@ msgstr ""
"Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " "Kreditkateninformationen wirst du auf die Bestellbestätigungsseite "
"weitergeleitet." "weitergeleitet."
#: .\hosting\templates\hosting\payment.html:177
msgid "Processing" msgid "Processing"
msgstr "Weiter" msgstr "Weiter"
#: .\hosting\templates\hosting\payment.html:178
msgid "Enter your credit card number" msgid "Enter your credit card number"
msgstr "Deine Kreditkartennummer" msgstr "Deine Kreditkartennummer"
#: .\hosting\templates\hosting\reset_password.html:20
msgid "Reset your password" msgid "Reset your password"
msgstr "Passwort zurücksetzen" msgstr "Passwort zurücksetzen"
#: .\hosting\templates\hosting\user_key.html:11
msgid "Add your public SSH key" msgid "Add your public SSH key"
msgstr "Füge deinen öffentlichen SSH-Key hinzu" msgstr "Füge deinen öffentlichen SSH-Key hinzu"
#: .\hosting\templates\hosting\user_key.html:25
msgid "Use your created key to access to the VM" msgid "Use your created key to access to the VM"
msgstr "Benutze deinen erstellten SSH-Key um auf deine VM zugreifen zu können" msgstr "Benutze deinen erstellten SSH-Key um auf deine VM zugreifen zu können"
#: .\hosting\templates\hosting\user_key.html:28
#: .\hosting\templates\hosting\user_keys.html:17
msgid "Add SSH Key" msgid "Add SSH Key"
msgstr "Hinzufügen" msgstr "Hinzufügen"
#: .\hosting\templates\hosting\user_key.html:33
msgid "Or you can generate a new key pair" msgid "Or you can generate a new key pair"
msgstr "Erstelle dein neues Keypaar" msgstr "Erstelle dein neues Keypaar"
#: .\hosting\templates\hosting\user_key.html:45
msgid "Warning!" msgid "Warning!"
msgstr "Achtung!" msgstr "Achtung!"
#: .\hosting\templates\hosting\user_key.html:45
#, fuzzy #, fuzzy
#| msgid "You can download your SSH private key once. Don't lost your key" #| msgid "You can download your SSH private key once. Don't lost your key"
msgid "You can download your SSH private key once. Don't loose your key" msgid "You can download your SSH private key once. Don't loose your key"
@ -514,110 +369,84 @@ msgstr ""
"Du kannst deinen privaten SSH Schlüssel nur einmal herunterladen. Beware ihn " "Du kannst deinen privaten SSH Schlüssel nur einmal herunterladen. Beware ihn "
"sicher auf." "sicher auf."
#: .\hosting\templates\hosting\user_keys.html:6
msgid "Your SSH Keys" msgid "Your SSH Keys"
msgstr "Deine SSH Keys" msgstr "Deine SSH Keys"
#: .\hosting\templates\hosting\user_keys.html:15
msgid "" msgid ""
"To generate a new key pair or to upload your existing key, click 'Add Key'" "To generate a new key pair or to upload your existing key, click 'Add Key'"
msgstr "" msgstr ""
"Um einen neuen SSH-Key zu erstellen oder um einen vorhandenen SSH-Key " "Um einen neuen SSH-Key zu erstellen oder um einen vorhandenen SSH-Key "
"hinzuzufügen, klicke auf 'Hinzufügen'" "hinzuzufügen, klicke auf 'Hinzufügen'"
#: .\hosting\templates\hosting\user_keys.html:26
msgid "Delete Key" msgid "Delete Key"
msgstr "Löschen" msgstr "Löschen"
#: .\hosting\templates\hosting\user_keys.html:27
msgid "Public Key" msgid "Public Key"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\user_keys.html:28
msgid "Private Key" msgid "Private Key"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\user_keys.html:53
msgid "Do You want to delete this key?" msgid "Do You want to delete this key?"
msgstr "Möchtest Du den Schlüssel löschen?" msgstr "Möchtest Du den Schlüssel löschen?"
#: .\hosting\templates\hosting\user_keys.html:72 msgid "Close"
msgstr "Schliessen"
msgid "Show" msgid "Show"
msgstr "Anzeigen" msgstr "Anzeigen"
#: .\hosting\templates\hosting\user_keys.html:82
msgid "Public ssh key" msgid "Public ssh key"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\user_keys.html:103
msgid "Download" msgid "Download"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\virtual_machine_detail.html:19
msgid "Settings" msgid "Settings"
msgstr "Einstellungen" msgstr "Einstellungen"
#: .\hosting\templates\hosting\virtual_machine_detail.html:25
msgid "Billing" msgid "Billing"
msgstr "Abrechnungen" msgstr "Abrechnungen"
#: .\hosting\templates\hosting\virtual_machine_detail.html:60
msgid "Ip not assigned yet" msgid "Ip not assigned yet"
msgstr "Ip nicht zugewiesen" msgstr "Ip nicht zugewiesen"
#: .\hosting\templates\hosting\virtual_machine_detail.html:89
msgid "Disk" msgid "Disk"
msgstr "Festplatte" msgstr "Festplatte"
#: .\hosting\templates\hosting\virtual_machine_detail.html:108
msgid "Current pricing" msgid "Current pricing"
msgstr "Aktueller Preis" msgstr "Aktueller Preis"
#: .\hosting\templates\hosting\virtual_machine_detail.html:117
msgid "Current status" msgid "Current status"
msgstr "Aktueller Status" msgstr "Aktueller Status"
#: .\hosting\templates\hosting\virtual_machine_detail.html:142
msgid "Terminate Virtual Machine" msgid "Terminate Virtual Machine"
msgstr "Virtuelle Maschine beenden" msgstr "Virtuelle Maschine beenden"
#: .\hosting\templates\hosting\virtual_machine_detail.html:163
msgid "Terminate your Virtual Machine" msgid "Terminate your Virtual Machine"
msgstr "Ihre virtuelle Maschine beenden" msgstr "Ihre virtuelle Maschine beenden"
#: .\hosting\templates\hosting\virtual_machine_detail.html:166
msgid "Are you sure do you want to cancel your Virtual Machine " msgid "Are you sure do you want to cancel your Virtual Machine "
msgstr "Sind Sie sicher, dass Sie ihre virtuelle Maschine beenden wollen " msgstr "Sind Sie sicher, dass Sie ihre virtuelle Maschine beenden wollen "
#: .\hosting\templates\hosting\virtual_machine_detail.html:169
msgid "Cancel"
msgstr "Beenden"
#: .\hosting\templates\hosting\virtual_machines.html:9
msgid "Virtual Machines" msgid "Virtual Machines"
msgstr "Virtuelle Maschinen" msgstr "Virtuelle Maschinen"
#: .\hosting\templates\hosting\virtual_machines.html:22
msgid "Create VM" msgid "Create VM"
msgstr "Neue VM" msgstr "Neue VM"
#: .\hosting\templates\hosting\virtual_machines.html:28
msgid "ID" msgid "ID"
msgstr "" msgstr ""
#: .\hosting\templates\hosting\virtual_machines.html:29
msgid "Ipv4" msgid "Ipv4"
msgstr "IPv4" msgstr "IPv4"
#: .\hosting\templates\hosting\virtual_machines.html:30
msgid "Ipv6" msgid "Ipv6"
msgstr "IPv6" msgstr "IPv6"
#: .\hosting\views.py:214 .\hosting\views.py:238
msgid "login" msgid "login"
msgstr "einloggen" msgstr "einloggen"
#: .\hosting\views.py:220
msgid "" msgid ""
"Thank you for signing up. We have sent an email to you. Please follow the " "Thank you for signing up. We have sent an email to you. Please follow the "
"instructions in it to activate your account. Once activated, you can login " "instructions in it to activate your account. Once activated, you can login "
@ -627,32 +456,29 @@ msgstr ""
"den Anweisungen um deinen Account zu aktivieren. Danach kannst du dich über " "den Anweisungen um deinen Account zu aktivieren. Danach kannst du dich über "
"diesen" "diesen"
#: .\hosting\views.py:222 .\hosting\views.py:251
msgid "Go back to" msgid "Go back to"
msgstr "Zurück" msgstr "Zurück"
#: .\hosting\views.py:239
msgid "Account activation" msgid "Account activation"
msgstr "Accountaktivierung" msgstr "Accountaktivierung"
#: .\hosting\views.py:243
msgid "Your account has been activated." msgid "Your account has been activated."
msgstr "Dein Account wurde aktiviert." msgstr "Dein Account wurde aktiviert."
#: .\hosting\views.py:244
msgid "You can now" msgid "You can now"
msgstr "Du kannst dich nun" msgstr "Du kannst dich nun"
#: .\hosting\views.py:250
msgid "Sorry. Your request is invalid." msgid "Sorry. Your request is invalid."
msgstr "Entschuldigung, deine Anfrage ist ungültig." msgstr "Entschuldigung, deine Anfrage ist ungültig."
#: .\hosting\views.py:796
msgid "" msgid ""
"We could not find the requested VM. Please " "We could not find the requested VM. Please "
"contact Data Center Light Support." "contact Data Center Light Support."
msgstr "" msgstr ""
#~ msgid "Cancel"
#~ msgstr "Beenden"
#~ msgid "Add SSH key" #~ msgid "Add SSH key"
#~ msgstr "Hinzufügen" #~ msgstr "Hinzufügen"

File diff suppressed because one or more lines are too long

View file

@ -85,7 +85,7 @@
<ul id="g-account-menu" class="dropdown-menu" role="menu"> <ul id="g-account-menu" class="dropdown-menu" role="menu">
<li> <li>
<a href="{% url 'hosting:ssh_keys' %}"> <a href="{% url 'hosting:ssh_keys' %}">
<i class="fa fa-key"></i> SSH Keys <i class="fa fa-key"></i> {% trans "SSH Keys" %}
</a> </a>
</li> </li>
<li> <li>

View file

@ -53,11 +53,9 @@
window.onload = function () { window.onload = function () {
{% for user_key in keys %} {% for user_key in keys %}
// var locale_date = new Date(document.getElementById("ssh-created_at-{{user_key.id}}").textContent).toISOString();
var locale_date = moment.utc(document.getElementById("ssh-created_at-{{user_key.id}}").textContent,'YYYY-MM-DD HH:mm').toDate(); var locale_date = moment.utc(document.getElementById("ssh-created_at-{{user_key.id}}").textContent,'YYYY-MM-DD HH:mm').toDate();
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a"); locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
document.getElementById('ssh-created_at-{{user_key.id}}').innerHTML = locale_date; document.getElementById('ssh-created_at-{{user_key.id}}').innerHTML = locale_date;
{% endfor %} {% endfor %}
}; };