Merge branch 'develop' of github.com:ungleich/dynamicweb into develop
This commit is contained in:
commit
f2ee18deba
37 changed files with 2809 additions and 828 deletions
|
|
@ -4,6 +4,7 @@ from django import forms
|
|||
from membership.models import CustomUser
|
||||
from django.contrib.auth import authenticate
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from utils.stripe_utils import StripeUtils
|
||||
|
||||
|
|
@ -57,21 +58,19 @@ class HostingUserSignupForm(forms.ModelForm):
|
|||
|
||||
|
||||
class UserHostingKeyForm(forms.ModelForm):
|
||||
private_key = forms.CharField(widget=forms.PasswordInput(), required=False)
|
||||
public_key = forms.CharField(widget=forms.PasswordInput(), required=False)
|
||||
user = forms.models.ModelChoiceField(queryset=CustomUser.objects.all(), required=False)
|
||||
name = forms.CharField(required=False)
|
||||
private_key = forms.CharField(widget=forms.HiddenInput(), required=False)
|
||||
public_key = forms.CharField(widget=forms.Textarea(), required=False,
|
||||
help_text=_('Paste here your public key'))
|
||||
user = forms.models.ModelChoiceField(queryset=CustomUser.objects.all(),
|
||||
required=False, widget=forms.HiddenInput())
|
||||
name = forms.CharField(required=True)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.request = kwargs.pop("request")
|
||||
super(UserHostingKeyForm, self).__init__(*args, **kwargs)
|
||||
# self.initial['user'].initial = self.request.user.id
|
||||
# print(self.fields)
|
||||
|
||||
def clean_name(self):
|
||||
return "dcl-priv-key-%s" % (
|
||||
''.join(random.choice(string.ascii_lowercase) for i in range(7))
|
||||
)
|
||||
return self.data.get('name')
|
||||
|
||||
def clean_user(self):
|
||||
return self.request.user
|
||||
|
|
@ -90,4 +89,4 @@ class UserHostingKeyForm(forms.ModelForm):
|
|||
|
||||
class Meta:
|
||||
model = UserHostingKey
|
||||
fields = ['user', 'public_key', 'name']
|
||||
fields = ['user', 'name', 'public_key']
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-17 11:34-0500\n"
|
||||
"POT-Creation-Date: 2017-06-01 21:03+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
@ -18,342 +18,456 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: templates/emails/password_reset_email.html:2
|
||||
#: templates/emails/password_reset_email.txt:2
|
||||
#: hosting/forms.py:63
|
||||
msgid "Paste here your public key"
|
||||
msgstr "Fügen Sie Ihren public key ein"
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:68
|
||||
#: hosting/templates/hosting/base_short.html:139
|
||||
msgid "My Virtual Machines"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:73
|
||||
#: hosting/templates/hosting/base_short.html:145
|
||||
#: hosting/templates/hosting/orders.html:12
|
||||
msgid "My Orders"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:78
|
||||
#: hosting/templates/hosting/base_short.html:152
|
||||
msgid "Keys"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:83
|
||||
#: hosting/templates/hosting/base_short.html:158
|
||||
msgid "Notifications "
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:90
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:95
|
||||
msgid "How it works"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:98
|
||||
msgid "Your infrastructure"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:101
|
||||
msgid "Our inftrastructure"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:104
|
||||
msgid "Pricing"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:107
|
||||
msgid "Contact"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:110
|
||||
#: hosting/templates/hosting/login.html:32
|
||||
#: hosting/templates/hosting/login.html:41
|
||||
#: hosting/templates/hosting/reset_password.html:31
|
||||
#: hosting/templates/hosting/signup.html:30
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/base_short.html:134
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:11
|
||||
#: hosting/templates/hosting/order_detail.html:10
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:11
|
||||
#: hosting/templates/hosting/order_detail.html:10
|
||||
msgid "Order #"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:25
|
||||
msgid "ungleich GmbH"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:26
|
||||
msgid "buchhaltung@ungleich.ch"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:27
|
||||
msgid "Hauptstrasse 14"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:28
|
||||
msgid "CH-8775 Luchsingen"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:29
|
||||
msgid "Mwst-Nummer: CHE-109.549.333 MWST"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:60
|
||||
msgid "Total:"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:68
|
||||
#, python-format
|
||||
msgid "Alles Preise in CHF mit 8%% Mehrwertsteuer."
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:69
|
||||
msgid "Betrag zahlbar innerhalb von 30 Tagen ab Rechnungseingang."
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:70
|
||||
msgid "Kontoverbindung:"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:73
|
||||
msgid "IBAN:"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:76
|
||||
msgid "BIC:"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:81
|
||||
msgid "CH02 0900 0000 6071 8848 8"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bill_detail.html:84
|
||||
msgid "POFICHBEXXX"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bills.html:12
|
||||
msgid "Customers"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bills.html:16
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:42
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bills.html:17
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bills.html:28
|
||||
msgid "View Bill"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bills.html:41
|
||||
#: hosting/templates/hosting/orders.html:83
|
||||
#: hosting/templates/hosting/virtual_machines.html:70
|
||||
msgid "previous"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/bills.html:47
|
||||
#: hosting/templates/hosting/orders.html:89
|
||||
#: hosting/templates/hosting/virtual_machines.html:76
|
||||
msgid "next"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/confirm_reset_password.html:19
|
||||
msgid "Set your new password"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/confirm_reset_password.html:28
|
||||
#: hosting/templates/hosting/reset_password.html:22
|
||||
msgid "Reset"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/confirm_reset_password.html:32
|
||||
#: hosting/templates/hosting/reset_password.html:28
|
||||
#: hosting/templates/hosting/signup.html:27
|
||||
msgid "Already have an account ?"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/confirm_reset_password.html:32
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/create_virtual_machine.html:19
|
||||
msgid "New Virtual Machine"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/create_virtual_machine.html:45
|
||||
msgid "Start VM"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/emails/password_reset_email.html:2
|
||||
#: hosting/templates/hosting/emails/password_reset_email.txt:2
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You're receiving this email because you requested a password reset for your "
|
||||
"user account at %(site_name)s."
|
||||
msgstr ""
|
||||
|
||||
#: templates/emails/password_reset_email.html:4
|
||||
#: templates/emails/password_reset_email.txt:4
|
||||
#: 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:"
|
||||
msgstr ""
|
||||
|
||||
#: templates/emails/password_reset_email.html:9
|
||||
#: templates/emails/password_reset_email.txt:9
|
||||
#: hosting/templates/hosting/emails/password_reset_email.html:9
|
||||
#: hosting/templates/hosting/emails/password_reset_email.txt:9
|
||||
msgid "Thanks for using our site!"
|
||||
msgstr ""
|
||||
|
||||
#: templates/emails/password_reset_email.html:11
|
||||
#: templates/emails/password_reset_email.txt:11
|
||||
#: hosting/templates/hosting/emails/password_reset_email.html:11
|
||||
#: hosting/templates/hosting/emails/password_reset_email.txt:11
|
||||
#, python-format
|
||||
msgid "The %(site_name)s team"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:67
|
||||
msgid "My Virtual Machines"
|
||||
#: hosting/templates/hosting/login.html:10
|
||||
#: hosting/templates/hosting/reset_password.html:10
|
||||
#: hosting/templates/hosting/signup.html:9
|
||||
msgid "Your VM hosted in Switzerland"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:72 templates/hosting/orders.html.py:12
|
||||
msgid "My Orders"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:77
|
||||
msgid "Notifications "
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:84
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:89 templates/hosting/base_short.html:131
|
||||
msgid "How it works"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:92 templates/hosting/base_short.html:134
|
||||
msgid "Your infrastructure"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:95 templates/hosting/base_short.html:137
|
||||
msgid "Our inftrastructure"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:98 templates/hosting/base_short.html:140
|
||||
msgid "Pricing"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:101 templates/hosting/base_short.html:144
|
||||
msgid "Contact"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:104 templates/hosting/login.html.py:29
|
||||
#: templates/hosting/login.html:38 templates/hosting/reset_password.html:24
|
||||
#: templates/hosting/signup.html:24
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/base_short.html:127
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/confirm_reset_password.html:19
|
||||
msgid "Set your new password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/confirm_reset_password.html:28
|
||||
#: templates/hosting/reset_password.html:20
|
||||
msgid "Reset"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/confirm_reset_password.html:32
|
||||
#: templates/hosting/reset_password.html:24 templates/hosting/signup.html:24
|
||||
msgid "Already have an account ?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/confirm_reset_password.html:32
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/login.html:22
|
||||
#: hosting/templates/hosting/login.html:26
|
||||
msgid "You haven been logged out"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/login.html:42
|
||||
#: hosting/templates/hosting/login.html:49
|
||||
msgid "Don't have an account yet ? "
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/login.html:42 templates/hosting/signup.html.py:11
|
||||
#: templates/hosting/signup.html:20
|
||||
#: hosting/templates/hosting/login.html:52
|
||||
#: hosting/templates/hosting/signup.html:13
|
||||
#: hosting/templates/hosting/signup.html:21
|
||||
msgid "Sign up"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/login.html:44
|
||||
#: hosting/templates/hosting/login.html:54
|
||||
msgid "Forgot your password ? "
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/notifications.html:9
|
||||
#: hosting/templates/hosting/notifications.html:9
|
||||
msgid "Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/notifications.html:16
|
||||
#: hosting/templates/hosting/notifications.html:16
|
||||
msgid "Unread"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/notifications.html:26
|
||||
#: hosting/templates/hosting/notifications.html:26
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/notifications.html:38
|
||||
#: hosting/templates/hosting/notifications.html:38
|
||||
msgid "Unread notifications"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/notifications.html:48
|
||||
#: hosting/templates/hosting/notifications.html:48
|
||||
msgid "Mark as read"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/notifications.html:59
|
||||
#: hosting/templates/hosting/notifications.html:59
|
||||
msgid "All notifications"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:10
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:10
|
||||
msgid "Order #"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:16
|
||||
#: templates/hosting/order_detail.html:24
|
||||
#: hosting/templates/hosting/order_detail.html:16
|
||||
#: hosting/templates/hosting/order_detail.html:24
|
||||
msgid "Billed To:"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:26
|
||||
#: hosting/templates/hosting/order_detail.html:26
|
||||
msgid "Status:"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:38
|
||||
#: hosting/templates/hosting/order_detail.html:38
|
||||
msgid "Payment Method:"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:49
|
||||
#: hosting/templates/hosting/order_detail.html:49
|
||||
msgid "Order summary"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:52
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:54
|
||||
#: templates/hosting/virtual_machine_detail.html:96
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:56
|
||||
#: templates/hosting/virtual_machine_detail.html:75
|
||||
#: hosting/templates/hosting/order_detail.html:52
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:75
|
||||
msgid "Cores"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:58
|
||||
#: templates/hosting/virtual_machine_detail.html:81
|
||||
#: hosting/templates/hosting/order_detail.html:54
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:81
|
||||
msgid "Memory"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:60
|
||||
#: hosting/templates/hosting/order_detail.html:56
|
||||
msgid "Disk space"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:62
|
||||
#: hosting/templates/hosting/order_detail.html:58
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/order_detail.html:68
|
||||
#: hosting/templates/hosting/order_detail.html:64
|
||||
msgid "Finish Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:17
|
||||
#: templates/hosting/virtual_machine_detail.html:121
|
||||
#: hosting/templates/hosting/orders.html:17
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:18
|
||||
#: templates/hosting/virtual_machine_detail.html:122
|
||||
#: templates/hosting/virtual_machines.html:15
|
||||
#: hosting/templates/hosting/orders.html:18
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:19
|
||||
#: templates/hosting/virtual_machine_detail.html:36
|
||||
#: templates/hosting/virtual_machine_detail.html:123
|
||||
#: templates/hosting/virtual_machines.html:16
|
||||
#: hosting/templates/hosting/orders.html:19
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:30
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:44
|
||||
#: hosting/templates/hosting/virtual_machines.html:31
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:30
|
||||
#: templates/hosting/virtual_machine_detail.html:134
|
||||
#: hosting/templates/hosting/orders.html:30
|
||||
msgid "Approved"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:32
|
||||
#: templates/hosting/virtual_machine_detail.html:136
|
||||
#: hosting/templates/hosting/orders.html:32
|
||||
msgid "Declined"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:37
|
||||
#: templates/hosting/virtual_machine_detail.html:140
|
||||
#: templates/hosting/virtual_machines.html:38
|
||||
#: hosting/templates/hosting/orders.html:37
|
||||
#: hosting/templates/hosting/virtual_machines.html:58
|
||||
msgid "View Detail"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:41
|
||||
#: hosting/templates/hosting/orders.html:41
|
||||
msgid "Cancel Order"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:56
|
||||
#: hosting/templates/hosting/orders.html:56
|
||||
msgid "Do You want do delete your order?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:64
|
||||
#: hosting/templates/hosting/orders.html:64
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:66
|
||||
#: hosting/templates/hosting/orders.html:66
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:83 templates/hosting/virtual_machines.html:49
|
||||
msgid "previous"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/orders.html:89 templates/hosting/virtual_machines.html:55
|
||||
msgid "next"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/reset_password.html:11
|
||||
#: hosting/templates/hosting/reset_password.html:14
|
||||
msgid "Reset your password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:19
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:19
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:25
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:25
|
||||
msgid "Billing"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:31
|
||||
msgid "Orders"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:60
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:60
|
||||
msgid "Ip not assigned yet"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:87
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:87
|
||||
msgid "Disk"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:106
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:96
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:106
|
||||
msgid "Current pricing"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:152
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:115
|
||||
msgid "Current status"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:172
|
||||
msgid "Cancel Virtual Machine"
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:140
|
||||
msgid "Terminate Virtual Machine"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:181
|
||||
msgid "Cancel your Virtual Machine"
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:161
|
||||
msgid "Terminate your Virtual Machine"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:184
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:164
|
||||
msgid "Are you sure do you want to cancel your Virtual Machine "
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:184
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:164
|
||||
msgid "plan?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_detail.html:187
|
||||
#: hosting/templates/hosting/virtual_machine_detail.html:167
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:10
|
||||
msgid "SSH Private Key"
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:11
|
||||
msgid "Access Key"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:15
|
||||
#: templates/hosting/virtual_machine_key.html:29
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:25
|
||||
msgid "Upload your own key. "
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:29
|
||||
msgid "Or generate a new key pair."
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:31
|
||||
msgid "Generate Key Pair"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:43
|
||||
msgid "Created at"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:66
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:79
|
||||
msgid "Warning!"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:15
|
||||
msgid ""
|
||||
"You can view your SSH private key once. Copy it or if it wasn't downloaded "
|
||||
"automatically, just click on Download to start it."
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:66
|
||||
msgid "You can download your SSH private key once. Don't lost your key"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:24
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:74
|
||||
msgid "Copy to Clipboard"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:25
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:75
|
||||
msgid "Download"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:29
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:79
|
||||
msgid ""
|
||||
"Your SSH private key was already generated and downloaded, if you lost it, "
|
||||
"contact us. "
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machine_key.html:32
|
||||
msgid "Go to my Virtual Machine Dashboard"
|
||||
#: hosting/templates/hosting/virtual_machine_key.html:82
|
||||
msgid "Generate my key"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machines.html:9
|
||||
#: hosting/templates/hosting/virtual_machines.html:9
|
||||
msgid "Virtual Machines"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machines.html:13
|
||||
#: hosting/templates/hosting/virtual_machines.html:22
|
||||
msgid "Create VM"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machines.html:28
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#: templates/hosting/virtual_machines.html:14
|
||||
msgid "Location"
|
||||
#: hosting/templates/hosting/virtual_machines.html:29
|
||||
msgid "Ipv4"
|
||||
msgstr ""
|
||||
|
||||
#: hosting/templates/hosting/virtual_machines.html:30
|
||||
msgid "Ipv6"
|
||||
msgstr ""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.dashboard-container {
|
||||
padding-top:5%; padding-bottom: 11%;
|
||||
padding-top:70px; padding-bottom: 11%;
|
||||
}
|
||||
|
||||
.borderless td {
|
||||
|
|
|
|||
|
|
@ -82,24 +82,25 @@ h6 {
|
|||
text-align: center;
|
||||
color: #f8f8f8;
|
||||
position: relative;
|
||||
padding-bottom: 25%;
|
||||
padding-top: 10%;
|
||||
}
|
||||
|
||||
.intro-login {
|
||||
background: url(../img/login-bg.jpg) no-repeat center center;
|
||||
background: url(../img/intro-bg.jpg) no-repeat center center;
|
||||
background-size: cover;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.intro-signup {
|
||||
background: url(../img/signup-bg.png) no-repeat center center;
|
||||
background: url(../img/intro-bg.jpg) no-repeat center center;
|
||||
background-size: cover;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.intro-reset-password {
|
||||
background: url(../img/signup-bg.png) no-repeat center center;
|
||||
background: url(../img/intro-bg.jpg) no-repeat center center;
|
||||
background-size: cover;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -193,6 +194,128 @@ h6 {
|
|||
float: right;
|
||||
margin-top: 0;
|
||||
}
|
||||
/*------Auth section---------*/
|
||||
.auth-container{
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
.auth-bg{
|
||||
background: url(../img/auth-bg.jpg);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-attachment: fixed;
|
||||
|
||||
}
|
||||
.auth-bg::before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(75, 75, 101, 0.55);
|
||||
z-index: 1;
|
||||
}
|
||||
.auth-container .container{
|
||||
z-index: 1000;
|
||||
}
|
||||
.auth-container .auth-content{
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
max-width: 390px;
|
||||
margin-top: 60px;
|
||||
|
||||
}
|
||||
.auth-container .auth-title{
|
||||
margin-top: 40px;
|
||||
}
|
||||
.auth-container .auth-title h2{
|
||||
color: #fff;
|
||||
font-family: 'Montserrat-Bold';
|
||||
font-size: 44px;
|
||||
text-align: center;
|
||||
width: 425px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.auth-container .auth-title h2::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
background: #fff;
|
||||
height: 7px;
|
||||
width: 70px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
|
||||
.auth-box{
|
||||
background: #fff;
|
||||
padding: 0;
|
||||
padding-bottom: 30px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
|
||||
border-radius: 4px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.auth-box .section-heading{
|
||||
color: #5a5a5a;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 5px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 3px;
|
||||
font-size: 20px;
|
||||
border-radius: 3px 3px 0px 0px;
|
||||
margin: 0 auto;
|
||||
font-family: 'Montserrat-Medium';
|
||||
}
|
||||
.auth-box .form{
|
||||
padding: 20px;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.auth-box .form .red{
|
||||
color: #ea3a3a;
|
||||
}
|
||||
.auth-box .form .btn{
|
||||
box-shadow: 0 0px 9px rgba(0,0,0,0.19), 0 3px 5px rgba(0,0,0,0.23);
|
||||
letter-spacing: 3px;
|
||||
font-size: 17px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.auth-box .form .form-control{
|
||||
height: 44px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.auth-box .auth-footer {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
.auth-box .auth-footer .text{
|
||||
color: #777;
|
||||
}
|
||||
.auth-box .auth-footer .links a{
|
||||
color: #1e94cc;
|
||||
}
|
||||
.auth-box .auth-footer .links a:hover{
|
||||
color: #1e94cc;
|
||||
}
|
||||
|
||||
.auth-box.sign-up{
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.auth-box.sign-up .form{
|
||||
padding: 15px 20px 0 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
ul.banner-social-buttons {
|
||||
|
|
@ -218,7 +341,17 @@ h6 {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 540px) {
|
||||
.auth-container .auth-title h2{
|
||||
font-size: 32px;
|
||||
width: 90%;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.auth-box .form {
|
||||
padding: 15px;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
footer {
|
||||
padding: 2%;
|
||||
background-color: #f8f8f8;
|
||||
|
|
@ -250,4 +383,5 @@ a.unlink {
|
|||
|
||||
a.unlink:hover {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.order-detail-container {padding-top:5%; padding-bottom: 11%;}
|
||||
.order-detail-container {padding-top: 70px; padding-bottom: 11%;}
|
||||
|
||||
.order-detail-container .invoice-title h2, .invoice-title h3 {
|
||||
display: inline-block;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.orders-container {padding-top:5%; padding-bottom: 11%;}
|
||||
.orders-container {padding-top:70px; padding-bottom: 11%;}
|
||||
|
||||
.orders-container .table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.payment-container {padding-top:5%; padding-bottom: 11%;}
|
||||
.payment-container {padding-top:70px; padding-bottom: 11%;}
|
||||
.creditcard-box .panel-title {display: inline;font-weight: bold; font-size:17px;}
|
||||
.creditcard-box .checkbox.pull-right { margin: 0; }
|
||||
.creditcard-box .pl-ziro { padding-left: 0px; }
|
||||
|
|
|
|||
BIN
hosting/static/hosting/img/auth-bg.jpg
Normal file
BIN
hosting/static/hosting/img/auth-bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 685 KiB |
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
|
||||
<!-- Navigation -->
|
||||
{% if request.user.is_authenticated %}
|
||||
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
|
||||
<div class="container topnav">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
|
|
@ -61,7 +62,7 @@
|
|||
<ul class="nav navbar-nav navbar-right">
|
||||
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
|
||||
<li>
|
||||
<a href="{% url 'hosting:virtual_machines' %}">
|
||||
<i class="fa fa-server" aria-hidden="true"></i> {% trans "My Virtual Machines"%}
|
||||
|
|
@ -72,11 +73,7 @@
|
|||
<i class="fa fa-credit-card"></i> {% trans "My Orders"%}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:key_pair' %}">
|
||||
<i class="fa fa-key" aria-hidden="true"></i> {% trans "Keys"%}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{% url 'hosting:notifications' %}">
|
||||
<i class="fa fa-bell"></i> {% trans "Notifications "%}
|
||||
|
|
@ -87,9 +84,14 @@
|
|||
<i class="glyphicon glyphicon-user"></i> {{request.user.name}} <span class="caret"></span></a>
|
||||
<ul id="g-account-menu" class="dropdown-menu" role="menu">
|
||||
<li><a href="{% url 'hosting:logout' %}"><i class="glyphicon glyphicon-lock"></i>{% trans "Logout"%} </a></li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:key_pair' %}">
|
||||
<i class="fa fa-key"></i> {% trans "Keys"%}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<!--
|
||||
<li>
|
||||
<a href="{{ request.session.hosting_url}}#how">{% trans "How it works"%}</a>
|
||||
</li>
|
||||
|
|
@ -107,8 +109,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:login' %}?next={{request.current_path}}">{% trans "Login"%}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
|
|
@ -116,6 +117,7 @@
|
|||
<!-- /.container -->
|
||||
</nav>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<!-- Header -->
|
||||
<a name="about"></a>
|
||||
|
|
@ -123,6 +125,7 @@
|
|||
{% endblock %}
|
||||
|
||||
<!-- Footer -->
|
||||
{% if request.user.is_authenticated %}
|
||||
<footer class="navbar-fixed-bottom">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
|
@ -133,20 +136,28 @@
|
|||
</li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{{ request.session.hosting_url}}#how">{% trans "How it works"%}</a>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{{ request.session.hosting_url }}#your">{% trans "Your infrastructure"%}</a></li>
|
||||
<li>⋅</li>
|
||||
<li>
|
||||
<a href="{{ request.session.hosting_url }}#our">{% trans "Our inftrastructure"%}</a></li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{{ request.session.hosting_url }}#services">{% trans "Pricing"%}</a>
|
||||
<a href="{% url 'hosting:virtual_machines' %}">
|
||||
{% trans "My Virtual Machines"%}
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{{ request.session.hosting_url }}#contact">{% trans "Contact"%}</a>
|
||||
<a href="{% url 'hosting:orders' %}">
|
||||
{% trans "My Orders"%}
|
||||
</a>
|
||||
</li>
|
||||
<li>⋅</li>
|
||||
<li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:key_pair' %}">
|
||||
{% trans "Keys"%}
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:notifications' %}">
|
||||
{% trans "Notifications "%}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -155,7 +166,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% endif %}
|
||||
<!-- jQuery -->
|
||||
<script src="{% static 'hosting/js/jquery.js' %}"></script>
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.validation/1.13.1/jquery.validate.min.js"></script>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,16 @@
|
|||
{% load staticfiles bootstrap3%}
|
||||
{% block content %}
|
||||
|
||||
<div class="intro-auth intro-login">
|
||||
<div class="auth-container">
|
||||
<div class="auth-bg"></div>
|
||||
<div class="container">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
|
||||
<div class="auth-title">
|
||||
<h2>{% trans "Your VM hosted in Switzerland"%}</h2>
|
||||
</div>
|
||||
<div class="auth-content">
|
||||
|
||||
{% if messages %}
|
||||
<ul class="list-unstyled">
|
||||
<ul class="list-unstyled" style="color: #fff">
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
|
|
@ -23,31 +27,33 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
<div class="intro-message">
|
||||
|
||||
<div class="intro-message auth-box">
|
||||
<h2 class="section-heading">{% trans "Login"%}</h2>
|
||||
<form action="{% url 'hosting:login' %}" method="post" class="form" novalidated>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
{% bootstrap_field field show_label=False type='fields'%}
|
||||
{% endfor %}
|
||||
<p>{{form.non_field_errors|striptags}}</p>
|
||||
<p class="red">{{form.non_field_errors|striptags}}</p>
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-default">
|
||||
<button type="submit" class="btn btn-block btn-success">
|
||||
{% trans "Login"%}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
|
||||
<input type='hidden' name='next' value='{{request.GET.next}}'/>
|
||||
</form>
|
||||
<span>{% trans "Don't have an account yet ? "%}<a class="unlink" href="{% url 'hosting:signup' %}">{% trans "Sign up"%}</a></span>
|
||||
<br/>
|
||||
<span> <a class="unlink" href="{% url 'hosting:reset_password' %}">{% trans "Forgot your password ? "%}</a></span>
|
||||
|
||||
<ul class="list-inline intro-social-buttons">
|
||||
|
||||
</ul>
|
||||
<div class="auth-footer">
|
||||
<div class="text">
|
||||
<span>{% trans "Don't have an account yet ? "%}</span>
|
||||
</div>
|
||||
<div class="links">
|
||||
<a class="unlink" href="{% url 'hosting:signup' %}">{% trans "Sign up"%}</a>
|
||||
<span class="text"> or </span>
|
||||
<a class="unlink" href="{% url 'hosting:reset_password' %}">{% trans "Forgot your password ? "%}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,29 +3,36 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="intro-auth intro-reset-password">
|
||||
<div class="container">
|
||||
<div class="col-md-4"> </div>
|
||||
<div class="col-md-4">
|
||||
<div class="intro-message">
|
||||
<div class="auth-container">
|
||||
<div class="auth-bg"></div>
|
||||
<div class="container">
|
||||
<div class="auth-title">
|
||||
<h2>{% trans "Your VM hosted in Switzerland"%}</h2>
|
||||
</div>
|
||||
<div class="auth-content">
|
||||
<div class="intro-message auth-box sign-up">
|
||||
<h2 class="section-heading">{% trans "Reset your password"%}</h2>
|
||||
|
||||
<form action="{% url 'hosting:reset_password' %}" method="post" class="form" novalidate>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
{% bootstrap_field field show_label=False %}
|
||||
{% endfor %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-default">
|
||||
<button type="submit" class="btn btn-block btn-success">
|
||||
{% trans "Reset"%}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
</form>
|
||||
<span>{% trans "Already have an account ?"%} <a class="unlink" href="{% url 'hosting:login' %}">{% trans "Login"%} </a></span>
|
||||
<ul class="list-inline intro-social-buttons">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auth-footer">
|
||||
<div class="text">
|
||||
<span>{% trans "Already have an account ?"%}</span>
|
||||
</div>
|
||||
<div class="links">
|
||||
<a class="unlink" href="{% url 'hosting:login' %}">{% trans "Login"%}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -2,29 +2,36 @@
|
|||
{% load staticfiles bootstrap3 i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="intro-auth intro-signup">
|
||||
<div class="container">
|
||||
<div class="col-md-4 col-sm-4 col-xs-4"> </div>
|
||||
<div class="col-md-4 col-sm-6 col-xs-6">
|
||||
<div class="intro-message">
|
||||
<div class="auth-container">
|
||||
<div class="auth-bg"></div>
|
||||
<div class="container">
|
||||
<div class="auth-title">
|
||||
<h2>{% trans "Your VM hosted in Switzerland"%}</h2>
|
||||
</div>
|
||||
<div class="auth-content">
|
||||
<div class="intro-message auth-box sign-up">
|
||||
<h2 class="section-heading">{% trans "Sign up"%}</h2>
|
||||
|
||||
<form action="{% url 'hosting:signup' %}" method="post" class="form" novalidate>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
{% bootstrap_field field show_label=False %}
|
||||
{% endfor %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-default">
|
||||
<button type="submit" class="btn btn-block btn-info">
|
||||
{% trans "Sign up"%}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
</form>
|
||||
<span>{% trans "Already have an account ?"%} <a class="unlink" href="{% url 'hosting:login' %}">{% trans "Login"%}</a></span>
|
||||
<ul class="list-inline intro-social-buttons">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auth-footer">
|
||||
<div class="text">
|
||||
<span>{% trans "Already have an account ?"%}</span>
|
||||
</div>
|
||||
<div class="links">
|
||||
<a class="unlink" href="{% url 'hosting:login' %}">{% trans "Login"%}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-9 col-md-offset-2">
|
||||
<div class="col-sm-12">
|
||||
<form method="POST" action="" >
|
||||
<form method="POST" action="" novalidate>
|
||||
{% csrf_token %}
|
||||
<h3><i class="fa fa-key" aria-hidden="true"></i>{% trans "Access Key"%} </h3>
|
||||
{% if messages %}
|
||||
|
|
@ -15,28 +15,25 @@
|
|||
<span>{{ message }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<hr/>
|
||||
{% if not user_key %}
|
||||
<h3>
|
||||
{% endif %}
|
||||
{% for field in form %}
|
||||
|
||||
{% bootstrap_field field %}
|
||||
{% endfor %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-success">
|
||||
{% trans "Upload your own key. "%}
|
||||
</h3>
|
||||
<div class="form-group">
|
||||
<label for="comment">Paste here your public key</label>
|
||||
<textarea class="form-control" rows="6" name="public_key"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-success">{% trans "Upload Key"%} </a>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
{% trans "Or generate a new key pair."%}
|
||||
|
||||
</h3>
|
||||
<div class="form-group">
|
||||
</button>
|
||||
<br />
|
||||
<br />
|
||||
{% trans "Or generate a new key pair."%} <br />
|
||||
<br />
|
||||
<button class="btn btn-success">{% trans "Generate Key Pair"%} </a>
|
||||
</button>
|
||||
|
||||
{% endbuttons %}
|
||||
<div class="form-group">
|
||||
</div>
|
||||
{% else %}
|
||||
<h5> Use your created key to access to the machine. If you lost it, contact us. </h5>
|
||||
<table class="table borderless table-hover">
|
||||
<br/>
|
||||
|
|
@ -49,6 +46,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user_key in keys %}
|
||||
<tr>
|
||||
<td scope="row">{{user_key.name}}</td>
|
||||
<td>{{user_key.created_at}}</td>
|
||||
|
|
@ -57,9 +55,9 @@
|
|||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
{% if private_key %}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
|
||||
test_user_can_add_key()
|
||||
|
|
|
|||
|
|
@ -301,16 +301,12 @@ class GenerateVMSSHKeysView(LoginRequiredMixin, FormView):
|
|||
self
|
||||
).get_context_data(**kwargs)
|
||||
|
||||
try:
|
||||
user_key = UserHostingKey.objects.get(
|
||||
user=self.request.user
|
||||
)
|
||||
|
||||
except UserHostingKey.DoesNotExist:
|
||||
user_key = None
|
||||
user_keys = UserHostingKey.objects.filter(
|
||||
user=self.request.user
|
||||
)
|
||||
|
||||
context.update({
|
||||
'user_key': user_key
|
||||
'keys': user_keys
|
||||
})
|
||||
|
||||
return context
|
||||
|
|
@ -351,24 +347,14 @@ class GenerateVMSSHKeysView(LoginRequiredMixin, FormView):
|
|||
opennebula_user = user_pool.get_by_name(owner.email)
|
||||
|
||||
# Get user ssh key
|
||||
user_key = UserHostingKey.objects.get(user=owner)
|
||||
public_key = form.cleaned_data.get('public_key')
|
||||
# Add ssh key to user
|
||||
manager.oneadmin_client.call('user.update', opennebula_user.id,
|
||||
'<CONTEXT><SSH_PUBLIC_KEY>{ssh_key}</SSH_PUBLIC_KEY></CONTEXT>'.format(ssh_key=user_key.public_key))
|
||||
'<CONTEXT><SSH_PUBLIC_KEY>{key}</SSH_PUBLIC_KEY></CONTEXT>'.format(key=public_key))
|
||||
|
||||
return render(self.request, self.template_name, context)
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
|
||||
try:
|
||||
UserHostingKey.objects.get(
|
||||
user=self.request.user
|
||||
)
|
||||
return HttpResponseRedirect(reverse('hosting:key_pair'))
|
||||
|
||||
except UserHostingKey.DoesNotExist:
|
||||
pass
|
||||
|
||||
form = self.get_form()
|
||||
if form.is_valid():
|
||||
return self.form_valid(form)
|
||||
|
|
@ -421,11 +407,7 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
|||
return context
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
try:
|
||||
UserHostingKey.objects.get(
|
||||
user=self.request.user
|
||||
)
|
||||
except UserHostingKey.DoesNotExist:
|
||||
if not UserHostingKey.objects.filter( user=self.request.user).exists():
|
||||
messages.success(
|
||||
request,
|
||||
'In order to create a VM, you create/upload your SSH KEY first.'
|
||||
|
|
@ -487,14 +469,16 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
|||
manager = OpenNebulaManager(email=owner.email,
|
||||
password=owner.password)
|
||||
# Get user ssh key
|
||||
try:
|
||||
user_key = UserHostingKey.objects.get(
|
||||
user=self.request.user
|
||||
)
|
||||
|
||||
except UserHostingKey.DoesNotExist:
|
||||
pass
|
||||
|
||||
if not UserHostingKey.objects.filter( user=self.request.user).exists():
|
||||
context.update({
|
||||
'sshError': 'error',
|
||||
'form': form
|
||||
})
|
||||
return render(request, self.template_name, context)
|
||||
# For now just get first one
|
||||
user_key = UserHostingKey.objects.filter(
|
||||
user=self.request.user).first()
|
||||
|
||||
# Create a vm using logged user
|
||||
vm_id = manager.create_vm(
|
||||
template_id=vm_template_id,
|
||||
|
|
@ -639,11 +623,7 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View):
|
|||
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
||||
try:
|
||||
UserHostingKey.objects.get(
|
||||
user=self.request.user
|
||||
)
|
||||
except UserHostingKey.DoesNotExist:
|
||||
if not UserHostingKey.objects.filter( user=self.request.user).exists():
|
||||
messages.success(
|
||||
request,
|
||||
'In order to create a VM, you need to create/upload your SSH KEY first.'
|
||||
|
|
@ -667,7 +647,7 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View):
|
|||
)
|
||||
context = {
|
||||
'error': 'connection'
|
||||
}
|
||||
}
|
||||
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue