dynamicweb/hosting/templates/hosting/virtual_machine_detail.html

142 lines
6.5 KiB
HTML
Raw Normal View History

{% extends "hosting/base_short.html" %}
2018-03-27 14:08:09 +00:00
{% load staticfiles bootstrap3 humanize %}
{% load i18n %}
{% block content %}
2017-08-16 21:18:35 +00:00
{% if messages %}
<div class="alert alert-warning">
{% for message in messages %}
<span>{{ message }}</span>
{% endfor %}
</div>
{% endif %}
<div class="virtual-machine-container dashboard-container">
2017-08-23 13:52:59 +00:00
<h1 class="dashboard-title-thin">{% trans "Your Virtual Machine Detail" %}</h1>
2017-08-16 21:18:35 +00:00
<div class="vm-detail-contain">
<div class="vm-detail-item">
<h2 class="vm-detail-title">{% trans "VM Settings" %} <img src="{% static 'hosting/img/settings.svg' %}" class="un-icon"></h2>
<h3 class="vm-name">{{virtual_machine.name}}</h3>
{% if virtual_machine.ipv6 %}
<div class="vm-detail-ip">
<p>
<span>IPv4:</span>
<span class="value">{{virtual_machine.ipv4}}</span>
<button data-clipboard-text="{{virtual_machine.ipv4}}" class="to_copy btn btn-link" data-toggle="tooltip" data-placement="left" title="{% trans 'Copied' %}" data-trigger="click">
2017-08-18 20:51:34 +00:00
<img class="un-icon" src="{% static 'hosting/img/copy.svg' %}">
</button>
2017-08-16 21:18:35 +00:00
</p>
<p>
<span>IPv6:</span>
<span class="value value-sm-block">{{virtual_machine.ipv6}}</span>
<button data-clipboard-text="{{virtual_machine.ipv6}}" class="to_copy btn btn-link" data-toggle="tooltip" data-placement="left" title="{% trans 'Copied' %}" data-trigger="click">
2017-08-18 20:51:34 +00:00
<img class="un-icon" src="{% static 'hosting/img/copy.svg' %}">
</button>
2017-08-16 21:18:35 +00:00
</p>
</div>
{% endif %}
<div class="vm-detail-config">
<p><span>{% trans "Cores" %}:</span><span class="value">{{virtual_machine.cores}}</span></p>
<p><span>{% trans "Memory" %}:</span><span class="value">{{virtual_machine.memory}} GB</span></p>
2018-03-27 14:08:09 +00:00
<p><span>{% trans "Disk" %}:</span><span class="value">{{virtual_machine.disk_size|floatformat:2|intcomma}} GB</span></p>
2017-08-16 21:18:35 +00:00
<p><span>{% trans "Configuration" %}:</span><span class="value">{{virtual_machine.configuration}}</span></p>
</div>
</div>
<div class="vm-detail-item">
<h2 class="vm-detail-title">{% trans "Billing" %} <img src="{% static 'hosting/img/billing.svg' %}" class="un-icon"></h2>
<div class="vm-vmid">
<div class="vm-item-subtitle">{% trans "Current Pricing" %}</div>
<div class="vm-item-lg">{{order.price|floatformat:2|intcomma}} CHF/{% trans "Month" %}</div>
2017-09-13 20:59:51 +00:00
<a class="btn btn-vm-invoice" href="{% url 'hosting:orders' order.pk %}">{% trans "See Invoice" %}</a>
2017-08-16 21:18:35 +00:00
</div>
</div>
<div class="vm-detail-item">
<h2 class="vm-detail-title">{% trans "Status" %} <img src="{% static 'hosting/img/connected.svg' %}" class="un-icon"></h2>
2018-08-22 21:06:20 +00:00
<div class="vm-vmid vm-vmid-with-warning">
2017-08-16 21:18:35 +00:00
<div class="vm-item-subtitle">{% trans "Your VM is" %}</div>
2017-09-13 20:54:10 +00:00
<div id="terminate-VM" data-alt="{% trans 'Terminating' %}">
{% if virtual_machine.state == 'PENDING' %}
<div class="vm-item-lg vm-color-pending">{% trans "Pending" %}</div>
{% elif virtual_machine.state == 'ACTIVE' %}
<div class="vm-item-lg vm-color-online">{% trans "Online" %}</div>
{% elif virtual_machine.state == 'FAILED'%}
<div class="vm-item-lg vm-color-failed">{% trans "Failed" %}</div>
{% else %}
<div class="vm-item-lg"></div>
{% endif %}
{% if not virtual_machine.status == 'canceled' %}
2017-09-13 20:59:51 +00:00
<form method="POST" id="virtual_machine_cancel_form" class="cancel-form" action="{% url 'hosting:virtual_machines' virtual_machine.vm_id %}">
2017-09-13 20:54:10 +00:00
{% csrf_token %}
</form>
<button data-toggle="modal" data-target="#confirm-cancel" class="btn btn-vm-term">{% trans "Terminate VM" %}</button>
<div class="alert alert-danger hide">
{% trans "Sorry, there was an unexpected error. Kindly retry." %}
</div>
{% endif %}
</div>
2017-08-16 21:18:35 +00:00
</div>
2018-08-22 20:47:49 +00:00
<div class="vm-terminate-warning text-center">
<p>{% trans "Attention:" %}</p>
<p>{% trans "terminating VM can not be reverted." %}</p>
</div>
2017-08-16 21:18:35 +00:00
</div>
</div>
<div class="vm-contact-us">
<div>
<h2 class="vm-detail-title">{% trans "Support / Contact" %} <img class="un-icon visible-xs" src="{% static 'hosting/img/24-hours-support.svg' %}"></h2>
</div>
<div class="vm-contact-us-text text-center">
2017-08-23 16:21:56 +00:00
<img class="un-icon hidden-xs" src="{% static 'hosting/img/24-hours-support.svg' %}">
<div>
<span>{% trans "Something doesn't work?" %}</span> <span>{% trans "We are here to help you!" %}</span>
</div>
2017-08-16 21:18:35 +00:00
</div>
<div class="text-center">
2017-08-18 20:51:34 +00:00
<a class="btn btn-vm-contact" href="mailto:support@datacenterlight.ch">{% trans "CONTACT" %}</a>
2017-08-16 21:18:35 +00:00
</div>
</div>
<div class="text-center">
2017-08-18 21:02:37 +00:00
<a class="btn btn-vm-back" href="{% url 'hosting:virtual_machines' %}">{% trans "BACK TO LIST" %}</a>
2017-08-16 21:18:35 +00:00
</div>
</div>
<!-- Cancel Modal -->
<div class="modal fade" id="confirm-cancel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
2017-09-18 17:51:04 +00:00
<div class="modal-dialog">
<div class="modal-content">
2017-08-16 21:18:35 +00:00
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Confirm"><span aria-hidden="true">&times;</span></button>
</div>
2017-09-18 17:51:04 +00:00
<div class="modal-body">
2017-08-16 21:18:35 +00:00
<div class="modal-icon"><i class="fa fa-ban" aria-hidden="true"></i></div>
2017-09-18 16:22:59 +00:00
<h4 class="modal-title" id="ModalLabel">{% trans "Terminate your Virtual Machine" %}</h4>
2017-08-16 21:18:35 +00:00
<div class="modal-text">
<p>{% trans "Terminated VMs can not be revived and will not be refunded. Do you want to terminate your VM?" %}</p>
2017-08-16 21:18:35 +00:00
<p><strong>{{virtual_machine.name}}</strong></p>
</div>
2017-09-18 17:51:04 +00:00
<div class="modal-footer">
<a class="btn btn-danger btn-ok btn-wide">{% trans "OK" %}</a>
2017-09-18 17:51:04 +00:00
</div>
</div>
</div>
</div>
2017-08-16 21:18:35 +00:00
</div>
<!-- / Cancel Modal -->
2017-09-18 16:22:59 +00:00
<!-- Success Modal -->
<div class="modal fade" id="terminate-success" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
</div>
<div class="modal-body">
<div class="modal-icon"><i class="checkmark" aria-hidden="true"></i></div>
<h4 class="modal-title"></h4>
<div class="modal-text" id="ModalLabel">{% blocktrans with machine_name=virtual_machine.name %}Your Virtual Machine <strong>{{machine_name}}</strong> is successfully terminated!{% endblocktrans %}</div>
2017-09-18 16:22:59 +00:00
<div class="modal-footer">
2017-09-19 08:54:23 +00:00
<a href="{% url 'hosting:virtual_machines' %}" class="btn btn-success btn-wide">{% trans "OK" %}</a>
2017-09-18 16:22:59 +00:00
</div>
</div>
</div>
</div>
</div>
<!-- / Cancel Modal -->
{%endblock%}