From e394c3a0a5136f633dd0e7cad8661b15fdfd76b5 Mon Sep 17 00:00:00 2001 From: Timur Sufiev Date: Thu, 12 Dec 2013 16:52:25 +0400 Subject: [PATCH] Cherry-pick the following commits from master: * Remove 'DatatableOptions' from 'Compose Service' form tabs. Ibbba6c360ea46e9164cf326adeedd49ee531bd07 Closes-bug: #1260312 * Fix issues with namings I86a2352fd936991552e9e4355a997c3b479f3f8a * Fix message about images when there is no any Ibfc8622a86065ea8ecd5d6d9e5e49ff34567c5d1 * Fix showing Services list based on available images. I518f295930400486f9735d8b23c8ec39af1008cd This fixes affect user interface (and jump up to the eyes), so they are better included in release-0.4. Change-Id: Idea24e356fca65039fdf0ca86aafbef9eba2fb0e --- muranodashboard/environments/forms.py | 17 ++++++++++------- muranodashboard/service_catalog/forms.py | 2 +- .../form-fields/data-grid/table_field.html | 7 ++++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/muranodashboard/environments/forms.py b/muranodashboard/environments/forms.py index f823d1d57..99c362519 100644 --- a/muranodashboard/environments/forms.py +++ b/muranodashboard/environments/forms.py @@ -45,13 +45,16 @@ def filter_service_by_image_type(service, request): for image in available_images: registered_murano_images.append(image.murano_property.get('type')) - for type in registered_murano_images: - if specified_image_type in type: - filtered = True - message = '' - else: - message = 'Murano image type "{0}" is not registered'.format( - specified_image_type) + if registered_murano_images: + for type in registered_murano_images: + if specified_image_type in type: + filtered = True + break + if not filtered: + message = 'Murano image type "{0}" is not registered'.format( + specified_image_type) + else: + message = '' return filtered, message diff --git a/muranodashboard/service_catalog/forms.py b/muranodashboard/service_catalog/forms.py index d0a382b08..e8af12967 100644 --- a/muranodashboard/service_catalog/forms.py +++ b/muranodashboard/service_catalog/forms.py @@ -103,7 +103,7 @@ class UploadFileForm(UploadFileKnownTypeForm): 'scripts': 'Script for agent execution' } - data_type = forms.ChoiceField(label=_('File data type'), + data_type = forms.ChoiceField(label=_('File Type'), choices=(supported_data_types.items())) def handle(self, request, data): diff --git a/muranodashboard/templates/common/form-fields/data-grid/table_field.html b/muranodashboard/templates/common/form-fields/data-grid/table_field.html index 8946a4e49..4d4817a47 100644 --- a/muranodashboard/templates/common/form-fields/data-grid/table_field.html +++ b/muranodashboard/templates/common/form-fields/data-grid/table_field.html @@ -126,8 +126,9 @@ } $(rowRef).remove(); }); - - $('.data-grid .table_caption').remove() }); -{% endif %} \ No newline at end of file +{% endif %} +