diff --git a/muranodashboard/environments/tables.py b/muranodashboard/environments/tables.py index 4971a9a99..bf1dd0cab 100644 --- a/muranodashboard/environments/tables.py +++ b/muranodashboard/environments/tables.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -import json - from django.core.urlresolvers import reverse from django import http as django_http from django import shortcuts @@ -417,7 +415,7 @@ class ServicesTable(tables.DataTable): packages, self._more = pkg_api.package_list( self.request, filters={'type': 'Application', 'catalog': True}) - return json.dumps([package.to_dict() for package in packages]) + return [package.to_dict() for package in packages] def actions_allowed(self): status, version = _get_environment_status_and_version( diff --git a/muranodashboard/templates/services/_data_table.html b/muranodashboard/templates/services/_data_table.html index 5a0bceca3..53e836454 100644 --- a/muranodashboard/templates/services/_data_table.html +++ b/muranodashboard/templates/services/_data_table.html @@ -1,15 +1,10 @@ {% load i18n %} {% load custom_filters %} +{% load jsonify %} {% block table_caption %} {% with apps=table.get_apps_list %} - {% comment %} - Note(efedorova): We are comparing to the string, since get_apps_list - functions returns json.dumps, which is used in js later. - So to prevent extra transformations comparing to the string is used - to check for app absence. - {% endcomment %} - {% if apps != '[]' %} + {% if apps %}

{% trans "Application Components" %}

@@ -79,7 +74,7 @@ {% trans "There are no applications matching your criteria." %}