mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Added 'Loading...' message to all lists and sublists.
This commit is contained in:
parent
9e519400bc
commit
2a0f528954
@ -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;
|
||||
|
||||
@ -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');
|
||||
})
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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) ||
|
||||
|
||||
@ -701,10 +701,15 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
|
||||
html += "</tr>\n";
|
||||
|
||||
// Message for when a related collection is empty
|
||||
html += "<tr class=\"info\" ng-show=\"" + itm + " == null || " + itm + ".length == 0\">\n";
|
||||
html += "<tr class=\"info\" ng-show=\"" + form.related[itm].iterator + "Loading == false && (" + itm + " == null || " + itm + ".length == 0)\">\n";
|
||||
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">No records matched your search.</div></td>\n";
|
||||
html += "</tr>\n";
|
||||
|
||||
// Message for loading
|
||||
html += "<tr class=\"info\" ng-show=\"" + form.related[itm].iterator + "Loading == true\">\n";
|
||||
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">Loading...</div></td>\n";
|
||||
html += "</tr>\n";
|
||||
|
||||
// End List
|
||||
html += "</tbody>\n";
|
||||
html += "</table>\n";
|
||||
|
||||
@ -252,9 +252,14 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
|
||||
html += "</tr>\n";
|
||||
|
||||
// Message for when a collection is empty
|
||||
html += "<tr class=\"info\" ng-show=\"" + list.name + " == null || " + list.name + ".length == 0\">\n";
|
||||
html += "<tr class=\"info\" ng-show=\"" + list.iterator + "Loading == false && (" + list.name + " == null || " + list.name + ".length == 0)\">\n";
|
||||
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">No records matched your search.</div></td>\n";
|
||||
html += "</tr>\n";
|
||||
|
||||
// Message for loading
|
||||
html += "<tr class=\"info\" ng-show=\"" + list.iterator + "Loading == true\">\n";
|
||||
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">Loading...</div></td>\n";
|
||||
html += "</tr>\n";
|
||||
|
||||
// End List
|
||||
html += "</tbody>\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user