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