Merge branch 'master' into task/3731/cdist_ssh_key_handler

This commit is contained in:
PCoder 2017-09-02 11:00:40 +05:30
commit fd87023681
45 changed files with 604 additions and 432 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-31 23:46+0530\n"
"POT-Creation-Date: 2017-09-02 03:08+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -73,7 +73,7 @@ msgid "Mwst-Nummer: CHE-109.549.333 MWST"
msgstr ""
msgid "Total:"
msgstr ""
msgstr "Gesamt:"
#, python-format
msgid "Alles Preise in CHF mit 8%% Mehrwertsteuer."
@ -242,12 +242,21 @@ msgstr "Datum"
msgid "Status:"
msgstr ""
msgid "Approved"
msgstr "Akzeptiert"
msgid "Declined"
msgstr "Abgelehnt"
msgid "Billed To:"
msgstr "Rechnungsadresse"
msgid "Payment Method:"
msgstr "Bezahlmethode"
msgid "ending in"
msgstr "endend in"
msgid "Order summary"
msgstr "Bestellungsübersicht"
@ -458,7 +467,7 @@ msgid "Virtual Machines"
msgstr "Virtuelle Maschinen"
msgid "To create a new virtual machine, click \"Create VM\""
msgstr ""
msgstr "Um eine neue VM zu erzeugen, klicke \"Neue VM erzeugen\""
msgid "CREATE VM"
msgstr "NEUE VM"
@ -507,12 +516,6 @@ msgstr "Kontaktiere den Data Center Light Support."
#~ msgid "Your SSH Keys"
#~ msgstr "Deine SSH Keys"
#~ msgid "Approved"
#~ msgstr "Akzeptiert"
#~ msgid "Declined"
#~ msgstr "Abgelehnt"
#~ msgid "Cancel Order"
#~ msgstr "Bestellung stornieren"

View file

@ -1,3 +1,9 @@
@media (min-width: 768px) {
.navbar-right {
margin-right: 10px;
}
}
.dashboard-container {
padding-top:70px;
padding-bottom: 70px;
@ -103,7 +109,7 @@
text-align: center;
width: 100%;
float: left;
padding: 0px 40px 15px 30px;
padding: 0px 30px 15px 30px;
}
.modal-body .modal-icon i {
font-size: 80px;
@ -111,7 +117,7 @@
color: #999;
}
.modal-body .modal-icon {
margin-bottom: 10px;
margin-bottom: 15px;
}
.modal-title {
margin: 0;
@ -122,9 +128,12 @@
font-weight: 300;
}
.modal-text {
padding-top: 15px;
padding-top: 5px;
font-size: 16px;
}
.modal-text p:not(:last-of-type){
margin-bottom: 5px;
}
.modal-footer {
border-top: 0px solid #e5e5e5;
width: 100%;
@ -132,11 +141,8 @@
text-align: center;
padding: 15px 15px;
}
.modal-footer button[type="submit"] {
min-width: 80px;
}
@media (min-width: 1300px) {
.modal-dialog {/* top: 30%; */width: 35%;}
.modal-dialog {/* top: 30%; */width: 40%;}
}
@media (max-width: 1299px) {
.modal-dialog {
@ -233,4 +239,8 @@
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.btn-wide {
min-width: 100px;
}

View file

@ -4,20 +4,6 @@
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
/*@font-face {
font-family: 'Lato-Regular';
src: url('../fonts/Lato/Lato-Regular.ttf');
}
@font-face {
src: url('../fonts/Lato/Lato-Black.ttf');
}
@font-face {
font-family: 'Lato-Light';
src: url('../fonts/Lato/Lato-Light.ttf');
}*/
body,
html {
width: 100%;
@ -39,11 +25,28 @@ h6 {
.topnav {
font-size: 14px;
}
.topnav .navbar-fixed-top .navbar-collapse {
max-height: 740px;
}
.navbar-brand {
padding: 10px 15px;
}
.navbar-default {
background: #fff;
box-shadow: 0 3px 3px -2px hsla(0,0%,78%,.72);
}
.navbar-default .navbar-header {
position: relative;
z-index: 1;
}
.navbar-transparent {
background: transparent;
border: none;
padding: 20px;
box-shadow: none;
}
.navbar-transparent.topnav {
@ -71,6 +74,42 @@ h6 {
/* color: #fff; */
}
.navbar-right .highlights-dropdown .dropdown-menu {
left: 0 !important;
min-width: 155px;
margin-left: 15px;
padding: 5px !important;
}
@media(min-width: 768px) {
.navbar-right .highlights-dropdown .dropdown-menu {
border: 1px solid #fff;
}
.navbar-right .highlights-dropdown .dropdown-menu:before {
content: '';
display: block;
height: 1px;
background: #e7e7e7;
position: absolute;
top: -1px;
left: -1px;
right: -1px;
}
}
.navbar-right .highlights-dropdown .dropdown-menu > li > a{
font-size: 13px;
font-weight: 300;
font-family: 'Lato', sans-serif;
padding: 1px 10px !important;
background: transparent;
color: #333;
}
.navbar-right .highlights-dropdown .dropdown-menu > li > a:hover,
.navbar-right .highlights-dropdown .dropdown-menu > li > a:focus,
.navbar-right .highlights-dropdown .dropdown-menu > li > a:active {
background: transparent;
text-decoration: underline !important;
}
.lead {
font-size: 18px;
font-weight: 400;
@ -761,6 +800,30 @@ a.unlink:hover {
color: #ddd;
}
.visible-mobile {
display: none !important;
}
@media(max-width:767px) {
.visible-mobile {
display: block !important;
}
.visible-desktop {
display: none !important;
}
}
.navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover,
.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover {
background-color: transparent;
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu>.active>a, .navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus, .navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover {
background-color: transparent;
}
}
/* bootstrap danger color override from #a94442 */
.text-danger,
.has-error .help-block,

View file

@ -163,8 +163,8 @@
/* margin-left: 0; */
}
.col-md-12, .col-sm-12{
padding-left: 5px;
padding-right: 5px;
/*padding-left: 5px;*/
/*padding-right: 5px;*/
}
}
@media (max-width: 360px){
@ -172,8 +172,8 @@
/* width: 100% !important; */
}
.container {
padding-right: 5px;
padding-left: 5px;
/*padding-right: 5px;
padding-left: 5px;*/
}
}
.dashboard-choice-container {
@ -299,6 +299,7 @@
}
.key_contain {
word-break: break-all;
margin-bottom: 15px;
}
.custom_form_button{
border-radius: 0;

View file

@ -1,92 +0,0 @@
Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato"
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View file

@ -1,5 +1,59 @@
$( document ).ready(function() {
// also declared in datacenterlight/js/main.js
function _initNavUrl() {
// $('.url').click(function(event) {
// event.preventDefault();
// var href = $(this).attr('href');
// $('.navbar-collapse').removeClass('in');
// $('.navbar-collapse').addClass('collapsing');
// if ($(href).length) {
// $('html, body').animate({
// scrollTop: $(href).offset().top
// }, 1000);
// } else {
// window.location.href = '/datacenterlight' + href;
// }
// });
$('.url-init').each(function(idx, el) {
var $this = $(el);
var currentPath = window.location.pathname;
var thisPaths = $this.attr('href').split('#')
if ($this.hasClass('dropdown-toggle') && window.matchMedia("(max-width: 767px)").matches) {
$this.removeClass('url-init');
$this.attr('href', '');
} else if ($('#'+thisPaths[1]).length) {
$this.removeClass('url-init').addClass('url');
$this.attr('href', '#' + thisPaths[1]);
} else {
$this.removeClass('url-init');
}
});
$('.url').click(function(event) {
event.preventDefault();
var href = $(this).attr('href');
$('.navbar-collapse').removeClass('in');
$('.navbar-collapse').addClass('collapsing');
if ($(href).length) {
$('html, body').animate({
scrollTop: $(href).offset().top
}, 1000);
}
});
}
/* ---------------------------------------------
Nav panel classic
--------------------------------------------- */
if (window.matchMedia("(min-width: 767px)").matches) {
$('ul.nav li.dropdown').hover(function() {
$(this).find('.dropdown-menu').stop(true, true).fadeIn(500);
}, function() {
$(this).find('.dropdown-menu').stop(true, true).fadeOut(500);
});
} else {
/* the viewport is less than 400 pixels wide */
}
$( document ).ready(function() {
$('[data-toggle="tooltip"]').tooltip();
@ -13,6 +67,8 @@ $( document ).ready(function() {
}, 1000);
});
_initNavUrl();
/*
* Replace all SVG images with inline SVG
*/

View file

@ -58,12 +58,14 @@
<div class="container topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if request.user.is_authenticated %}
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% endif %}
<a class="navbar-brand topnav" href="{% if site_url %}{{site_url}}{% else %}{{ request.session.hosting_url}}{% endif %}"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
</div>
{% if request.user.is_authenticated %}

View file

@ -1,7 +1,7 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %}
{% load i18n %}
{% block content %}
{% block content %}
<div class="order-detail-container">
{% if messages %}
@ -17,7 +17,7 @@
</div>
{% endif %}
{% if not error %}
<div class="row">
<div class="row">
<div class="col-xs-12 col-md-8 col-md-offset-2">
<div class="invoice-title">
<h2>{{page_header_text}}</h2><h3 class="pull-right">{% trans "Order #"%} {{order.id}}</h3>
@ -29,9 +29,11 @@
<strong>{% trans "Date"%}:</strong><br>
<span id="order-created_at">{{order.created_at|date:'Y-m-d H:i'}}</span><br><br>
<strong>{% trans "Status:"%}</strong><br>
<strong class="{% if order.status == 'Approved' %}text-success
{%else%} text-danger
{% endif %}">{{order.status}}</strong>
{% if order.status == 'Approved' %}
<strong class="text-success">{% trans "Approved" %}</strong>
{% else %}
<strong class="text-danger">{% trans "Declined" %}</strong>
{% endif %}
<br><br>
</address>
@ -44,20 +46,20 @@
{{order.billing_address.city}}, {{order.billing_address.country}}.
</address>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<address>
<strong>{% trans "Payment Method:"%}</strong><br>
{{order.cc_brand}} ending **** {{order.last4}}<br>
{{order.cc_brand}} {% trans "ending in" %} **** {{order.last4}}<br>
{{user.email}}
</address>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h3><b>{% trans "Order summary"%}</b></h3>
@ -83,8 +85,8 @@
{% endif %}
</div>
<script type="text/javascript">
<script type="text/javascript">
window.onload = function () {
var locale_date = moment.utc(document.getElementById("order-created_at").textContent,'YYYY-MM-DD HH:mm').toDate();

View file

@ -5,7 +5,7 @@
{% block content %}
<div class="dashboard-container">
<div class="dashboard-container-head">
<h3 class="dashboard-title-thin"><img src="{% static 'hosting/img/shopping-cart.svg' %}" class="un-icon" style="margin-top: -4px; width: 30px;"> {% trans "My Orders" %}</h3>
<h3 class="dashboard-title-thin"><img src="{% static 'hosting/img/shopping-cart.svg' %}" class="un-icon" style="margin-top: -4px; width: 30px;"> {% trans "My Bills" %}</h3>
{% if messages %}
<div class="alert alert-warning">
{% for message in messages %}
@ -34,9 +34,9 @@
<td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price }}</td>
<td data-header="{% trans 'Status' %}">
{% if order.approved %}
<span class="vm-status-active"><strong>Approved</strong></span>
<span class="vm-status-active"><strong>{% trans "Approved" %}</strong></span>
{% else %}
<span class="vm-status-failed"><strong>Declined</strong></span>
<span class="vm-status-failed"><strong>{% trans "Declined" %}</strong></span>
{% endif %}
</td>
<td class="text-right last-td">

View file

@ -1,5 +1,6 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% block content %}
<!-- Credit card form -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
@ -207,7 +208,6 @@
window.hasCreditcard = true;
})();
</script>
{%endif%}
{%endblock%}

View file

@ -33,8 +33,7 @@
<tr>
<td scope="row">{{user_key.name}}</td>
<td>
<button type="button" class="btn btn-default btn-custom-delete" data-toggle="modal"
data-target="#Modal{{ user_key.id }}" style="color: #717274">
<button type="button" class="btn btn-default btn-custom-delete" data-toggle="modal" data-target="#Modal{{ user_key.id }}" style="color: #717274">
<span class="pc-only">{% trans "Delete" %}</span>
<span class="mob-only"><i class="fa fa-trash"></i></span>
</button>
@ -42,20 +41,18 @@
<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">&times;</span>
</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Confirm"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="modal-icon"><i class="fa fa-trash" aria-hidden="true"></i></div>
<h4 class="modal-title" id="ModalLabel">{% trans "Delete SSH Key"%}</h4>
<p class="modal-text">{% trans "Do you want to delete this key?"%}</p>
<div class="modal-icon"><i class="fa fa-trash" aria-hidden="true"></i></div>
<h4 class="modal-title" id="ModalLabel">{% trans "Delete SSH Key"%}</h4>
<div class="modal-text">
<p>{% trans "Do you want to delete this key?"%}</p>
</div>
<form method="post" action="{% url 'hosting:delete_ssh_key' user_key.id %}">
{% csrf_token %}
<div class="modal-footer">
<button type="submit" class="btn btn-danger">{% trans "Delete"%}
</button>
<button type="submit" class="btn btn-danger btn-wide">{% trans "Delete"%}</button>
</div>
</form>
</div>
@ -64,23 +61,18 @@
</div>
</td>
<td>
<p type="button" data-toggle="modal" style="margin: 0" data-target="#Modal_public_key{{ user_key.id }}">
<p data-toggle="modal" style="margin: 0" data-target="#Modal_public_key{{ user_key.id }}">
<a href="#">{% trans "Show" %}</a>
</p>
<div class="modal fade" id="Modal_public_key{{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">&times;</span>
</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Confirm"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<h4 class="modal-title" id="ModalLabel_Public_Key">{% trans "Public SSH Key" %}</h4>
<p class="key_contain" style="margin-top: 10px;">{{ user_key.public_key }}</p>
<div class="modal-footer">
</div>
</div>
</div>
</div>
@ -90,10 +82,9 @@
<td>
{% if user_key.private_key %}
<form action="{{ user_key.private_key.url }}">
<button style="color: #717274" type="submit" class="btn btn-default" data-toggle="modal"
>
<span class="pc-only">{% trans "Download" %}</span>
<span class="mob-only"><i class="fa fa-download"></i></span>
<button style="color: #717274" type="submit" class="btn btn-default">
<span class="pc-only">{% trans "Download" %}</span>
<span class="mob-only"><i class="fa fa-download"></i></span>
</button>
</form>
{% endif %}

View file

@ -101,9 +101,9 @@
<p>{% trans "Do you want to cancel your Virtual Machine" %} ?</p>
<p><strong>{{virtual_machine.name}}</strong></p>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-danger btn-ok">{% trans "OK" %}</a>
<div class="modal-footer">
<a class="btn btn-danger btn-ok btn-wide">{% trans "OK" %}</a>
</div>
</div>
</div>
</div>