From 337021a470541eacc22b832e21bc163735cbeb37 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 16 Aug 2017 04:13:40 +0530 Subject: [PATCH] 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%}