mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 02:47:35 -02:30
Inventory group refresh now includes group selector tree. Fixed 'conigured' type on home page.
This commit is contained in:
@@ -175,9 +175,9 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
|||||||
|
|
||||||
.factory('InventoryStatus', [ '$rootScope', '$routeParams', 'Rest', 'Alert', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'InventorySummary',
|
.factory('InventoryStatus', [ '$rootScope', '$routeParams', 'Rest', 'Alert', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'InventorySummary',
|
||||||
'GenerateList', 'ClearScope', 'SearchInit', 'PaginateInit', 'Refresh', 'InventoryUpdate', 'GroupsEdit', 'ShowUpdateStatus', 'HelpDialog',
|
'GenerateList', 'ClearScope', 'SearchInit', 'PaginateInit', 'Refresh', 'InventoryUpdate', 'GroupsEdit', 'ShowUpdateStatus', 'HelpDialog',
|
||||||
'ShowGroupHelp', 'InventorySummaryHelp',
|
'ShowGroupHelp', 'InventorySummaryHelp', 'RefreshTree',
|
||||||
function($rootScope, $routeParams, Rest, Alert, ProcessErrors, GetBasePath, FormatDate, InventorySummary, GenerateList, ClearScope, SearchInit,
|
function($rootScope, $routeParams, Rest, Alert, ProcessErrors, GetBasePath, FormatDate, InventorySummary, GenerateList, ClearScope, SearchInit,
|
||||||
PaginateInit, Refresh, InventoryUpdate, GroupsEdit, ShowUpdateStatus, HelpDialog, ShowGroupHelp, InventorySummaryHelp) {
|
PaginateInit, Refresh, InventoryUpdate, GroupsEdit, ShowUpdateStatus, HelpDialog, ShowGroupHelp, InventorySummaryHelp, RefreshTree) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
//Build a summary of a given inventory
|
//Build a summary of a given inventory
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.search(list.iterator);
|
scope.search(list.iterator, false, true);
|
||||||
|
|
||||||
if (scope.removeShowHelp) {
|
if (scope.removeShowHelp) {
|
||||||
scope.removeShowHelp();
|
scope.removeShowHelp();
|
||||||
@@ -450,8 +450,9 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
|||||||
// Respond to refresh button
|
// Respond to refresh button
|
||||||
scope.refresh = function() {
|
scope.refresh = function() {
|
||||||
scope['groupSearchSpin'] = true;
|
scope['groupSearchSpin'] = true;
|
||||||
scope['groupLoading'] = true;
|
scope['groupLoading'] = false;
|
||||||
Refresh({ scope: scope, set: 'groups', iterator: 'group', url: scope['current_url'] });
|
RefreshTree({ scope: scope });
|
||||||
|
//setTimeout( function () { Refresh({ scope: scope, set: 'groups', iterator: 'group', url: scope['current_url'] }); }, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the update process
|
// Start the update process
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
|
|||||||
'The screen will refresh every 10 seconds, or refresh manually by clicking the <em>Refresh</em> button.', 'alert-info');
|
'The screen will refresh every 10 seconds, or refresh manually by clicking the <em>Refresh</em> button.', 'alert-info');
|
||||||
var node = $('#inventory-node')
|
var node = $('#inventory-node')
|
||||||
var selected = $('#tree-view').jstree('get_selected');
|
var selected = $('#tree-view').jstree('get_selected');
|
||||||
scope['inventorySummaryGroup'] = group_name;
|
scope['inventorySummaryGroup'] = null;
|
||||||
selected.each(function(idx) {
|
selected.each(function(idx) {
|
||||||
$('#tree-view').jstree('deselect_node', $(this));
|
$('#tree-view').jstree('deselect_node', $(this));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -148,11 +148,13 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
|||||||
scope.search(iterator);
|
scope.search(iterator);
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.search = function(iterator, page) {
|
scope.search = function(iterator, page, load, spin) {
|
||||||
// Page is optional. Added to accomodate back function on Job Events detail.
|
// Page is optional. Added to accomodate back function on Job Events detail.
|
||||||
|
// Spin optional -set to false if spin not desired.
|
||||||
|
// Load optional -set to false if loading message not desired
|
||||||
|
|
||||||
scope[iterator + 'SearchSpin'] = true;
|
scope[iterator + 'SearchSpin'] = (spin == undefined || spin == true) ? true : false;
|
||||||
scope[iterator + 'Loading'] = true;
|
scope[iterator + 'Loading'] = (load == undefined || load == true) ? true : false;
|
||||||
scope[iterator + 'SearchParms'] = '';
|
scope[iterator + 'SearchParms'] = '';
|
||||||
var url = defaultUrl;
|
var url = defaultUrl;
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rowcount == 0) {
|
if (rowcount == 0) {
|
||||||
html += "<tr><td colspan=\"3\">No projects conigured for SCM sync</td></tr>\n";
|
html += "<tr><td colspan=\"3\">No projects configured for SCM sync</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "</tbody>\n";
|
html += "</tbody>\n";
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('License', ['RestServices', 'Utilities', 'FormGenerator', 'PromptDialog'])
|
angular.module('License', ['RestServices', 'Utilities', 'FormGenerator', 'PromptDialog'])
|
||||||
.factory('ViewLicense', ['$location', 'GenerateForm', 'Rest', 'Alert', 'GetBasePath', 'ProcessErrors',
|
.factory('ViewLicense', ['$location', '$rootScope', 'GenerateForm', 'Rest', 'Alert', 'GetBasePath', 'ProcessErrors',
|
||||||
'FormatDate', 'Prompt',
|
'FormatDate', 'Prompt',
|
||||||
function($location, GenerateForm, Rest, Alert, GetBasePath, ProcessErrors, FormatDate, Prompt) {
|
function($location, $rootScope, GenerateForm, Rest, Alert, GetBasePath, ProcessErrors, FormatDate, Prompt) {
|
||||||
return function() {
|
return function() {
|
||||||
|
|
||||||
var defaultUrl=GetBasePath('config');
|
var defaultUrl=GetBasePath('config');
|
||||||
@@ -201,7 +201,7 @@ angular.module('License', ['RestServices', 'Utilities', 'FormGenerator', 'Prompt
|
|||||||
|
|
||||||
})
|
})
|
||||||
.error( function(data, status, headers, config) {
|
.error( function(data, status, headers, config) {
|
||||||
ProcessErrors(scope, data, status, form,
|
ProcessErrors($rootScope, data, status, form,
|
||||||
{ hdr: 'Error!', msg: 'Failed to retrieve license. GET status: ' + status });
|
{ hdr: 'Error!', msg: 'Failed to retrieve license. GET status: ' + status });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user