mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
random syntax and style fixes to tower js
may include some new dependencies needed for adhoc commands
This commit is contained in:
parent
4f5ecb7054
commit
584abcc05b
@ -76,7 +76,7 @@ var tower = angular.module('Tower', [
|
||||
'UserFormDefinition',
|
||||
'FormGenerator',
|
||||
'OrganizationListDefinition',
|
||||
'jobTemplates',
|
||||
'jobTemplates',
|
||||
'UserListDefinition',
|
||||
'UserHelper',
|
||||
'PromptDialog',
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
|
||||
import 'tower/job-templates/main';
|
||||
|
||||
export function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $compile, $filter, Rest, Alert, InventoryList, generateList,
|
||||
LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Wait, Stream,
|
||||
export function InventoriesList($scope, $rootScope, $location, $log,
|
||||
$routeParams, $compile, $filter, Rest, Alert, InventoryList, generateList,
|
||||
LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
ClearScope, ProcessErrors, GetBasePath, Wait, Stream,
|
||||
EditInventoryProperties, Find, Empty, LogViewer) {
|
||||
|
||||
//ClearScope();
|
||||
|
||||
var list = InventoryList,
|
||||
defaultUrl = GetBasePath('inventory'),
|
||||
view = generateList,
|
||||
@ -51,7 +51,10 @@ export function InventoriesList($scope, $rootScope, $location, $log, $routeParam
|
||||
// close any lingering tool tipss
|
||||
$(this).hide();
|
||||
});
|
||||
elem.attr({ "aw-pop-over": html, "data-popover-title": title, "data-placement": "right" });
|
||||
elem.attr({
|
||||
"aw-pop-over": html,
|
||||
"data-popover-title": title,
|
||||
"data-placement": "right" });
|
||||
$compile(elem)($scope);
|
||||
elem.on('shown.bs.popover', function() {
|
||||
$('.popover').each(function() {
|
||||
@ -837,12 +840,16 @@ InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$lo
|
||||
|
||||
|
||||
|
||||
export function InventoriesManage ($log, $scope, $location, $routeParams, $compile, generateList, ClearScope, Empty, Wait, Rest, Alert, LoadBreadCrumbs, GetBasePath, ProcessErrors,
|
||||
Breadcrumbs, InventoryGroups, InjectHosts, Find, HostsReload, SearchInit, PaginateInit, GetSyncStatusMsg, GetHostsStatusMsg, GroupsEdit, InventoryUpdate,
|
||||
GroupsCancelUpdate, ViewUpdateStatus, GroupsDelete, Store, HostsEdit, HostsDelete, EditInventoryProperties, ToggleHostEnabled, Stream, ShowJobSummary,
|
||||
InventoryGroupsHelp, HelpDialog, ViewJob, WatchInventoryWindowResize, GetHostContainerRows, GetGroupContainerRows, GetGroupContainerHeight,
|
||||
GroupsCopy, HostsCopy, Socket)
|
||||
{
|
||||
export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
$routeParams, $compile, generateList, ClearScope, Empty, Wait, Rest, Alert,
|
||||
LoadBreadCrumbs, GetBasePath, ProcessErrors, Breadcrumbs, InventoryGroups,
|
||||
InjectHosts, Find, HostsReload, SearchInit, PaginateInit, GetSyncStatusMsg,
|
||||
GetHostsStatusMsg, GroupsEdit, InventoryUpdate, GroupsCancelUpdate,
|
||||
ViewUpdateStatus, GroupsDelete, Store, HostsEdit, HostsDelete,
|
||||
EditInventoryProperties, ToggleHostEnabled, Stream, ShowJobSummary,
|
||||
InventoryGroupsHelp, HelpDialog, ViewJob, WatchInventoryWindowResize,
|
||||
GetHostContainerRows, GetGroupContainerRows, GetGroupContainerHeight,
|
||||
GroupsCopy, HostsCopy, Socket) {
|
||||
|
||||
var PreviousSearchParams,
|
||||
url,
|
||||
@ -1365,7 +1372,8 @@ export function InventoriesManage ($log, $scope, $location, $routeParams, $compi
|
||||
hostScope.show_failures = show_failures;
|
||||
$scope.groupSelect(group_id);
|
||||
hostScope.hosts = [];
|
||||
$scope.show_failures = show_failures; // turn on failed hosts filter in hosts view
|
||||
$scope.show_failures = show_failures; // turn on failed hosts
|
||||
// filter in hosts view
|
||||
} else {
|
||||
Wait('stop');
|
||||
}
|
||||
@ -1374,15 +1382,24 @@ export function InventoriesManage ($log, $scope, $location, $routeParams, $compi
|
||||
if ($scope.removeGroupDeleteCompleted) {
|
||||
$scope.removeGroupDeleteCompleted();
|
||||
}
|
||||
$scope.removeGroupDeleteCompleted = $scope.$on('GroupDeleteCompleted', function() {
|
||||
$scope.refreshGroups();
|
||||
});
|
||||
$scope.removeGroupDeleteCompleted = $scope.$on('GroupDeleteCompleted',
|
||||
function() {
|
||||
$scope.refreshGroups();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
InventoriesManage.$inject = ['$log', '$scope', '$location', '$routeParams', '$compile', 'generateList', 'ClearScope', 'Empty', 'Wait', 'Rest', 'Alert', 'LoadBreadCrumbs',
|
||||
'GetBasePath', 'ProcessErrors', 'Breadcrumbs', 'InventoryGroups', 'InjectHosts', 'Find', 'HostsReload', 'SearchInit', 'PaginateInit', 'GetSyncStatusMsg',
|
||||
'GetHostsStatusMsg', 'GroupsEdit', 'InventoryUpdate', 'GroupsCancelUpdate', 'ViewUpdateStatus', 'GroupsDelete', 'Store', 'HostsEdit', 'HostsDelete',
|
||||
'EditInventoryProperties', 'ToggleHostEnabled', 'Stream', 'ShowJobSummary', 'InventoryGroupsHelp', 'HelpDialog', 'ViewJob', 'WatchInventoryWindowResize',
|
||||
'GetHostContainerRows', 'GetGroupContainerRows', 'GetGroupContainerHeight', 'GroupsCopy', 'HostsCopy', 'Socket'
|
||||
];
|
||||
InventoriesManage.$inject = ['$log', '$scope', '$rootScope', '$location',
|
||||
'$routeParams', '$compile', 'generateList', 'ClearScope', 'Empty', 'Wait',
|
||||
'Rest', 'Alert', 'LoadBreadCrumbs', 'GetBasePath', 'ProcessErrors',
|
||||
'Breadcrumbs', 'InventoryGroups', 'InjectHosts', 'Find', 'HostsReload',
|
||||
'SearchInit', 'PaginateInit', 'GetSyncStatusMsg', 'GetHostsStatusMsg',
|
||||
'GroupsEdit', 'InventoryUpdate', 'GroupsCancelUpdate', 'ViewUpdateStatus',
|
||||
'GroupsDelete', 'Store', 'HostsEdit', 'HostsDelete',
|
||||
'EditInventoryProperties', 'ToggleHostEnabled', 'Stream', 'ShowJobSummary',
|
||||
'InventoryGroupsHelp', 'HelpDialog', 'ViewJob',
|
||||
'WatchInventoryWindowResize', 'GetHostContainerRows',
|
||||
'GetGroupContainerRows', 'GetGroupContainerHeight', 'GroupsCopy',
|
||||
'HostsCopy', 'Socket'
|
||||
];
|
||||
|
||||
@ -1302,6 +1302,7 @@ export function JobDetailController ($location, $rootScope, $scope, $compile, $r
|
||||
status: status
|
||||
});
|
||||
};
|
||||
|
||||
scope.refresh = function(){
|
||||
$scope.$emit('LoadJob');
|
||||
};
|
||||
|
||||
@ -1145,11 +1145,11 @@ export function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log,
|
||||
action: action
|
||||
});
|
||||
});
|
||||
|
||||
if($scope.survey_enabled === true && $scope.survey_exists!==true){
|
||||
$scope.$emit("PromptForSurvey");
|
||||
}
|
||||
else {
|
||||
|
||||
PlaybookRun({
|
||||
scope: $scope,
|
||||
id: id
|
||||
|
||||
@ -332,7 +332,8 @@ export function PermissionsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
|
||||
}
|
||||
|
||||
PermissionsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'PermissionsForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath',
|
||||
'InventoryList', 'ProjectList', 'LookUpInit', 'CheckAccess', 'Wait', 'PermissionCategoryChange'
|
||||
];
|
||||
PermissionsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$routeParams', 'PermissionsForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'Prompt',
|
||||
'GetBasePath', 'InventoryList', 'ProjectList', 'LookUpInit', 'CheckAccess',
|
||||
'Wait', 'PermissionCategoryChange'];
|
||||
|
||||
@ -17,7 +17,6 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
.factory('KindChange', ['Empty',
|
||||
function (Empty) {
|
||||
return function (params) {
|
||||
|
||||
var scope = params.scope,
|
||||
reset = params.reset,
|
||||
collapse, id;
|
||||
|
||||
@ -299,7 +299,6 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
|
||||
|
||||
html += "<div class=\"alert alert-info\">Launching this job requires the passwords listed below. Enter and confirm each password before continuing.</div>\n";
|
||||
// html += "<form name=\"password_form\" novalidate>\n";
|
||||
|
||||
scope.passwords.forEach(function(password) {
|
||||
// Prompt for password
|
||||
field = form.fields[password];
|
||||
|
||||
@ -18,7 +18,6 @@ export default
|
||||
'InventoryHelper', 'InventoryFormDefinition', 'ParseHelper', 'SearchHelper', 'VariablesHelper',
|
||||
])
|
||||
|
||||
|
||||
.factory('GetGroupContainerHeight', [ function() {
|
||||
return function() {
|
||||
|
||||
@ -101,7 +100,6 @@ export default
|
||||
};
|
||||
}])
|
||||
|
||||
|
||||
.factory('WatchInventoryWindowResize', ['ApplyEllipsis', 'SetContainerHeights',
|
||||
function (ApplyEllipsis, SetContainerHeights) {
|
||||
return function (params) {
|
||||
@ -185,7 +183,6 @@ export default
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
.factory('EditInventoryProperties', ['InventoryForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LookUpInit', 'OrganizationList',
|
||||
'GetBasePath', 'ParseTypeChange', 'SaveInventory', 'Wait', 'Store', 'SearchInit', 'ParseVariableString', 'CreateDialog', 'TextareaResize',
|
||||
function (InventoryForm, GenerateForm, Rest, Alert, ProcessErrors, LookUpInit, OrganizationList, GetBasePath, ParseTypeChange, SaveInventory,
|
||||
|
||||
@ -134,7 +134,8 @@ export default
|
||||
ngClick: 'updateGroup(group.id)',
|
||||
awToolTip: "{{ group.launch_tooltip }}",
|
||||
dataTipWatch: "group.launch_tooltip",
|
||||
ngShow: "group.status !== 'running' && group.status !== 'pending' && group.status !== 'updating'",
|
||||
ngShow: "group.status !== 'running' && group.status "
|
||||
+ "!== 'pending' && group.status !== 'updating'",
|
||||
ngClass: "group.launch_class",
|
||||
dataPlacement: "top"
|
||||
},
|
||||
@ -144,7 +145,8 @@ export default
|
||||
ngClick: "cancelUpdate(group.id)",
|
||||
awToolTip: "Cancel sync process",
|
||||
'class': 'red-txt',
|
||||
ngShow: "group.status == 'running' || group.status == 'pending' || group.status == 'updating'",
|
||||
ngShow: "group.status == 'running' || group.status == 'pending' "
|
||||
+ "|| group.status == 'updating'",
|
||||
dataPlacement: "top"
|
||||
},
|
||||
edit: {
|
||||
|
||||
@ -229,7 +229,6 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
|
||||
selection.deselectedItems.forEach(function(item) {
|
||||
item.isSelected = false;
|
||||
});
|
||||
|
||||
}.bind(this));
|
||||
|
||||
this.scope.$on('$destroy', function() {
|
||||
@ -396,7 +395,7 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
|
||||
});
|
||||
}
|
||||
|
||||
html += "</div><!-- list-acitons -->\n";
|
||||
html += "</div><!-- list-actions -->\n";
|
||||
|
||||
html += "</div><!-- list-actions-column -->\n";
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user