diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 3cc30292..2aa516d5 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-16 04:19+0530\n" +"POT-Creation-Date: 2017-08-20 00:22+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -399,38 +399,76 @@ msgstr "Möchtest Du den Schlüssel löschen?" msgid "Show" msgstr "Anzeigen" -msgid "Public SSH Key" +#, fuzzy +#| msgid "Public SSH Key" +msgid "Public SSH key" msgstr "Public SSH Key" msgid "Download" msgstr "" -msgid "Settings" -msgstr "Einstellungen" +msgid "Your Virtual Machine Detail" +msgstr "Virtuelle Maschinen Detail" -msgid "Billing" -msgstr "Abrechnungen" +msgid "VM Settings" +msgstr "VM Einstellungen" -msgid "Ip not assigned yet" -msgstr "Ip nicht zugewiesen" +msgid "Copied" +msgstr "Kopiert" msgid "Disk" msgstr "Festplatte" -msgid "Current pricing" +msgid "Billing" +msgstr "Abrechnungen" + +msgid "Current Pricing" msgstr "Aktueller Preis" -msgid "Current status" -msgstr "Aktueller Status" +msgid "Month" +msgstr "Monat" -msgid "Terminate Virtual Machine" -msgstr "Virtuelle Maschine beenden" +msgid "See Invoice" +msgstr "Rechnung" + +msgid "Your VM is" +msgstr "Deine VM ist" + +msgid "Pending" +msgstr "In Vorbereitung" + +msgid "Online" +msgstr "" + +msgid "Failed" +msgstr "Fehlgeschlagen" + +msgid "Terminate VM" +msgstr "VM Beenden" + +msgid "Support / Contact" +msgstr "Support / Kontakt" + +msgid "Something doesn't work?" +msgstr "Etwas funktioniert nicht?" + +msgid "We are here to help you!" +msgstr "Wir sind hier, um Dir zu helfen!" + +msgid "CONTACT" +msgstr "KONTACT" + +msgid "BACK TO LIST" +msgstr "ZURÜCK ZUR LISTE" msgid "Terminate your Virtual Machine" msgstr "Ihre virtuelle Maschine beenden" -msgid "Are you sure do you want to cancel your Virtual Machine " -msgstr "Sind Sie sicher, dass Sie ihre virtuelle Maschine beenden wollen " +msgid "Do you want to cancel your Virtual Machine" +msgstr "Bist Du sicher, dass Du Deine virtuelle Maschine beenden willst" + +msgid "OK" +msgstr "" msgid "Virtual Machines" msgstr "Virtuelle Maschinen" @@ -482,6 +520,15 @@ msgid "" "contact Data Center Light Support." msgstr "" +#~ msgid "Ip not assigned yet" +#~ msgstr "Ip nicht zugewiesen" + +#~ msgid "Current status" +#~ msgstr "Aktueller Status" + +#~ msgid "Terminate Virtual Machine" +#~ msgstr "Virtuelle Maschine beenden" + #~ msgid "Ipv4" #~ msgstr "IPv4" diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index 420a9452..c6cc379b 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -1,3 +1,6 @@ +.virtual-machine-container { + max-width: 900px; +} .virtual-machine-container .tabs-left, .virtual-machine-container .tabs-right { border-bottom: none; padding-top: 2px; @@ -229,6 +232,204 @@ } } +/* Vm Details */ + +.vm-detail-item, .vm-contact-us { + overflow: hidden; + border: 1px solid #ccc; + padding: 15px; + color: #555; + font-weight: 300; + margin-bottom: 15px; +} + +.vm-detail-title { + margin-top: 0; + font-size: 20px; + font-weight: 300; +} + +.vm-detail-title .un-icon { + float: right; + height: 24px; + width: 21px; + margin-top: 0; +} + +.vm-detail-item .vm-name { + font-size: 16px; + margin-bottom: 15px; +} + +.vm-detail-item p { + margin-bottom: 5px; + position: relative; +} + +.vm-detail-ip { + padding-bottom: 5px; + border-bottom: 1px solid #ddd; + margin-bottom: 10px; +} + +.vm-detail-ip .un-icon { + height: 14px; + width: 14px; +} + +.vm-detail-ip .to_copy { + position: absolute; + right: 0; + top: 1px; + padding: 0; + line-height: 1; +} + +.vm-vmid { + padding: 50px 0 70px; + text-align: center; +} + +.vm-item-lg { + font-size: 22px; + margin-top: 5px; + margin-bottom: 15px; + letter-spacing: 0.6px; +} + +.vm-color-online { + color: #37B07B; +} + +.vm-color-pending { + color: #e47f2f; +} + +.vm-detail-item .value{ + font-weight: 400; +} + +.vm-detail-config .value { + float: right; + font-weight: 600; +} + +.vm-detail-contain { + margin-top: 25px; +} + +.vm-contact-us { + margin: 25px 0 30px; + /* text-align: center; */ +} + +@media(min-width: 768px) { + .vm-detail-contain { + display: flex; + margin-left: -15px; + margin-right: -15px; + } + .vm-detail-item { + width: 33.333333%; + margin: 0 15px; + } + .vm-contact-us { + display: flex; + align-items: center; + justify-content: space-between; + } + .vm-contact-us .vm-detail-title { + margin-bottom: 0; + } + .vm-contact-us .un-icon { + width: 22px; + height: 22px; + margin-right: 5px; + } + .vm-contact-us div { + padding: 0 15px; + position: relative; + } + .vm-contact-us-text { + display: flex; + align-items: center; + } +} + +.value-sm-block { + display: block; + padding-top: 2px; +} + +@media(max-width: 767px) { + .vm-contact-us div { + margin-bottom: 30px; + } + .vm-contact-us div span { + display: block; + margin-bottom: 3px; + } + .dashboard-title-thin { + font-size: 22px; + } +} + +.btn-vm-invoice { + color: #87B6EA; + border: 2px solid #87B6EA; + padding: 4px 18px; + letter-spacing: 0.6px; +} +.btn-vm-invoice:hover, .btn-vm-invoice:focus { + color : #fff; + background: #87B6EA; +} + + +.btn-vm-term { + color: #aaa; + border: 2px solid #ccc; + background: #fff; + padding: 4px 18px; + letter-spacing: 0.6px; +} +.btn-vm-term:hover, .btn-vm-term:focus, .btn-vm-term:active { + color: #eb4d5c; + border-color: #eb4d5c; +} + +.btn-vm-contact { + color: #fff; + background: #A3C0E2; + border: 2px solid #A3C0E2; + padding: 5px 25px; + font-size: 12px; + letter-spacing: 1.3px; +} +.btn-vm-contact:hover, .btn-vm-contact:focus { + background: #fff; + color: #a3c0e2; +} + +.btn-vm-back { + color: #fff; + background: #C4CEDA; + border: 2px solid #C4CEDA; + padding: 5px 25px; + font-size: 12px; + letter-spacing: 1.3px; +} +.btn-vm-back:hover, .btn-vm-back:focus { + color: #fff; + background: #8da4c0; + border-color: #8da4c0; +} + +.vm-contact-us-text { + letter-spacing: 0.4px; +} + + /* New styles */ .dashboard-container-head { padding: 0 8px; diff --git a/hosting/static/hosting/img/24-hours-support.svg b/hosting/static/hosting/img/24-hours-support.svg new file mode 100644 index 00000000..4db05be3 --- /dev/null +++ b/hosting/static/hosting/img/24-hours-support.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/img/billing.svg b/hosting/static/hosting/img/billing.svg new file mode 100644 index 00000000..d002fa6c --- /dev/null +++ b/hosting/static/hosting/img/billing.svg @@ -0,0 +1 @@ +billing icon \ No newline at end of file diff --git a/hosting/static/hosting/img/connected.svg b/hosting/static/hosting/img/connected.svg new file mode 100644 index 00000000..fa3875dc --- /dev/null +++ b/hosting/static/hosting/img/connected.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/img/settings.svg b/hosting/static/hosting/img/settings.svg new file mode 100644 index 00000000..61dc8613 --- /dev/null +++ b/hosting/static/hosting/img/settings.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/templates/hosting/virtual_machine_detail.html b/hosting/templates/hosting/virtual_machine_detail.html index 1ae26dc0..59a36bdc 100644 --- a/hosting/templates/hosting/virtual_machine_detail.html +++ b/hosting/templates/hosting/virtual_machine_detail.html @@ -3,193 +3,110 @@ {% load i18n %} {% block content %} -
-
-
-
-
-

{{virtual_machine.name}}

-
- - -
- -
-
-
-
-

{{virtual_machine.hosting_company_name}}

- - {% if virtual_machine.ipv6 %} -
- - -
- {% else %} - -
- {% trans "Ip not assigned yet"%} - -
- - {% endif %} - -
- -
-
-
-
-
-
-
- - {% trans "Cores"%} - {{virtual_machine.cores}} -
-
-
-
- {% trans "Memory"%}
- {{virtual_machine.memory}} GB -
-
-
-
- - {% trans "Disk"%} - {{virtual_machine.disk_size|floatformat:2}} GB -
-
-
-
-
-
-
- {% trans "Configuration"%}: {{virtual_machine.configuration}} -
-
- - -
-
- -
-
-

{% trans "Current pricing"%}

- {{virtual_machine.price|floatformat}} CHF/month -
-
-
-
-
-
-
-

{% trans "Current status"%}

- -
- {% if virtual_machine.state == 'PENDING' %} - Pending - {% elif virtual_machine.state == 'ACTIVE' %} - Online - {% elif virtual_machine.state == 'FAILED'%} - Failed - {% endif %} -
-
-
- {% if not virtual_machine.status == 'canceled' %} -
-
-
-
- {% csrf_token %} -
- - - -
- -
-
-
- {% if messages %} -
- {% for message in messages %} - {{ message }} - {% endfor %} -
- {% endif %} -
- - - - -
- {% endif %} -
-
-
- -
+ {% if messages %} +
+ {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} +
+

{% trans "Your Virtual Machine Detail" %}

+
+
+

{% trans "VM Settings" %}

+

{{virtual_machine.name}}

+ {% if virtual_machine.ipv6 %} +
+

+ IPv4: + {{virtual_machine.ipv4}} + +

+

+ IPv6: + {{virtual_machine.ipv6}} + +

+
+ {% endif %} +
+

{% trans "Cores" %}:{{virtual_machine.cores}}

+

{% trans "Memory" %}:{{virtual_machine.memory}} GB

+

{% trans "Disk" %}:{{virtual_machine.disk_size|floatformat:2}} GB

+

{% trans "Configuration" %}:{{virtual_machine.configuration}}

- +
+

{% trans "Billing" %}

+
+
{% trans "Current Pricing" %}
+
{{virtual_machine.price|floatformat}} CHF/{% trans "Month" %}
+ {% trans "See Invoice" %} +
+
+
+

{% trans "Status" %}

+
+
{% trans "Your VM is" %}
+ {% if virtual_machine.state == 'PENDING' %} +
{% trans "Pending" %}
+ {% elif virtual_machine.state == 'ACTIVE' %} +
{% trans "Online" %}
+ {% elif virtual_machine.state == 'FAILED'%} +
{% trans "Failed" %}
+ {% endif %} + {% if not virtual_machine.status == 'canceled' %} +
+ {% csrf_token %} +
+ + {% endif %} +
+
+
+
+
+

{% trans "Support / Contact" %}

+
+
+ +
+ {% trans "Something doesn't work?" %} {% trans "We are here to help you!" %} +
+
+ +
+ +
+ + - -
- + {%endblock%} diff --git a/hosting/urls.py b/hosting/urls.py index ea96af77..23709904 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -20,9 +20,12 @@ urlpatterns = [ url(r'orders/(?P\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'), url(r'bills/?$', HostingBillListView.as_view(), name='bills'), url(r'bills/(?P\d+)/?$', HostingBillDetailView.as_view(), name='bills'), - url(r'cancel_order/(?P\d+)/?$', OrdersHostingDeleteView.as_view(), name='delete_order'), - url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(), name='create_virtual_machine'), - url(r'my-virtual-machines/?$', VirtualMachinesPlanListView.as_view(), name='virtual_machines'), + url(r'cancel_order/(?P\d+)/?$', + OrdersHostingDeleteView.as_view(), name='delete_order'), + url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(), + name='create_virtual_machine'), + url(r'my-virtual-machines/?$', + VirtualMachinesPlanListView.as_view(), name='virtual_machines'), url(r'my-virtual-machines/(?P\d+)/?$', VirtualMachineView.as_view(), name='virtual_machines'), url(r'ssh_keys/?$', SSHKeyListView.as_view(), @@ -44,5 +47,6 @@ urlpatterns = [ PasswordResetConfirmView.as_view(), name='reset_password_confirm'), url(r'^logout/?$', auth_views.logout, {'next_page': '/hosting/login?logged_out=true'}, name='logout'), - url(r'^validate/(?P.*)/$', SignupValidatedView.as_view(), name='validate') + url(r'^validate/(?P.*)/$', + SignupValidatedView.as_view(), name='validate') ] diff --git a/hosting/views.py b/hosting/views.py index 2b4c8d21..9cc78bf9 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -244,7 +244,8 @@ class SignupValidatedView(SignupValidateView): lurl=login_url) else: home_url = 'Data Center Light' + reverse('datacenterlight:index') + \ + '">Data Center Light' message = '{sorry_message}
{go_back_to} {hurl}'.format( sorry_message=_("Sorry. Your request is invalid."), go_back_to=_('Go back to'), @@ -831,6 +832,7 @@ class VirtualMachineView(LoginRequiredMixin, View): serializer = VirtualMachineSerializer(vm) context = { 'virtual_machine': serializer.data, + 'order': HostingOrder.objects.get(vm_id=serializer.data['vm_id']) } except: pass