Fix conflicts
This commit is contained in:
commit
c69694274f
26 changed files with 533 additions and 257 deletions
|
|
@ -85,7 +85,7 @@
|
|||
<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' %}">
|
||||
<a href="{% url 'hosting:ssh_keys' %}">
|
||||
<i class="fa fa-key"></i> {% trans "Keys"%}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -128,7 +128,46 @@
|
|||
{% if request.user.is_authenticated %}
|
||||
<footer class="navbar-fixed-bottom">
|
||||
<div class="container">
|
||||
<<<<<<< HEAD
|
||||
<p class="copyright text-muted small">Copyright © ungleich GmbH {% now "Y" %}. All Rights Reserved</p>
|
||||
=======
|
||||
<div class="row">
|
||||
<div class="col-lg-12 hidden-xs">
|
||||
<ul class="list-inline">
|
||||
<li>
|
||||
<a href="#">{% trans "Home"%}</a>
|
||||
</li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:virtual_machines' %}">
|
||||
{% trans "My Virtual Machines"%}
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:orders' %}">
|
||||
{% trans "My Orders"%}
|
||||
</a>
|
||||
</li>
|
||||
<li>⋅</li>
|
||||
<li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:ssh_keys' %}">
|
||||
{% trans "Keys"%}
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
<li>
|
||||
<a href="{% url 'hosting:notifications' %}">
|
||||
{% trans "Notifications "%}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<p class="copyright text-muted small">Copyright © ungleich GmbH {% now "Y" %}. All Rights Reserved</p>
|
||||
</div>
|
||||
</div>
|
||||
>>>>>>> f4997f041ca9496bf9a63706726a20d0a31d1c28
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
|
@ -149,8 +188,9 @@
|
|||
<!-- Init JavaScript -->
|
||||
<script src="{% static 'hosting/js/initial.js' %}"></script>
|
||||
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script src="https://js.stripe.com/v2/"></script>
|
||||
<!-- Stripe Lib -->
|
||||
<script type="text/javascript" src="//js.stripe.com/v2/"></script>
|
||||
|
||||
<!-- Proccess payment lib -->
|
||||
<script type="text/javascript" src="{% static 'hosting/js/payment.js' %}"></script>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<form method="POST" action="">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
Select VM Template:
|
||||
{% trans "Select VM Template:" %}
|
||||
<select name="vm_template_id">
|
||||
{% for template in templates %}
|
||||
<option value="{{template.id}}">{{template.name}} </option>
|
||||
|
|
@ -29,14 +29,14 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
Select VM Configuration:
|
||||
{% trans "Select VM Configuration:" %}
|
||||
<select name="configuration">
|
||||
{% for config in configuration_options %}
|
||||
<option value="{{config.id}}">
|
||||
CORE: {{config.cpu|floatformat}},
|
||||
RAM: {{config.memory|floatformat}} GiB,
|
||||
SSD: {{config.disk_size|floatformat}} GiB,
|
||||
PRICE: {{config.price|floatformat}} CHF/Month
|
||||
RAM: {{config.memory|floatformat}} GB,
|
||||
SSD: {{config.disk_size|floatformat}} GB,
|
||||
PRICE: {{config.price|floatformat}} {% trans "CHF/Month" %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Do You want do delete your order?"%}</h4>
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Do You want to delete your order?"%}</h4>
|
||||
|
||||
<form method="post"
|
||||
action="{% url 'hosting:delete_order' order.id %}">
|
||||
|
|
|
|||
|
|
@ -9,18 +9,18 @@
|
|||
<form role="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3><b>Billing Amount</b></h3>
|
||||
<h3><b>{%trans "Billing Amount" %}</b></h3>
|
||||
<hr>
|
||||
<div class="content">
|
||||
<!-- <p><b>Type</b> <span class="pull-right">{{request.session.vm_specs.location_code}}</span></p> -->
|
||||
<!-- <hr> -->
|
||||
<p><b>Cores</b> <span
|
||||
<p><b>{%trans "Cores"%}</b> <span
|
||||
class="pull-right">{{request.session.specs.cpu|floatformat}}</span></p>
|
||||
<hr>
|
||||
<p><b>Memory</b> <span
|
||||
<p><b>{%trans "Memory"%}</b> <span
|
||||
class="pull-right">{{request.session.specs.memory|floatformat}} GiB</span></p>
|
||||
<hr>
|
||||
<p><b>Disk space</b> <span
|
||||
<p><b>{%trans "Disk space"%}</b> <span
|
||||
class="pull-right">{{request.session.specs.disk_size|floatformat}} GiB</span></p>
|
||||
<hr>
|
||||
<h4>Total<p
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 billing">
|
||||
<h3><b>Billing Address</b></h3>
|
||||
<h3><b>{%trans "Billing Address"%}</b></h3>
|
||||
<hr>
|
||||
<form role="form" id="billing-form" method="post" action="" novalidate>
|
||||
{% for field in form %}
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-offset-2 col-md-4 "></div>
|
||||
<div class="col-xs-12 col-md-4 creditcard-box">
|
||||
<h3><b>Payment Details</b></h3>
|
||||
<h3><b>{%trans "Payment Details"%}</b></h3>
|
||||
<hr>
|
||||
<div>
|
||||
<div>
|
||||
|
|
@ -57,17 +57,33 @@
|
|||
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
|
||||
<input type="hidden" name="credit_card_needed" value="false"/>
|
||||
</form>
|
||||
<button id="payment_button_with_creditcard" class="btn btn-success btn-lg btn-block" type="submit">Submit Payment</button>
|
||||
<div class="col-xs-6">
|
||||
<button id="payment_button_with_creditcard" class="btn btn-success btn-sm btn-block" type="submit">
|
||||
{% trans "Submit Payment" %}
|
||||
</button>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
|
||||
<form role="form" id="payment-form" novalidate>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div id="card-element">
|
||||
<!-- a Stripe Element will be inserted here. -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card-errors" role="alert"></div>
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="col-xs-9 col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cardNumber">CARD NUMBER</label>
|
||||
<label class="control-label" for="cardNumber">{%trans "CARD NUMBER"%}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required autofocus data-stripe="number" />
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="cardNumber"
|
||||
placeholder="{%trans "Valid Card Number"%}" required autofocus data-stripe="number" />
|
||||
<span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -76,7 +92,7 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-6 col-md-7">
|
||||
<div class="form-group">
|
||||
<label for="expMonth">EXPIRATION DATE</label><br/>
|
||||
<label for="expMonth">{%trans "EXPIRATION DATE"%}</label><br/>
|
||||
<div class="col-xs-6 col-lg-6 col-md-6 pl-ziro">
|
||||
<input type="text" class="form-control" name="expMonth" placeholder="MM" required data-stripe="exp_month" />
|
||||
</div>
|
||||
|
|
@ -87,14 +103,14 @@
|
|||
</div>
|
||||
<div class="col-xs-4 col-md-5 pull-right">
|
||||
<div class="form-group">
|
||||
<label for="cvCode">CV CODE</label>
|
||||
<label for="cvCode">{%trans "CV CODE"%}</label>
|
||||
<input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<button class="btn btn-success btn-lg btn-block" type="submit">Submit Payment</button>
|
||||
<div class="col-xs-6 float-right">
|
||||
<button class="btn btn-success btn-sm btn-block" type="submit">Submit Payment</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display:none;">
|
||||
|
|
@ -115,6 +131,7 @@
|
|||
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -125,8 +142,14 @@
|
|||
|
||||
<!-- stripe key data -->
|
||||
{% if stripe_key %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<script type="text/javascript">
|
||||
(function () {window.stripeKey = "{{stripe_key}}";})();
|
||||
|
||||
|
||||
(function () {
|
||||
window.stripeKey = "{{stripe_key}}";
|
||||
window.current_lan = "{{LANGUAGE_CODE}}";
|
||||
})();
|
||||
</script>
|
||||
{%endif%}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% for field in form %}
|
||||
|
||||
{% bootstrap_field field %}
|
||||
{% endfor %}
|
||||
{% buttons %}
|
||||
|
|
@ -32,33 +31,8 @@
|
|||
</button>
|
||||
|
||||
{% endbuttons %}
|
||||
<div class="form-group">
|
||||
</div>
|
||||
<h5> Use your created key to access to the machine. If you lost it, contact us. </h5>
|
||||
<table class="table borderless table-hover">
|
||||
<br/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Name"%}</th>
|
||||
<th>{% trans "Created at"%} </th>
|
||||
<th>{% trans "Status"%} </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user_key in keys %}
|
||||
<tr>
|
||||
<td scope="row">{{user_key.name}}</td>
|
||||
<td>{{user_key.created_at}}</td>
|
||||
<td>
|
||||
<span class="h3 label label-success"><strong>Active</strong></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
<h5> Use your created key to access to the machine. If you lost it, contact us. </h5>
|
||||
|
||||
{% if private_key %}
|
||||
<div class="alert alert-warning">
|
||||
|
|
@ -69,17 +43,7 @@
|
|||
<textarea class="form-control" rows="6" id="ssh_key" type="hidden" style="display:none">{{private_key}}</textarea>
|
||||
|
||||
</div>
|
||||
<!-- <div class="form-group pull-right">
|
||||
<button type="button" id="copy_to_clipboard" data-clipboard-target="#ssh_key" class="btn btn-warning"
|
||||
data-toggle="tooltip" data-placement="bottom" title="Copied" data-trigger="click">{% trans "Copy to Clipboard"%}</button>
|
||||
<button type="button" id="download_ssh_key" class="btn btn-warning">{% trans "Download"%}</button>
|
||||
</div> -->
|
||||
{% else %}
|
||||
<!-- <div class="alert alert-warning">
|
||||
<strong>{% trans "Warning!"%}</strong>{% trans "Your SSH private key was already generated and downloaded, if you lost it, contact us. "%}
|
||||
</div>
|
||||
--> {% endif %}
|
||||
<!-- <a class="btn btn-success" href="{% url 'hosting:virtual_machines' %}">{% trans "Generate my key"%} </a> -->
|
||||
{% endif %}
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
96
hosting/templates/hosting/user_keys.html
Normal file
96
hosting/templates/hosting/user_keys.html
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{% extends "hosting/base_short.html" %}
|
||||
{% load staticfiles bootstrap3 i18n %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<div class="container virtual-machine-container dashboard-container ">
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-md-offset-2">
|
||||
<div class="col-sm-12">
|
||||
<h3><i class="fa fa-key" aria-hidden="true"></i>{% trans "Access Key"%} </h3>
|
||||
{% if messages %}
|
||||
<div class="alert alert-warning">
|
||||
{% for message in messages %}
|
||||
<span>{{ message }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<p class="pull-right">
|
||||
<a class="btn btn-success" href="{% url 'hosting:create_ssh_key' %}" >{% trans "Add Key"%} </a>
|
||||
</p>
|
||||
<h5> Use your created key to access to the machine. If you lost it, contact us. </h5>
|
||||
<table class="table borderless table-hover">
|
||||
<br/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Name"%}</th>
|
||||
<th>{% trans "Created at"%} </th>
|
||||
<th>{% trans "Status"%} </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user_key in keys %}
|
||||
<tr>
|
||||
<td scope="row">{{user_key.name}}</td>
|
||||
<td>{{user_key.created_at}}</td>
|
||||
<td>
|
||||
<span class="h3 label label-success"><strong>Active</strong></span>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-default" data-toggle="modal"
|
||||
data-target="#Modal{{ user_key.id }}"><a
|
||||
href="#">{% trans "Delete Key"%}</a>
|
||||
</button>
|
||||
|
||||
<div class="modal fade" id="Modal{{user_key.id }}" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-label="Confirm"><span
|
||||
aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Do You want to delete this key?"%}</h4>
|
||||
|
||||
<form method="post" action="{% url 'hosting:delete_ssh_key' user_key.id %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
{% trans "Close"%}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">{% trans "Delete"%}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% if next_url %}
|
||||
<script type="text/javascript">
|
||||
window.location.href = '{{next_url}}';
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{%endblock%}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
{% trans "Terminate your Virtual Machine"%}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% trans "Are you sure do you want to cancel your Virtual Machine "%} {{virtual_machine.name}} {% trans "plan?"%}
|
||||
{% trans "Are you sure do you want to cancel your Virtual Machine "%} {{virtual_machine.name}} ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Cancel"%}</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue