From c891694dc00fd7c871880e7d5a36c11e3c285ad4 Mon Sep 17 00:00:00 2001 From: Malcolm Anyakee Date: Sat, 25 Aug 2018 23:13:16 +0200 Subject: [PATCH 01/10] Update Bugfix Fixed bugs and fixed typo --- hosting/locale/de/LC_MESSAGES/django.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index a9e33644..4cdfc6f6 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -209,7 +209,7 @@ msgstr "Du hast eine neue virtuelle Maschine bestellt!" #, python-format msgid "Your order of %(vm_name)s has been charged." -msgstr "Deine Bestellung von %(vm_name)s wurde erhoben." +msgstr "Deine Bestellung von %(vm_name)s wurde entgegengenommen." msgid "You can view your VM detail by clicking the button below." msgstr "Um die Rechnung zu sehen, klicke auf den Button unten." @@ -222,7 +222,7 @@ msgstr "Dein Data Center Light Team" #, python-format msgid "Your order of %(vm_name)s has been charged." -msgstr "Deine Bestellung von %(vm_name)s wurde erhoben." +msgstr "Deine Bestellung von %(vm_name)s wurde entgegengenommen." msgid "You can view your VM detail by following the link below." msgstr "Um die Rechnung zu sehen, klicke auf den Link unten." @@ -249,7 +249,7 @@ msgstr "VM Kündigung" #, python-format msgid "" -"You are receiving this email because your virutal machine " +"You are receiving this email because your virtual machine " "%(vm_name)s has been cancelled." msgstr "" "Du erhälst diese E-Mail, da deine virtuelle Maschine %(vm_name)s Date: Wed, 26 Sep 2018 20:50:19 +0200 Subject: [PATCH 02/10] Correct spelling: virutal -> virtual --- hosting/templates/hosting/emails/vm_canceled.html | 2 +- hosting/templates/hosting/emails/vm_canceled.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosting/templates/hosting/emails/vm_canceled.html b/hosting/templates/hosting/emails/vm_canceled.html index 9c2ec4c2..78781d5c 100644 --- a/hosting/templates/hosting/emails/vm_canceled.html +++ b/hosting/templates/hosting/emails/vm_canceled.html @@ -25,7 +25,7 @@

- {% blocktrans %}You are receiving this email because your virutal machine {{ vm_name }} has been cancelled.{% endblocktrans %} + {% blocktrans %}You are receiving this email because your virtual machine {{ vm_name }} has been cancelled.{% endblocktrans %}

{% blocktrans %}You can always order a new VM by clicking the button below.{% endblocktrans %} diff --git a/hosting/templates/hosting/emails/vm_canceled.txt b/hosting/templates/hosting/emails/vm_canceled.txt index 9149a554..43263c40 100644 --- a/hosting/templates/hosting/emails/vm_canceled.txt +++ b/hosting/templates/hosting/emails/vm_canceled.txt @@ -2,7 +2,7 @@ {% trans "Virtual Machine Cancellation" %} -{% blocktrans %}You are receiving this email because your virutal machine {{vm_name}} has been cancelled.{% endblocktrans %} +{% blocktrans %}You are receiving this email because your virtual machine {{vm_name}} has been cancelled.{% endblocktrans %} {% blocktrans %}You can always order a new VM by following the link below.{% endblocktrans %} {{ base_url }}{% url 'hosting:create_virtual_machine' %} From efae2b1d9ac0815b5c7fa6f74d21e605ead557a6 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 26 Sep 2018 21:17:35 +0200 Subject: [PATCH 03/10] Update Changelog --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 051a0a7b..db20e920 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +Next: + * bugfix: Fix some typos and correct DE translations (PR #667) 2.2.1: 2018-09-25 * feature: Change DCLNavbarPlugin to show login option only if set (PR #665) * bugfix: Log opennebula errors and send proper message when vm terminate is not completed in the stipulated time (PR #648) From 768f3532f7882d41cddb85f8d5f76fe7fb62b115 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 27 Sep 2018 22:09:11 +0200 Subject: [PATCH 04/10] Add default_selected_template field to DCLCalculatorPluginModel --- datacenterlight/cms_models.py | 7 +++++++ ...orpluginmodel_default_selected_template.py | 20 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py diff --git a/datacenterlight/cms_models.py b/datacenterlight/cms_models.py index 69f45507..10ea1510 100644 --- a/datacenterlight/cms_models.py +++ b/datacenterlight/cms_models.py @@ -354,3 +354,10 @@ class DCLCalculatorPluginModel(CMSPlugin): "in the backend to be automatically listed in this " "calculator instance." ) + default_selected_template=models.CharField( + default="Devuan Jessie", + null=True, + max_length=128, + help_text="Write the name of the template that you need selected as" + " default when the calculator loads" + ) diff --git a/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py b/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py new file mode 100644 index 00000000..257bf0ce --- /dev/null +++ b/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-09-27 20:07 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('datacenterlight', '0025_dclnavbarpluginmodel_show_login_option'), + ] + + operations = [ + migrations.AddField( + model_name='dclcalculatorpluginmodel', + name='default_selected_template', + field=models.CharField(default='Devuan Jessie', help_text='Write the name of the template that you need selected as default when the calculator loads', max_length=128, null=True), + ), + ] From a02c3c6973976ff6439081236ea0060463ff689d Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 27 Sep 2018 22:12:04 +0200 Subject: [PATCH 05/10] Sort templates alphabetically And also select the chosen template as the default one --- datacenterlight/cms_plugins.py | 7 +++++-- .../datacenterlight/includes/_calculator_form.html | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index 95a496d8..b7841de8 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -92,11 +92,14 @@ class DCLCalculatorPlugin(CMSPluginBase): if ids: context['templates'] = VMTemplate.objects.filter( vm_type=instance.vm_type - ).filter(opennebula_vm_template_id__in=ids) + ).filter(opennebula_vm_template_id__in=ids).order_by('name') else: context['templates'] = VMTemplate.objects.filter( vm_type=instance.vm_type - ) + ).order_by('name') + context['default_selected_template'] = ( + instance.default_selected_template + ) return context diff --git a/datacenterlight/templates/datacenterlight/includes/_calculator_form.html b/datacenterlight/templates/datacenterlight/includes/_calculator_form.html index 72ca5a05..0a35e2ad 100644 --- a/datacenterlight/templates/datacenterlight/includes/_calculator_form.html +++ b/datacenterlight/templates/datacenterlight/includes/_calculator_form.html @@ -91,7 +91,8 @@ From d93861ca328872850a282318b66ae503b22ed86d Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 27 Sep 2018 22:14:42 +0200 Subject: [PATCH 06/10] Set Devuan Ascii as default template --- datacenterlight/cms_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/cms_models.py b/datacenterlight/cms_models.py index 10ea1510..60ff72c4 100644 --- a/datacenterlight/cms_models.py +++ b/datacenterlight/cms_models.py @@ -355,7 +355,7 @@ class DCLCalculatorPluginModel(CMSPlugin): "calculator instance." ) default_selected_template=models.CharField( - default="Devuan Jessie", + default="Devuan Ascii", null=True, max_length=128, help_text="Write the name of the template that you need selected as" From 56460ac8f0f962d8a2bdd3421d4c5faa8754d241 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 27 Sep 2018 22:16:05 +0200 Subject: [PATCH 07/10] Update migration --- ...0026_dclcalculatorpluginmodel_default_selected_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py b/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py index 257bf0ce..0bca184a 100644 --- a/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py +++ b/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2018-09-27 20:07 +# Generated by Django 1.9.4 on 2018-09-27 20:15 from __future__ import unicode_literals from django.db import migrations, models @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='dclcalculatorpluginmodel', name='default_selected_template', - field=models.CharField(default='Devuan Jessie', help_text='Write the name of the template that you need selected as default when the calculator loads', max_length=128, null=True), + field=models.CharField(default='Devuan Ascii', help_text='Write the name of the template that you need selected as default when the calculator loads', max_length=128, null=True), ), ] From b047ccdef1445040339d7f43ebbc52789ba36cc1 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 27 Sep 2018 22:33:24 +0200 Subject: [PATCH 08/10] Fix flake8 error --- datacenterlight/cms_models.py | 2 +- .../0026_dclcalculatorpluginmodel_default_selected_template.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenterlight/cms_models.py b/datacenterlight/cms_models.py index 60ff72c4..7b0e81f4 100644 --- a/datacenterlight/cms_models.py +++ b/datacenterlight/cms_models.py @@ -354,7 +354,7 @@ class DCLCalculatorPluginModel(CMSPlugin): "in the backend to be automatically listed in this " "calculator instance." ) - default_selected_template=models.CharField( + default_selected_template = models.CharField( default="Devuan Ascii", null=True, max_length=128, diff --git a/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py b/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py index 0bca184a..047d4096 100644 --- a/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py +++ b/datacenterlight/migrations/0026_dclcalculatorpluginmodel_default_selected_template.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2018-09-27 20:15 +# Generated by Django 1.9.4 on 2018-09-27 20:32 from __future__ import unicode_literals from django.db import migrations, models From 737d890a7cbf6ffa60d429eca4f84df1216828c1 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 28 Sep 2018 08:11:36 +0200 Subject: [PATCH 09/10] Update Changelog for 2.2.2 --- Changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index db20e920..71237d5c 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ -Next: +2.2.2: 2018-09-28 + * #5721: Set calculator OS list in alphabetical order and set `Devuan Ascii` as the default * bugfix: Fix some typos and correct DE translations (PR #667) 2.2.1: 2018-09-25 * feature: Change DCLNavbarPlugin to show login option only if set (PR #665) From 8743853a7b06fe2c59de5e5faceaa27f4b77b0af Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 28 Sep 2018 08:13:37 +0200 Subject: [PATCH 10/10] Update Changelog --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 71237d5c..190a7af8 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,5 @@ 2.2.2: 2018-09-28 - * #5721: Set calculator OS list in alphabetical order and set `Devuan Ascii` as the default + * #5721: Set calculator OS list in alphabetical order and set `Devuan Ascii` as the default (PR #668) * bugfix: Fix some typos and correct DE translations (PR #667) 2.2.1: 2018-09-25 * feature: Change DCLNavbarPlugin to show login option only if set (PR #665)