From e92e3a9527d348a6976d02d32732316fb7cb1d1b Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:02:22 +0530 Subject: [PATCH 01/10] new design for page /my-virtual-machines --- hosting/static/hosting/css/commons.css | 88 ++++++++--- .../static/hosting/css/virtual-machine.css | 143 ++++++++++++++++++ hosting/static/hosting/img/copy.svg | 7 + hosting/static/hosting/img/vm.svg | 7 + .../templates/hosting/virtual_machines.html | 72 ++++++++- 5 files changed, 294 insertions(+), 23 deletions(-) create mode 100644 hosting/static/hosting/img/copy.svg create mode 100644 hosting/static/hosting/img/vm.svg diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 156e1974..1ebae4b4 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -162,29 +162,75 @@ /* ========= */ @media(min-width: 320px) { - .modal:before { - content: ''; - display: inline-block; - height: 100%; - vertical-align: middle; - margin-right: -4px; - } - } + .modal:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + margin-right: -4px; + } +} - @media (min-width: 768px) { - .modal-dialog { +@media (min-width: 768px) { + .modal-dialog { /* width: 520px; */ - margin: 15px auto; - } - } + margin: 15px auto; + } +} - .modal { - text-align: center; - } +.modal { + text-align: center; +} - .modal-dialog { - display: inline-block; - text-align: left; - vertical-align: middle; - } +.modal-dialog { + display: inline-block; + text-align: left; + vertical-align: middle; +} + +.un-icon { + width: 15px; + height: 15px; + opacity: 0.5; + margin-top: -1px; +} + +.css-plus { + position: relative; + width: 16px; + height: 20px; + display: inline-block; + vertical-align: middle; + /* top: -1px; */ +} + +.css-plus + span { + vertical-align: middle; +} + +.css-plus:before { + content: ''; + width: 10px; + height: 2px; + background: #f6f7f9; + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%,-50%); + -ms-transform: translate(-50%,-50%); + transform: translate(-50%,-50%); +} + +.css-plus:after { + content: ''; + width: 2px; + height: 10px; + background: #f6f7f9; + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%,-50%); + -ms-transform: translate(-50%,-50%); + transform: translate(-50%,-50%); +} \ No newline at end of file diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index e043879d..0dd89866 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -227,4 +227,147 @@ .btn-create-vm { float: left !important; } +} + +/* New styles */ +.dashboard-title-thin { + font-weight: 300; + font-size: 32px; +} + +.dashboard-title-thin .un-icon { + height: 34px; + margin-right: 5px; + margin-top: -1px; + width: 20px; +} + +.dashboard-subtitle { + font-weight: 300; + margin-bottom: 25px; +} + +.btn-vm { + background: #1596DA; + color: #fff; + font-weight: 400; + letter-spacing: 0.8px; + border-radius: 3px; + padding-bottom: 7px; + border: 2px solid #1596DA; +} + +.btn-vm:hover, .btn-vm:focus { + color: #1596DA; + background: #fff; +} +.btn-vm:hover .css-plus:after, +.btn-vm:focus .css-plus:after, +.btn-vm:hover .css-plus:before, +.btn-vm:focus .css-plus:before { + background: #1596DA; +} +.btn-vm-detail { + background: #3770CC; + color: #fff; + font-weight: 400; + letter-spacing: 0.6px; + font-size: 14px; + border-radius: 3px; + border: 2px solid #3770CC; + padding: 4px 20px; + /* padding-bottom: 7px; */ +} + +.btn-vm-detail:hover, .btn-vm-detail:focus { + background: #fff; + color: #3770CC; +} + +.vm-status, .vm-status-active, .vm-status-failed { + font-weight: 600; +} +.vm-status-active { + color: #4A90E2; +} +.vm-status-failed { + color: #eb4d5c; +} + +@media (min-width:768px) { + .dashboard-subtitle { + display: flex; + justify-content: space-between; + font-size: 16px; + } +} +@media (max-width:767px) { + .dashboard-title-thin { + font-size: 22px; + } + .dashboard-title-thin .un-icon { + height: 20px; + width: 18px; + margin-top: -3px; + } + .dashboard-subtitle p { + width: 200px; + } +} + +.table-switch { + color: #555; +} + +.table-switch > tbody > tr > td { + padding: 12px 8px; +} + +@media (min-width: 768px) { + .table-switch > tbody > tr > td:nth-child(1) { + padding-right: 45px; + } +} + +.table-switch .un-icon { + margin-left: 5px; +} + +@media (max-width:767px) { + .dashboard-subtitle { + margin-bottom: 15px; + } + .table-switch .un-icon { + float: right; + margin-top: 0; + } + .table-switch thead { + display: none; + } + .table-switch tbody tr { + display: block; + position: relative; + border-top: 1px solid #ddd; + margin-top: 15px; + padding-top: 5px; + } + .table-switch tbody tr td { + display: block; + padding-top: 28px; + padding-bottom: 6px; + position: relative; + border: 0; + } + .table-switch td:before { + content: attr(data-header); + font-weight: 600; + position: absolute; + top: 5px; + + } + .table-switch .last-td { + position: absolute; + bottom: 5px; + right: 0; + } } \ No newline at end of file diff --git a/hosting/static/hosting/img/copy.svg b/hosting/static/hosting/img/copy.svg new file mode 100644 index 00000000..c30b5922 --- /dev/null +++ b/hosting/static/hosting/img/copy.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/hosting/static/hosting/img/vm.svg b/hosting/static/hosting/img/vm.svg new file mode 100644 index 00000000..376e7d0a --- /dev/null +++ b/hosting/static/hosting/img/vm.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html index c149be41..5ee9e1ff 100644 --- a/hosting/templates/hosting/virtual_machines.html +++ b/hosting/templates/hosting/virtual_machines.html @@ -1,6 +1,75 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} {% block content %} +
+

{% trans "Virtual Machines" %}

+
+

{% trans 'To create a new virtual machine, click "Create VM"' %}

+ +
+ + + + + + + + + + + + + {% for vm in vms %} + + + {% if vm.ipv6 %} + + + {% endif %} + + + + {% endfor %} + + + + + + + + + + + + + + + +
IDIpv4Ipv6{% trans "Status" %}
{{vm.vm_id}}{{vm.ipv4}}{{vm.ipv6}} + {% if vm.state == 'ACTIVE' %} + {{vm.state}} + {% elif vm.state == 'FAILED' %} + {{vm.state}} + {% else %} + {{vm.state}} + {% endif %} + + + {% trans "View Detail"%} +
13638185.203.112.75 2a0a:e5c0:0:2:400:b3ff:fe39:7996 + Active + + View Detail +
13638185.203.112.75 2a0a:e5c0:0:2:400:b3ff:fe39:7996 + Failed + + View Detail +
+
+ +{% comment %}
@@ -78,12 +147,11 @@
{% endif %} -
- +{% endcomment %} {%endblock%} From aec4073af5115a3a1c7cc7a16ac3b0d3feac312a Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:08:44 +0530 Subject: [PATCH 02/10] removed testing markup from html --- .../templates/hosting/virtual_machines.html | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html index 5ee9e1ff..db1909a4 100644 --- a/hosting/templates/hosting/virtual_machines.html +++ b/hosting/templates/hosting/virtual_machines.html @@ -36,35 +36,12 @@ {% else %} {{vm.state}} {% endif %} - {% trans "View Detail"%} {% endfor %} - - 13638 - 185.203.112.75 - 2a0a:e5c0:0:2:400:b3ff:fe39:7996 - - Active - - - View Detail - - - - 13638 - 185.203.112.75 - 2a0a:e5c0:0:2:400:b3ff:fe39:7996 - - Failed - - - View Detail - - From 8160e53ea71d8bc152be424002969b7048323cb8 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:10:08 +0530 Subject: [PATCH 03/10] removed commented html --- .../templates/hosting/virtual_machines.html | 87 +------------------ 1 file changed, 1 insertion(+), 86 deletions(-) diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html index db1909a4..2d033a8d 100644 --- a/hosting/templates/hosting/virtual_machines.html +++ b/hosting/templates/hosting/virtual_machines.html @@ -1,5 +1,6 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} + {% block content %}

{% trans "Virtual Machines" %}

@@ -45,90 +46,4 @@
- -{% comment %} -
-
-
-
- -

{% trans "Virtual Machines"%}

-
-
- {% if messages %} -
- {% for message in messages %} - {{ message }} - {% endfor %} -
- {% endif %} -
- {% if not error %} -

- {% trans "Create VM"%} -

-
- - - - - - - - - - - - {% for vm in vms %} - - - {% if vm.ipv6 %} - - - - {% endif %} - - - - - {% endfor %} - - {% endif %} -
{% trans "ID"%}{% trans "Ipv4"%}{% trans "Ipv6"%}{% trans "Status"%}
{{vm.vm_id}}{{vm.ipv4}}{{vm.ipv6}} - - {% if vm.state == 'ACTIVE' %} - {{vm.state}} - {% elif vm.state == 'FAILED' %} - {{vm.state}} - {% else %} - {{vm.state}} - {% endif %} - - - -
- - {% if is_paginated %} - - {% endif %} -
- -
-
- -
-{% endcomment %} {%endblock%} From 337021a470541eacc22b832e21bc163735cbeb37 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:13:40 +0530 Subject: [PATCH 04/10] added other conditional components on page --- .../templates/hosting/virtual_machines.html | 192 ++++++++++++++---- 1 file changed, 151 insertions(+), 41 deletions(-) diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html index 2d033a8d..c792bc08 100644 --- a/hosting/templates/hosting/virtual_machines.html +++ b/hosting/templates/hosting/virtual_machines.html @@ -1,49 +1,159 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} - {% block content %}

{% trans "Virtual Machines" %}

-
-

{% trans 'To create a new virtual machine, click "Create VM"' %}

- -
- - - - - - - - - - - - - {% for vm in vms %} - - - {% if vm.ipv6 %} - - - {% endif %} - - - + {% if messages %} +
+ {% for message in messages %} + {{ message }} {% endfor %} -
-
IDIpv4Ipv6{% trans "Status" %}
{{vm.vm_id}}{{vm.ipv4}}{{vm.ipv6}} - {% if vm.state == 'ACTIVE' %} - {{vm.state}} - {% elif vm.state == 'FAILED' %} - {{vm.state}} - {% else %} - {{vm.state}} - {% endif %} - - {% trans "View Detail"%} -
+
+ {% endif %} + + {% if not error %} +
+

{% trans 'To create a new virtual machine, click "Create VM"' %}

+ +
+ + + + + + + + + + + + {% for vm in vms %} + + + {% if vm.ipv6 %} + + + {% endif %} + + + + {% endfor %} + +
IDIpv4Ipv6{% trans "Status" %}
{{vm.vm_id}}{{vm.ipv4}}{{vm.ipv6}} + {% if vm.state == 'ACTIVE' %} + {{vm.state}} + {% elif vm.state == 'FAILED' %} + {{vm.state}} + {% else %} + {{vm.state}} + {% endif %} + + {% trans "View Detail"%} +
+ {% endif %} + + {% if is_paginated %} + + {% endif %} + +{% comment %} +
+
+
+
+ +

{% trans "Virtual Machines"%}

+
+
+ {% if messages %} +
+ {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} +
+ {% if not error %} +

+ {% trans "Create VM"%} +

+
+ + + + + + + + + + + + {% for vm in vms %} + + + {% if vm.ipv6 %} + + + + {% endif %} + + + + + {% endfor %} + + {% endif %} +
{% trans "ID"%}{% trans "Ipv4"%}{% trans "Ipv6"%}{% trans "Status"%}
{{vm.vm_id}}{{vm.ipv4}}{{vm.ipv6}} + + {% if vm.state == 'ACTIVE' %} + {{vm.state}} + {% elif vm.state == 'FAILED' %} + {{vm.state}} + {% else %} + {{vm.state}} + {% endif %} + + + +
+ + {% if is_paginated %} + + {% endif %} +
+ +
+
+ +
+{% endcomment %} {%endblock%} From df97a16a26d1ac600308dd752c9aca2ac4f55fe8 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:14:46 +0530 Subject: [PATCH 05/10] removed old markup --- .../templates/hosting/virtual_machines.html | 86 ------------------- 1 file changed, 86 deletions(-) diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html index c792bc08..6964fb3a 100644 --- a/hosting/templates/hosting/virtual_machines.html +++ b/hosting/templates/hosting/virtual_machines.html @@ -70,90 +70,4 @@ {% endif %} - -{% comment %} -
-
-
-
- -

{% trans "Virtual Machines"%}

-
-
- {% if messages %} -
- {% for message in messages %} - {{ message }} - {% endfor %} -
- {% endif %} -
- {% if not error %} -

- {% trans "Create VM"%} -

-
- - - - - - - - - - - - {% for vm in vms %} - - - {% if vm.ipv6 %} - - - - {% endif %} - - - - - {% endfor %} - - {% endif %} -
{% trans "ID"%}{% trans "Ipv4"%}{% trans "Ipv6"%}{% trans "Status"%}
{{vm.vm_id}}{{vm.ipv4}}{{vm.ipv6}} - - {% if vm.state == 'ACTIVE' %} - {{vm.state}} - {% elif vm.state == 'FAILED' %} - {{vm.state}} - {% else %} - {{vm.state}} - {% endif %} - - - -
- - {% if is_paginated %} - - {% endif %} -
- -
-
- -
-{% endcomment %} {%endblock%} From a2229d325052dd54ce785fd65659637c9d9bfdf5 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:26:17 +0530 Subject: [PATCH 06/10] created translations --- hosting/locale/de/LC_MESSAGES/django.po | 24 ++++++++++++------- hosting/templates/hosting/user_keys.html | 2 +- .../templates/hosting/virtual_machines.html | 10 ++++---- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 39bc4adc..3cc30292 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-11 01:16+0530\n" +"POT-Creation-Date: 2017-08-16 04:19+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -435,17 +435,17 @@ msgstr "Sind Sie sicher, dass Sie ihre virtuelle Maschine beenden wollen " msgid "Virtual Machines" msgstr "Virtuelle Maschinen" -msgid "Create VM" -msgstr "Neue VM" - -msgid "ID" +msgid "To create a new virtual machine, click \"Create VM\"" msgstr "" -msgid "Ipv4" -msgstr "IPv4" +msgid "CREATE VM" +msgstr "NEUE VM" -msgid "Ipv6" -msgstr "IPv6" +msgid "Page" +msgstr "" + +msgid "of" +msgstr "" msgid "login" msgstr "einloggen" @@ -482,6 +482,12 @@ msgid "" "contact Data Center Light Support." msgstr "" +#~ msgid "Ipv4" +#~ msgstr "IPv4" + +#~ msgid "Ipv6" +#~ msgstr "IPv6" + #~ msgid "Close" #~ msgstr "Schliessen" diff --git a/hosting/templates/hosting/user_keys.html b/hosting/templates/hosting/user_keys.html index b66a1f6f..fd93b66f 100644 --- a/hosting/templates/hosting/user_keys.html +++ b/hosting/templates/hosting/user_keys.html @@ -77,7 +77,7 @@