diff --git a/ansibleworks/ui/static/js/helpers/refresh-related.js b/ansibleworks/ui/static/js/helpers/refresh-related.js index 3a5997439f..48adb23908 100644 --- a/ansibleworks/ui/static/js/helpers/refresh-related.js +++ b/ansibleworks/ui/static/js/helpers/refresh-related.js @@ -32,6 +32,7 @@ angular.module('RefreshRelatedHelper', ['RestServices', 'Utilities']) scope[iterator + 'Count'] = data.count; scope[iterator + 'PageCount'] = Math.ceil((data.count / scope[iterator + 'PageSize'])); scope[iterator + 'SearchSpin'] = false; + scope[iterator + 'Loading'] = false; }) .error ( function(data, status, headers, config) { scope[iterator + 'SearchSpin'] = true; diff --git a/ansibleworks/ui/static/js/helpers/refresh.js b/ansibleworks/ui/static/js/helpers/refresh.js index f7aec7994f..6ce2eb1ccb 100644 --- a/ansibleworks/ui/static/js/helpers/refresh.js +++ b/ansibleworks/ui/static/js/helpers/refresh.js @@ -30,6 +30,7 @@ angular.module('RefreshHelper', ['RestServices', 'Utilities']) scope[iterator + 'Count'] = data.count; scope[iterator + 'PageCount'] = Math.ceil((data.count / scope[iterator + 'PageSize'])); scope[iterator + 'SearchSpin'] = false; + scope[iterator + 'Loading'] = false; scope[set] = data['results']; scope.$emit('PostRefresh'); }) diff --git a/ansibleworks/ui/static/js/helpers/related-search.js b/ansibleworks/ui/static/js/helpers/related-search.js index a327fb7d7f..602f91e1c2 100644 --- a/ansibleworks/ui/static/js/helpers/related-search.js +++ b/ansibleworks/ui/static/js/helpers/related-search.js @@ -53,6 +53,8 @@ angular.module('RelatedSearchHelper', ['RestServices', 'Utilities','RefreshRelat scope.search = function(model) { scope[model + 'SearchSpin'] = true; + scope[model + 'Loading'] = true; + var set, url, iterator, default_order; for (var key in relatedSets) { if (relatedSets[key].iterator == model) { diff --git a/ansibleworks/ui/static/js/helpers/search.js b/ansibleworks/ui/static/js/helpers/search.js index 97076891ad..ad6b4f96eb 100644 --- a/ansibleworks/ui/static/js/helpers/search.js +++ b/ansibleworks/ui/static/js/helpers/search.js @@ -97,6 +97,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper']) // need to be able to search by related set. Ex: /api/v1/inventories/?organization__name__icontains= // scope[iterator + 'SearchSpin'] = true; + scope[iterator + 'Loading'] = true; scope[iterator + 'SearchParms'] = ''; var url = defaultUrl; if ( (scope[iterator + 'SelectShow'] == false && scope[iterator + 'SearchValue'] != '' && scope[iterator + 'SearchValue'] != undefined) || diff --git a/ansibleworks/ui/static/lib/ansible/form-generator.js b/ansibleworks/ui/static/lib/ansible/form-generator.js index cd7e46641c..b5ec5c797d 100644 --- a/ansibleworks/ui/static/lib/ansible/form-generator.js +++ b/ansibleworks/ui/static/lib/ansible/form-generator.js @@ -701,10 +701,15 @@ angular.module('FormGenerator', ['GeneratorHelpers']) html += "\n"; // Message for when a related collection is empty - html += "\n"; + html += "\n"; html += "
No records matched your search.
\n"; html += "\n"; + // Message for loading + html += "\n"; + html += "
Loading...
\n"; + html += "\n"; + // End List html += "\n"; html += "\n"; diff --git a/ansibleworks/ui/static/lib/ansible/list-generator.js b/ansibleworks/ui/static/lib/ansible/list-generator.js index 2c63c595a9..1628918b4e 100644 --- a/ansibleworks/ui/static/lib/ansible/list-generator.js +++ b/ansibleworks/ui/static/lib/ansible/list-generator.js @@ -252,9 +252,14 @@ angular.module('ListGenerator', ['GeneratorHelpers',]) html += "\n"; // Message for when a collection is empty - html += "\n"; + html += "\n"; html += "
No records matched your search.
\n"; html += "\n"; + + // Message for loading + html += "\n"; + html += "
Loading...
\n"; + html += "\n"; // End List html += "\n";