dashboard url, view,template and css added

This commit is contained in:
Arvind Tiwari 2017-08-22 20:45:18 +05:30
parent b256199d82
commit 6890c82122
10 changed files with 206 additions and 14 deletions

View file

@ -0,0 +1,21 @@
.hosting-dashboard:after {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(41, 66, 122, 0.59);
z-index: -1;
}
.hosting-dashboard:before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: url(../../datacenterlight/img/pattern.jpg) no-repeat center center;
background-size: cover;
z-index: -2;
}

View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 279.525 279.525" style="enable-background:new 0 0 279.525 279.525;" xml:space="preserve">
<g>
<path d="M165.066,1.544c-29.272,0-56.007,11.05-76.268,29.191c4.494,7.146,7.047,15.46,7.287,24.042l0.001,0.025l0.001,0.025
c0.102,3.867,0.333,7.735,0.664,11.597c15.368-21.117,40.258-34.88,68.315-34.88c46.571,0,84.459,37.888,84.459,84.459
c0,46.08-37.098,83.634-82.994,84.422c4.191,3.502,8.518,6.84,12.976,9.974l0.02,0.015l0.021,0.014
c6.07,4.282,11.014,9.896,14.483,16.317c49.133-12.861,85.493-57.633,85.493-110.742C279.525,52.89,228.18,1.544,165.066,1.544z"/>
<path d="M162.256,234.942c-13.076-10.438-21.234-17.389-32.909-28.204c-3.435-3.182-7.633-5.164-11.944-5.164
c-3.299,0-6.557,1.051-9.239,3.252c-2.768,2.33-5.536,4.66-8.305,6.989c-22.499-26.738-39.206-57.895-49.027-91.431
c3.472-1.016,6.945-2.033,10.417-3.049c7.652-2.343,11.252-10.512,10.129-18.701c-2.443-17.824-3.77-26.679-5.282-43.018
c-0.775-8.375-6.349-15.65-14.338-16.085c-1.246-0.121-2.491-0.181-3.726-0.181c-29.71,0-55.578,34.436-46.009,76.564
c11.907,52.172,37.684,100.243,74.551,139.031c15.102,15.856,33.603,23.036,50.312,23.036c17.627,0,33.261-7.984,40.833-22.195
C171.778,248.891,168.83,240.19,162.256,234.942z"/>
<path d="M130.645,118.121c-7.912,7.341-13.089,13.113-15.823,17.643c-1.93,3.195-3.338,6.573-4.187,10.04
c-0.399,1.632-0.032,3.326,1.007,4.649c1.038,1.321,2.596,2.079,4.276,2.079h37.758c4.626,0,8.39-3.764,8.39-8.39
c0-4.626-3.764-8.39-8.39-8.39h-17.051c0.139-0.164,0.282-0.328,0.428-0.493c1.114-1.254,3.842-3.874,8.107-7.785
c4.473-4.105,7.493-7.179,9.232-9.398c2.621-3.336,4.571-6.593,5.794-9.679c1.247-3.145,1.88-6.498,1.88-9.967
c0-6.224-2.254-11.507-6.699-15.705c-4.416-4.164-10.495-6.274-18.071-6.274c-6.884,0-12.731,1.802-17.377,5.356
c-2.803,2.146-4.961,5.119-6.415,8.839c-0.982,2.513-0.728,5.388,0.68,7.689c1.408,2.302,3.852,3.837,6.537,4.105
c0.299,0.03,0.597,0.045,0.891,0.045c3.779,0,7.149-2.403,8.387-5.979c0.388-1.121,0.901-2.012,1.527-2.65
c1.318-1.343,3.093-1.997,5.428-1.997c2.373,0,4.146,0.618,5.418,1.889c1.269,1.269,1.886,3.12,1.886,5.66
c0,2.359-0.843,4.819-2.505,7.314C140.862,108.028,138.199,111.083,130.645,118.121z"/>
<path d="M206.235,76.451h-6.307c-1.797,0-3.475,0.886-4.489,2.37l-29.168,42.698c-0.851,1.246-1.301,2.703-1.301,4.212v6.919
c0,2.997,2.439,5.436,5.436,5.436h23.945v5.787c0,4.775,3.885,8.66,8.66,8.66c4.775,0,8.66-3.885,8.66-8.66v-5.787h0.865
c4.437,0,8.047-3.61,8.047-8.047c0-4.437-3.61-8.047-8.047-8.047h-0.865V81.887C211.671,78.89,209.232,76.451,206.235,76.451z
M194.352,121.992h-10.748l10.748-15.978V121.992z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="symbol symbol-billing" aria-labelledby="title" role="img"><title id="title">billing icon</title><g data-name="Layer 1"><path class="cls-1" d="M.37.023v15.954l2.775-1.387 2.775 1.387L8 14.59l2.775 1.387 2.081-1.387 2.775 1.387V.023zm13.873 13.709l-1.487-.744-2.081 1.387L7.9 12.989l-2.08 1.387-2.675-1.337-1.387.694V1.41h12.485z" role="presentation"/><path class="cls-1" d="M4.206 3.617h7.741v1.348H4.206zm0 2.697h7.741v1.349H4.206zm0 2.697h7.741v1.349H4.206z" role="presentation"/></g></svg>

After

Width:  |  Height:  |  Size: 558 B

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="459.669px" height="459.669px" viewBox="0 0 459.669 459.669" style="enable-background:new 0 0 459.669 459.669;"
xml:space="preserve">
<g>
<g>
<path d="M404.723,76.087H54.948C24.649,76.087,0,100.735,0,131.035v197.599c0,30.298,24.649,54.948,54.948,54.948h349.774
c30.298,0,54.947-24.65,54.947-54.948V131.035C459.67,100.735,435.021,76.087,404.723,76.087z M429.267,328.633
c0,13.534-11.011,24.544-24.544,24.544H54.948c-13.534,0-24.545-11.01-24.545-24.544V196.214h398.863L429.267,328.633
L429.267,328.633z M429.267,152.839l-398.863,0.029v-21.834c0-13.534,11.011-24.545,24.545-24.545h349.774
c13.533,0,24.544,11.011,24.544,24.545V152.839z"/>
<path d="M68.136,324.98h83.23c2.98,0,5.398-2.416,5.398-5.396v-16.421c0-2.981-2.418-5.397-5.398-5.397h-83.23
c-2.981,0-5.398,2.416-5.398,5.397v16.421C62.737,322.564,65.154,324.98,68.136,324.98z"/>
<path d="M337.963,324.98h24.756c14.288,0,25.87-11.582,25.87-25.869v-24.756c0-14.287-11.582-25.869-25.87-25.869h-24.756
c-14.287,0-25.869,11.582-25.869,25.869v24.756C312.094,313.398,323.676,324.98,337.963,324.98z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><g><g><path d="M941.6,534.8c-64.6-64.6-169.2-64.6-233.8,0c-8.3,8.3-15.4,17.3-21.5,26.7L165.8,41c-18.4-18.4-48.4-18.4-66.8,0L58.2,81.8c-18.5,18.4-18.4,48.4,0,66.8l48.1,48.1l-82.8,82.8c-18,18-18,47.1,0,65.1c18,18,47.1,18,65.1,0l82.8-82.8l18.3,18.3L106.9,363c-18,18-18,47.1,0,65.1s47.1,18,65.1,0l82.8-82.8l323.8,323.9c-9.4,6.1-18.4,13.2-26.7,21.5c-64.6,64.6-64.6,169.2,0,233.8c52.8,52.8,132.3,62.3,194.8,28.9c62.5,33.5,142.1,23.9,194.8-28.9c52.8-52.8,62.3-132.3,28.9-194.8C1004,667.1,994.4,587.5,941.6,534.8z M870.7,853.5c-29.7,29.7-77.9,29.7-107.6,0c-6.5-6.5-11.3-13.9-14.9-21.8c-31.9,29.6-81.7,29.1-112.7-1.9c-31.8-31.8-31.8-83.3,0-115c20.3-20.3,48.5-27.5,74.6-21.9c-5.6-26.1,1.6-54.3,21.9-74.6c31.8-31.8,83.3-31.8,115,0c31,31,31.5,80.8,1.9,112.7c7.9,3.7,15.3,8.5,21.8,14.9C900.4,775.6,900.4,823.8,870.7,853.5z"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="91px" height="93px" viewBox="0 0 91 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45 (43475) - http://www.bohemiancoding.com/sketch -->
<title>+VM</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="dashboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="+VM" transform="translate(-5.000000, -46.000000)" fill="#B0B0B0">
<g id="img_194174" stroke-width="1" fill-rule="evenodd" transform="translate(44.000000, 87.000000)">
<path d="M37.8716732,11.3625619 C37.8716732,12.857078 39.0853051,14.0654101 40.5745214,14.0654101 C42.0637378,14.0654101 43.2773696,12.8517783 43.2773696,11.3625619 C43.2773696,9.86804583 42.0637378,8.65971369 40.5745214,8.65971369 C39.0853051,8.65971369 37.8716732,9.86804583 37.8716732,11.3625619 Z M37.8716732,28.6713899 C37.8716732,30.165906 39.0853051,31.3742381 40.5745214,31.3742381 C42.0637378,31.3742381 43.2773696,30.1606063 43.2773696,28.6713899 C43.2773696,27.1768738 42.0637378,25.9685417 40.5745214,25.9685417 C39.0853051,25.9685417 37.8716732,27.1821735 37.8716732,28.6713899 L37.8716732,28.6713899 Z M0,35.7040949 C0,38.0942607 1.93439137,40.0339518 4.32985685,40.0339518 L22.7251238,40.0339518 L22.7251238,43.0229839 C22.1951536,43.378064 21.7393792,43.8338384 21.3842991,44.3638086 L8.11914405,44.3638086 C6.62462798,44.3638086 5.41629583,45.5774405 5.41629583,47.0666568 C5.41629583,48.5558732 6.62992768,49.7695051 8.11914405,49.7695051 L21.3842991,49.7695051 C22.25875,51.0785315 23.7426667,51.9317836 25.4332717,51.9317836 C27.1185771,51.9317836 28.6024938,51.0785315 29.4822443,49.7695051 L43.8285387,49.7695051 C45.3230548,49.7695051 46.5313869,48.5558732 46.5313869,47.0666568 C46.5313869,45.5774405 45.3177551,44.3638086 43.8285387,44.3638086 L29.4769446,44.3638086 C29.1218646,43.8338384 28.6660902,43.378064 28.1361199,43.0229839 L28.1361199,40.0392515 L47.6125262,40.0392515 C50.002692,40.0392515 51.942383,38.1048601 51.942383,35.7093946 L51.942383,4.32985685 C51.942383,1.93969107 50.0079917,0 47.6125262,0 L4.32985685,0 C1.93439137,0 0,1.93439137 0,4.32985685 L0,35.7040949 L0,35.7040949 Z M7.7905625,5.41099613 L44.1465208,5.41099613 C45.4661467,5.41099613 46.5260872,6.47093661 46.5260872,7.7905625 L46.5260872,14.9292616 C46.5260872,16.2488875 45.4661467,17.308828 44.1465208,17.308828 L7.7905625,17.308828 C6.47093661,17.308828 5.41099613,16.2488875 5.41099613,14.9292616 L5.41099613,7.7905625 C5.41099613,6.47093661 6.47093661,5.41099613 7.7905625,5.41099613 L7.7905625,5.41099613 L7.7905625,5.41099613 Z M7.7905625,22.7198241 L44.1465208,22.7198241 C45.4661467,22.7198241 46.5260872,23.7797646 46.5260872,25.0993905 L46.5260872,32.2380896 C46.5260872,33.5577155 45.4661467,34.617656 44.1465208,34.617656 L7.7905625,34.617656 C6.47093661,34.617656 5.41099613,33.5577155 5.41099613,32.2380896 L5.41099613,25.1046902 C5.41099613,23.7850643 6.47093661,22.7198241 7.7905625,22.7198241 L7.7905625,22.7198241 L7.7905625,22.7198241 Z" id="Shape" fill-rule="nonzero"></path>
</g>
<g id="+" font-size="114" font-family="Lato-Bold, Lato" font-weight="bold">
<text>
<tspan x="0" y="113">+</tspan>
</text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -24,6 +24,7 @@
<link href="{% static 'hosting/css/orders.css' %}" rel="stylesheet"> <link href="{% static 'hosting/css/orders.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/commons.css' %}" rel="stylesheet"> <link href="{% static 'hosting/css/commons.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/virtual-machine.css' %}" rel="stylesheet"> <link href="{% static 'hosting/css/virtual-machine.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/dashboard.css' %}" rel="stylesheet">
<!-- Custom Fonts --> <!-- Custom Fonts -->
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>

View file

@ -0,0 +1,10 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% block content %}
<div class="hosting-dashboard">
<div class="dashboard-container">
</div>
</div>
{%endblock%}

View file

@ -1,17 +1,20 @@
from django.conf.urls import url from django.conf.urls import url
from django.contrib.auth import views as auth_views from django.contrib.auth import views as auth_views
from .views import DjangoHostingView, RailsHostingView, PaymentVMView,\ from .views import (
NodeJSHostingView, LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView, \ DjangoHostingView, RailsHostingView, PaymentVMView, NodeJSHostingView,
OrdersHostingListView, OrdersHostingDetailView, VirtualMachinesPlanListView,\ LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView,
VirtualMachineView, OrdersHostingDeleteView, NotificationsView, \ NotificationsView, OrdersHostingListView, OrdersHostingDetailView,
MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView, HostingPricingView,\ VirtualMachinesPlanListView, VirtualMachineView, OrdersHostingDeleteView,
CreateVirtualMachinesView, HostingBillListView, HostingBillDetailView, \ MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView,
SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView HostingPricingView, CreateVirtualMachinesView, HostingBillListView,
HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView,
SSHKeyChoiceView, DashboardView)
urlpatterns = [ urlpatterns = [
url(r'index/?$', IndexView.as_view(), name='index'), url(r'index/?$', IndexView.as_view(), name='index'),
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'), url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
url(r'dashboard/?$', DashboardView.as_view(), name='dashboard'),
url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'), url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'),
url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'), url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'),
url(r'pricing/?$', HostingPricingView.as_view(), name='pricing'), url(r'pricing/?$', HostingPricingView.as_view(), name='pricing'),
@ -20,9 +23,12 @@ urlpatterns = [
url(r'orders/(?P<pk>\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'), url(r'orders/(?P<pk>\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'),
url(r'bills/?$', HostingBillListView.as_view(), name='bills'), url(r'bills/?$', HostingBillListView.as_view(), name='bills'),
url(r'bills/(?P<pk>\d+)/?$', HostingBillDetailView.as_view(), name='bills'), url(r'bills/(?P<pk>\d+)/?$', HostingBillDetailView.as_view(), name='bills'),
url(r'cancel_order/(?P<pk>\d+)/?$', OrdersHostingDeleteView.as_view(), name='delete_order'), url(r'cancel_order/(?P<pk>\d+)/?$',
url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(), name='create_virtual_machine'), OrdersHostingDeleteView.as_view(), name='delete_order'),
url(r'my-virtual-machines/?$', VirtualMachinesPlanListView.as_view(), name='virtual_machines'), url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(),
name='create_virtual_machine'),
url(r'my-virtual-machines/?$',
VirtualMachinesPlanListView.as_view(), name='virtual_machines'),
url(r'my-virtual-machines/(?P<pk>\d+)/?$', VirtualMachineView.as_view(), url(r'my-virtual-machines/(?P<pk>\d+)/?$', VirtualMachineView.as_view(),
name='virtual_machines'), name='virtual_machines'),
url(r'ssh_keys/?$', SSHKeyListView.as_view(), url(r'ssh_keys/?$', SSHKeyListView.as_view(),
@ -44,5 +50,6 @@ urlpatterns = [
PasswordResetConfirmView.as_view(), name='reset_password_confirm'), PasswordResetConfirmView.as_view(), name='reset_password_confirm'),
url(r'^logout/?$', auth_views.logout, url(r'^logout/?$', auth_views.logout,
{'next_page': '/hosting/login?logged_out=true'}, name='logout'), {'next_page': '/hosting/login?logged_out=true'}, name='logout'),
url(r'^validate/(?P<validate_slug>.*)/$', SignupValidatedView.as_view(), name='validate') url(r'^validate/(?P<validate_slug>.*)/$',
SignupValidatedView.as_view(), name='validate')
] ]

View file

@ -40,6 +40,18 @@ CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a backend
connection error. please try again in a few minutes." connection error. please try again in a few minutes."
class DashboardView(View):
template_name = "hosting/dashboard.html"
def get_context_data(self, **kwargs):
context = {}
return context
def get(self, request, *args, **kwargs):
context = self.get_context_data()
return render(request, self.template_name, context)
class DjangoHostingView(ProcessVMSelectionMixin, View): class DjangoHostingView(ProcessVMSelectionMixin, View):
template_name = "hosting/django.html" template_name = "hosting/django.html"
@ -244,7 +256,8 @@ class SignupValidatedView(SignupValidateView):
lurl=login_url) lurl=login_url)
else: else:
home_url = '<a href="' + \ home_url = '<a href="' + \
reverse('datacenterlight:index') + '">Data Center Light</a>' reverse('datacenterlight:index') + \
'">Data Center Light</a>'
message = '{sorry_message} <br />{go_back_to} {hurl}'.format( message = '{sorry_message} <br />{go_back_to} {hurl}'.format(
sorry_message=_("Sorry. Your request is invalid."), sorry_message=_("Sorry. Your request is invalid."),
go_back_to=_('Go back to'), go_back_to=_('Go back to'),
@ -557,7 +570,8 @@ class PaymentVMView(LoginRequiredMixin, FormView):
token=token) token=token)
if not customer: if not customer:
msg = _("Invalid credit card") msg = _("Invalid credit card")
messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='make_charge_error')
return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error')
# Create Billing Address # Create Billing Address
@ -571,7 +585,8 @@ class PaymentVMView(LoginRequiredMixin, FormView):
# Check if the payment was approved # Check if the payment was approved
if not charge_response.get('response_object') and not charge_response.get('paid'): if not charge_response.get('response_object') and not charge_response.get('paid'):
msg = charge_response.get('error') msg = charge_response.get('error')
messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') messages.add_message(
self.request, messages.ERROR, msg, extra_tags='make_charge_error')
return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error')
charge = charge_response.get('response_object') charge = charge_response.get('response_object')