From 43999d803a8a3deb67bc7b94f359ce2a9f808097 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 3 Jan 2018 08:43:57 +0100 Subject: [PATCH 001/121] Add sdd_size, hdd_size to VirtualMachineSerializer --- opennebula_api/serializers.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/opennebula_api/serializers.py b/opennebula_api/serializers.py index 662b2fb6..07506a8b 100644 --- a/opennebula_api/serializers.py +++ b/opennebula_api/serializers.py @@ -49,6 +49,8 @@ class VirtualMachineSerializer(serializers.Serializer): memory = serializers.SerializerMethodField() disk_size = serializers.SerializerMethodField() + hdd_size = serializers.SerializerMethodField() + sdd_size = serializers.SerializerMethodField() ipv4 = serializers.SerializerMethodField() ipv6 = serializers.SerializerMethodField() vm_id = serializers.IntegerField(read_only=True, source='id') @@ -102,6 +104,22 @@ class VirtualMachineSerializer(serializers.Serializer): disk_size += int(disk.size) return disk_size / 1024 + def get_sdd_size(self, obj): + template = obj.template + disk_size = 0 + for disk in template.disks: + if disk.datastore == 'cephds': + disk_size += int(disk.size) + return disk_size / 1024 + + def get_hdd_size(self, obj): + template = obj.template + disk_size = 0 + for disk in template.disks: + if disk.datastore == 'ceph_hdd_ds': + disk_size += int(disk.size) + return disk_size / 1024 + def get_price(self, obj): template = obj.template price = float(template.vcpu) * 5.0 From 74626a59dcd604eb31c56297e0559cd0ab217743 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 5 Jan 2018 05:18:35 +0530 Subject: [PATCH 002/121] galsfaser section cms plugin extra padding fix --- ungleich_page/static/ungleich_page/css/agency.css | 13 ++++++++++++- .../templates/ungleich_page/glasfaser.html | 11 +++++------ .../glasfaser/section_text_glasfaser.html | 3 +-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ungleich_page/static/ungleich_page/css/agency.css b/ungleich_page/static/ungleich_page/css/agency.css index 43a05898..011781e3 100755 --- a/ungleich_page/static/ungleich_page/css/agency.css +++ b/ungleich_page/static/ungleich_page/css/agency.css @@ -280,7 +280,7 @@ fieldset[disabled] .btn-xl.active { } .navbar-default .navbar-brand { - padding: 4px 8px 12px; + padding: 8px 8px; } .navbar-default.navbar-shrink .navbar-brand { padding: 6px 8px 10px; @@ -345,6 +345,7 @@ header .intro-text .intro-heading { section { padding: 75px 0; + border-bottom: 1px solid #f3f4f5; } @media(max-width:767px) { @@ -353,6 +354,16 @@ section { } } +section .section-heading-contain { + margin-bottom: 50px; +} + +@media(min-width:767px) { + section .section-heading-contain { + margin-bottom: 75px; + } +} + section h2.section-heading { margin-top: 0; margin-bottom: 15px; diff --git a/ungleich_page/templates/ungleich_page/glasfaser.html b/ungleich_page/templates/ungleich_page/glasfaser.html index 3d8fbb76..77338ac9 100644 --- a/ungleich_page/templates/ungleich_page/glasfaser.html +++ b/ungleich_page/templates/ungleich_page/glasfaser.html @@ -83,7 +83,7 @@ -
+
@@ -96,13 +96,12 @@
-
+
-
+

Was ist es?

-

Bei diesem Angebot handelt es sich um einen Internetzugang für Firmenkunden.

@@ -114,7 +113,7 @@
-
+

Technische Details

Im Angebot enthalten sind

@@ -156,7 +155,7 @@
-
+

Wie funktioniert es?

So kommen Sie in wenigen einfachen Schritten zu Ihrem High-Speed-Internet

diff --git a/ungleich_page/templates/ungleich_page/glasfaser/section_text_glasfaser.html b/ungleich_page/templates/ungleich_page/glasfaser/section_text_glasfaser.html index d3d83dfc..06b0e26d 100644 --- a/ungleich_page/templates/ungleich_page/glasfaser/section_text_glasfaser.html +++ b/ungleich_page/templates/ungleich_page/glasfaser/section_text_glasfaser.html @@ -1,9 +1,8 @@
-
+

{{instance.title}}

-

{{instance.description}}

From 3ef2aa4bfbd007721845c679cd572d717d0da28d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 5 Jan 2018 18:31:24 +0530 Subject: [PATCH 003/121] removed unused header plugins --- ungleich_page/cms_plugins.py | 70 +------------------ .../migrations/0018_auto_20180105_1826.py | 64 +++++++++++++++++ ungleich_page/models.py | 53 -------------- 3 files changed, 67 insertions(+), 120 deletions(-) create mode 100644 ungleich_page/migrations/0018_auto_20180105_1826.py diff --git a/ungleich_page/cms_plugins.py b/ungleich_page/cms_plugins.py index fb40ea2b..47f296aa 100644 --- a/ungleich_page/cms_plugins.py +++ b/ungleich_page/cms_plugins.py @@ -3,11 +3,10 @@ from cms.plugin_pool import plugin_pool from .models import ( UngelichContactUsSection, UngelichTextSection, Service, ServiceItem, - About, AboutItem, SectionWithImage, UngleichServiceItem, UngleichHeader, - UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer, - UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader, + About, AboutItem, SectionWithImage, UngleichServiceItem, + UngleichProductItem, UngleichProduct, UngleichCustomer, + UngleichCustomerItem, UngleichHTMLOnly, UngleichHeaderWithBackgroundImageSlider, - UngleichHeaderWithBackgroundImageSliderItem, UngleichHeaderWithBackgroundVideoSliderItem, ) @@ -184,49 +183,6 @@ class UngleichServicesItemPlugin(CMSPluginBase): return context -@plugin_pool.register_plugin -class UngleichHeaderWithTextAndImagePlugin(CMSPluginBase): - name = "ungleich Header with Text and Image Plugin" - model = UngleichSimpleHeader - render_template = "ungleich_page/ungleich/header.html" - cache = False - - def render(self, context, instance, placeholder): - context['instance'] = instance - return context - - -@plugin_pool.register_plugin -class UngleichHeaderWithTextAndImageSliderPlugin(CMSPluginBase): - name = "ungleich Header with Text and Image Slider Plugin" - model = UngleichHeader - render_template = "ungleich_page/ungleich/header_with_slider.html" - cache = False - allow_children = True - child_classes = ['UngleichHeaderItemPlugin'] - - def render(self, context, instance, placeholder): - context['instance'] = instance - return context - - -@plugin_pool.register_plugin -class UngleichHeaderItemPlugin(CMSPluginBase): - name = "ungleich Header Item Plugin" - model = UngleichHeaderItem - render_template = "ungleich_page/ungleich/_header_item.html" - cache = False - require_parent = True - parent_classes = ['UngleichHeaderWithTextAndImageSliderPlugin'] - - def render(self, context, instance, placeholder): - context = super(UngleichHeaderItemPlugin, self).render( - context, instance, placeholder - ) - context['instance'] = instance - return context - - @plugin_pool.register_plugin class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase): name = "ungleich Header with Background and Image Slider Plugin" @@ -237,7 +193,6 @@ class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase): cache = False allow_children = True child_classes = [ - 'UngleichHeaderBackgroundImageAndTextItemPlugin', 'UngleichHeaderBackgroundVideoItemPlugin', ] @@ -263,25 +218,6 @@ class UngleichHeaderBackgroundVideoItemPlugin(CMSPluginBase): return context -@plugin_pool.register_plugin -class UngleichHeaderBackgroundImageAndTextItemPlugin(CMSPluginBase): - name = "ungleich Header with Background and Image and Text Item Plugin" - model = UngleichHeaderWithBackgroundImageSliderItem - render_template = ( - 'ungleich_page/ungleich/_header_with_background_image_slider_item.html' - ) - cache = False - require_parent = True - parent_classes = ['UngleichHeaderBackgroundImageAndTextSliderPlugin'] - - def render(self, context, instance, placeholder): - context = super( - UngleichHeaderBackgroundImageAndTextItemPlugin, self - ).render(context, instance, placeholder) - context['instance'] = instance - return context - - @plugin_pool.register_plugin class UngleichProductsPlugin(CMSPluginBase): name = "ungleich Products Plugin" diff --git a/ungleich_page/migrations/0018_auto_20180105_1826.py b/ungleich_page/migrations/0018_auto_20180105_1826.py new file mode 100644 index 00000000..b269fb04 --- /dev/null +++ b/ungleich_page/migrations/0018_auto_20180105_1826.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-01-05 12:56 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0014_auto_20160404_1908'), + ('ungleich_page', '0017_auto_20171219_1856'), + ] + + operations = [ + migrations.RemoveField( + model_name='ungleichheader', + name='background_image', + ), + migrations.RemoveField( + model_name='ungleichheader', + name='cmsplugin_ptr', + ), + migrations.RemoveField( + model_name='ungleichheaderitem', + name='cmsplugin_ptr', + ), + migrations.RemoveField( + model_name='ungleichheaderitem', + name='image', + ), + migrations.RemoveField( + model_name='ungleichheaderwithbackgroundimageslideritem', + name='background_image', + ), + migrations.RemoveField( + model_name='ungleichheaderwithbackgroundimageslideritem', + name='cmsplugin_ptr', + ), + migrations.RemoveField( + model_name='ungleichsimpleheader', + name='background_image', + ), + migrations.RemoveField( + model_name='ungleichsimpleheader', + name='cmsplugin_ptr', + ), + migrations.RemoveField( + model_name='ungleichsimpleheader', + name='image', + ), + migrations.DeleteModel( + name='UngleichHeader', + ), + migrations.DeleteModel( + name='UngleichHeaderItem', + ), + migrations.DeleteModel( + name='UngleichHeaderWithBackgroundImageSliderItem', + ), + migrations.DeleteModel( + name='UngleichSimpleHeader', + ), + ] diff --git a/ungleich_page/models.py b/ungleich_page/models.py index ad44c161..b96afcb1 100644 --- a/ungleich_page/models.py +++ b/ungleich_page/models.py @@ -98,63 +98,10 @@ class UngleichServiceItem(ServiceItem): ) -class UngleichSimpleHeader(CMSPlugin): - background_image = FilerImageField( - null=True, - blank=True, - related_name="ungleich_simple_header_background_image", - on_delete=models.SET_NULL - ) - image = FilerImageField( - null=True, - blank=True, - related_name="ungleich_simple_header_image", - on_delete=models.SET_NULL - ) - text = HTMLField() - - -class UngleichHeader(CMSPlugin): - background_image = FilerImageField( - null=True, - blank=True, - related_name="ungleich_header_background_image", - on_delete=models.SET_NULL - ) - carousel_data_interval = models.IntegerField(default=5000) - - -class UngleichHeaderWithBackgroundImageSliderItem(CMSPlugin): - background_image = FilerImageField( - null=True, blank=True, - related_name="ungleich_header_slider_item_image", - on_delete=models.SET_NULL - ) - description = HTMLField( - default='
We Design, Configure & Maintain ' - '
Your Linux Infrastructure

' - 'Ruby on Rails, Django, Java, Webserver, Mailserver, any ' - 'infrastructure that needs to configured, we provide ' - 'comprehensive solutions. Amazon, rackspace or bare metal ' - 'servers, we configure for you.

Learn More

' - ) - - class UngleichHeaderWithBackgroundImageSlider(CMSPlugin): carousel_data_interval = models.IntegerField(default=2000) -class UngleichHeaderItem(CMSPlugin): - image = FilerImageField( - null=True, - blank=True, - related_name="ungleich_header_item_image", - on_delete=models.SET_NULL - ) - description = HTMLField() - - class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin): image = FilerImageField( null=True, From 205274be42c72b60e2ea8f5f50f29a05383c7418 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Sun, 7 Jan 2018 20:40:38 +0530 Subject: [PATCH 004/121] removed ununsed templates --- .../ungleich_page/ungleich/_header_item.html | 14 ------------- ...der_with_background_image_slider_item.html | 4 ---- .../ungleich_page/ungleich/header.html | 15 ------------- .../ungleich/header_with_slider.html | 21 ------------------- 4 files changed, 54 deletions(-) delete mode 100644 ungleich_page/templates/ungleich_page/ungleich/_header_item.html delete mode 100644 ungleich_page/templates/ungleich_page/ungleich/_header_with_background_image_slider_item.html delete mode 100644 ungleich_page/templates/ungleich_page/ungleich/header.html delete mode 100644 ungleich_page/templates/ungleich_page/ungleich/header_with_slider.html diff --git a/ungleich_page/templates/ungleich_page/ungleich/_header_item.html b/ungleich_page/templates/ungleich_page/ungleich/_header_item.html deleted file mode 100644 index a770d1ed..00000000 --- a/ungleich_page/templates/ungleich_page/ungleich/_header_item.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
- {% if instance.image %} - -
- {% endif %} -
- - {{ instance.description }} - -
-
-
diff --git a/ungleich_page/templates/ungleich_page/ungleich/_header_with_background_image_slider_item.html b/ungleich_page/templates/ungleich_page/ungleich/_header_with_background_image_slider_item.html deleted file mode 100644 index 063a0a7b..00000000 --- a/ungleich_page/templates/ungleich_page/ungleich/_header_with_background_image_slider_item.html +++ /dev/null @@ -1,4 +0,0 @@ -
-
- {{ instance.description }} -
\ No newline at end of file diff --git a/ungleich_page/templates/ungleich_page/ungleich/header.html b/ungleich_page/templates/ungleich_page/ungleich/header.html deleted file mode 100644 index 77c7ffdf..00000000 --- a/ungleich_page/templates/ungleich_page/ungleich/header.html +++ /dev/null @@ -1,15 +0,0 @@ -{% load cms_tags %} - -
-
-
- -


-
- - {{ instance.text }} - -
-
-
-
diff --git a/ungleich_page/templates/ungleich_page/ungleich/header_with_slider.html b/ungleich_page/templates/ungleich_page/ungleich/header_with_slider.html deleted file mode 100644 index 9cf759e6..00000000 --- a/ungleich_page/templates/ungleich_page/ungleich/header_with_slider.html +++ /dev/null @@ -1,21 +0,0 @@ -{% load cms_tags %} -
- -
\ No newline at end of file From 157cc5ac5d7161f5ff4442aa6936dae237988678 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Mon, 8 Jan 2018 00:56:54 +0530 Subject: [PATCH 005/121] fix datacenterlight templates --- .../datacenterlight/base_hosting.html | 117 ++++++++++++++++++ .../emails/base_email_datacenterlight.html | 2 + .../_calculator_form.html} | 0 .../templates/datacenterlight/index.html | 2 +- .../datacenterlight/landing_payment.html | 2 +- .../datacenterlight/order_detail.html | 2 +- .../datacenterlight/whydatacenterlight.html | 2 +- datacenterlight/urls.py | 4 +- datacenterlight/views.py | 2 + 9 files changed, 127 insertions(+), 6 deletions(-) create mode 100644 datacenterlight/templates/datacenterlight/base_hosting.html rename datacenterlight/templates/datacenterlight/{calculator_form.html => includes/_calculator_form.html} (100%) diff --git a/datacenterlight/templates/datacenterlight/base_hosting.html b/datacenterlight/templates/datacenterlight/base_hosting.html new file mode 100644 index 00000000..613d67a9 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/base_hosting.html @@ -0,0 +1,117 @@ +{% load staticfiles bootstrap3%} +{% load i18n %} + + + + + + + + + + + + ungleich + + + + + + + + + + + + + + + {% block css_extra %} + {% endblock css_extra %} + + + + + + + + + + + + + {% include "google_analytics.html" %} + + + + + + + {% block navbar %} + {% include "hosting/includes/_navbar_user.html" %} + {% endblock navbar %} + +
+ {% block content %} + {% endblock %} +
+ + + {% if request.user.is_authenticated %} +
+
+ +
+
+ {% else %} + + {% endif %} + + + + + + + + + + + + + + + + + + + + + {% block js_extra %} + {% comment %} + this block is above some files, because on stripe error scripts below the stripe + script are not properly executed. + {% endcomment %} + {% endblock js_extra %} + + + + + + + + + + + + + + + + + + diff --git a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html index be8479d9..3f06b069 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html +++ b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html @@ -1,5 +1,7 @@ {% load static from staticfiles %} {% load i18n %} +{% comment %} unused {% endcomment %} +
- {% include "datacenterlight/calculator_form.html" %} + {% include "datacenterlight/includes/_calculator_form.html" %}
diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html index f2f75e9c..8e779576 100644 --- a/datacenterlight/templates/datacenterlight/landing_payment.html +++ b/datacenterlight/templates/datacenterlight/landing_payment.html @@ -1,4 +1,4 @@ -{% extends "hosting/base_short.html" %} +{% extends "datacenterlight/base_hosting.html" %} {% load staticfiles bootstrap3 i18n %} {% block css_extra %} diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index ec4befc9..79119777 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -1,4 +1,4 @@ -{% extends "hosting/order_detail.html" %} +{% extends "datacenterlight/base_hosting.html" %} {% load i18n %} {% block navbar %} diff --git a/datacenterlight/templates/datacenterlight/whydatacenterlight.html b/datacenterlight/templates/datacenterlight/whydatacenterlight.html index c54156b6..ee6cfefa 100644 --- a/datacenterlight/templates/datacenterlight/whydatacenterlight.html +++ b/datacenterlight/templates/datacenterlight/whydatacenterlight.html @@ -137,7 +137,7 @@
- {% include "datacenterlight/calculator_form.html" %} + {% include "datacenterlight/includes/_calculator_form.html" %}
diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 2cd0723f..8d6273ef 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -17,8 +17,8 @@ urlpatterns = [ url(r'^l/$', IndexView.as_view(), name='index_l'), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), - url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), - url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), + # url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), + # url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), diff --git a/datacenterlight/views.py b/datacenterlight/views.py index fda8c9c9..8a41005f 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -76,6 +76,7 @@ class ContactUsView(FormView): class LandingProgramView(TemplateView): + # FIXME: template doesn't exist template_name = "datacenterlight/landing.html" @@ -143,6 +144,7 @@ class BetaAccessView(FormView): class BetaProgramView(CreateView): + # FIXME: template doesn't exist template_name = "datacenterlight/beta.html" model = BetaAccessVM fields = '__all__' From 0697492ab8cc2912adbf2fbf7c82855cda988ade Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Mon, 8 Jan 2018 07:36:30 +0530 Subject: [PATCH 006/121] removed unused css files --- datacenterlight/templates/datacenterlight/base_hosting.html | 3 --- datacenterlight/templates/datacenterlight/beta_success.html | 1 - dynamicweb/settings/base.py | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/base_hosting.html b/datacenterlight/templates/datacenterlight/base_hosting.html index 613d67a9..848b8a46 100644 --- a/datacenterlight/templates/datacenterlight/base_hosting.html +++ b/datacenterlight/templates/datacenterlight/base_hosting.html @@ -21,10 +21,8 @@ - - {% block css_extra %} {% endblock css_extra %} @@ -49,7 +47,6 @@ - {% block navbar %} {% include "hosting/includes/_navbar_user.html" %} {% endblock navbar %} diff --git a/datacenterlight/templates/datacenterlight/beta_success.html b/datacenterlight/templates/datacenterlight/beta_success.html index 60df607c..7ac49457 100644 --- a/datacenterlight/templates/datacenterlight/beta_success.html +++ b/datacenterlight/templates/datacenterlight/beta_success.html @@ -1,4 +1,3 @@ - {% load i18n %} -
+ {% csrf_token %}
+
{{contact_form.name.errors}}
@@ -30,6 +31,7 @@
+
{{contact_form.email.errors}}
@@ -37,6 +39,7 @@
+
{{contact_form.message.errors}}
diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index e2f1edc0..2f435704 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,6 +1,6 @@ -{% load staticfiles i18n%} -{% load custom_tags %} +{% load staticfiles i18n custom_tags %} {% get_current_language as LANGUAGE_CODE %} +
diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 8a41005f..0e860b7e 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -391,7 +391,6 @@ class PaymentOrderView(FormView): @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs): - # user is no longer added to session on the index page if 'specs' not in request.session: return HttpResponseRedirect(reverse('datacenterlight:index')) return self.render_to_response(self.get_context_data()) diff --git a/digitalglarus/templates/new_base_glarus.html b/digitalglarus/templates/new_base_glarus.html index 3b18756d..9a24f269 100644 --- a/digitalglarus/templates/new_base_glarus.html +++ b/digitalglarus/templates/new_base_glarus.html @@ -72,8 +72,8 @@ margin: 0px; color:white; } - - @media only screen and (min-width: 769px){ + + @media only screen and (min-width: 769px){ .dropdown.home-dropdown-mobile { display: none; } @@ -81,14 +81,14 @@ display: block; } } - - + + @media only screen and (max-width: 768px){ .dropdown.home-dropdown-mobile { display: block; - background-color: + background-color: } - + .dropdown.home-dropdown-mobile .dropdown-menu{ display: block; background-color: #0f1221; @@ -104,19 +104,19 @@ .dropdown.home-dropdown { display: none; } - + } - + - +