diff --git a/openstack_dashboard/dashboards/project/containers/tables.py b/openstack_dashboard/dashboards/project/containers/tables.py index fef97c5842..b283a72d8b 100644 --- a/openstack_dashboard/dashboards/project/containers/tables.py +++ b/openstack_dashboard/dashboards/project/containers/tables.py @@ -13,13 +13,11 @@ # under the License. import logging -from django.conf import settings from django.core.urlresolvers import reverse from django import shortcuts from django import template from django.template import defaultfilters as filters from django.utils import http -from django.utils import safestring from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy @@ -32,8 +30,6 @@ from openstack_dashboard.api import swift from openstack_dashboard.dashboards.project.containers import utils LOG = logging.getLogger(__name__) -static_url = getattr(settings, 'STATIC_URL', '/static/') -LOADING_IMAGE = '' % static_url class ViewContainer(tables.LinkAction): @@ -240,7 +236,9 @@ class ContainerAjaxUpdateRow(tables.Row): def get_metadata(container): # If the metadata has not been loading, display a loading image if not hasattr(container, 'is_public'): - return safestring.mark_safe(LOADING_IMAGE) + return template.loader.render_to_string( + 'project/containers/_container_loader.html' + ) template_name = 'project/containers/_container_metadata.html' context = {"container": container} return template.loader.render_to_string(template_name, context) diff --git a/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html b/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html new file mode 100644 index 0000000000..1f42aaf4ca --- /dev/null +++ b/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html @@ -0,0 +1,5 @@ +
+
+
+
+
diff --git a/openstack_dashboard/static/dashboard/img/loading.gif b/openstack_dashboard/static/dashboard/img/loading.gif deleted file mode 100644 index d8f18c2b1b..0000000000 Binary files a/openstack_dashboard/static/dashboard/img/loading.gif and /dev/null differ diff --git a/openstack_dashboard/static/dashboard/scss/_legacy.scss b/openstack_dashboard/static/dashboard/scss/_legacy.scss index 6173fc388b..18b3166a51 100644 --- a/openstack_dashboard/static/dashboard/scss/_legacy.scss +++ b/openstack_dashboard/static/dashboard/scss/_legacy.scss @@ -142,9 +142,3 @@ .dropdown_fix { overflow: visible; } - -/* Does something with CPU hungry spin.js with animated gif */ -.loading_gif { - margin-right: 0.5em; - float: left; -} diff --git a/openstack_dashboard/static/dashboard/scss/components/_pending_bar.scss b/openstack_dashboard/static/dashboard/scss/components/_pending_bar.scss index 97fd8f68e8..d1fc795fa3 100644 --- a/openstack_dashboard/static/dashboard/scss/components/_pending_bar.scss +++ b/openstack_dashboard/static/dashboard/scss/components/_pending_bar.scss @@ -11,4 +11,8 @@ left: calc(50% - .5em); bottom: calc(50% - .5em); } + + &.container-pending-bar .progress { + margin-bottom: 0; + } }