mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 13:25:02 -02:30
PR feedback implemented.
This commit is contained in:
@@ -437,10 +437,10 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
|
|||||||
|
|
||||||
.factory('HostsEdit', ['$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
|
.factory('HostsEdit', ['$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
|
||||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'HostsReload', 'ParseTypeChange', 'Wait', 'Find', 'SetStatus', 'ApplyEllipsis',
|
'Prompt', 'ProcessErrors', 'GetBasePath', 'HostsReload', 'ParseTypeChange', 'Wait', 'Find', 'SetStatus', 'ApplyEllipsis',
|
||||||
'ToJSON', 'ParseVariableString', 'CreateDialog', 'TextareaResize', 'ParamPass',
|
'ToJSON', 'ParseVariableString', 'CreateDialog', 'TextareaResize',
|
||||||
function($rootScope, $location, $log, $stateParams, Rest, Alert, HostForm, GenerateForm, Prompt, ProcessErrors,
|
function($rootScope, $location, $log, $stateParams, Rest, Alert, HostForm, GenerateForm, Prompt, ProcessErrors,
|
||||||
GetBasePath, HostsReload, ParseTypeChange, Wait, Find, SetStatus, ApplyEllipsis, ToJSON,
|
GetBasePath, HostsReload, ParseTypeChange, Wait, Find, SetStatus, ApplyEllipsis, ToJSON,
|
||||||
ParseVariableString, CreateDialog, TextareaResize, ParamPass) {
|
ParseVariableString, CreateDialog, TextareaResize) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
|
|
||||||
var parent_scope = params.host_scope,
|
var parent_scope = params.host_scope,
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ function copyHostsDirectiveController($compile, $state, $scope, Rest, ProcessErr
|
|||||||
setWidgets: false
|
setWidgets: false
|
||||||
});
|
});
|
||||||
$scope.refreshHostsOnGroupRefresh = true;
|
$scope.refreshHostsOnGroupRefresh = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
var performCopy = function() {
|
var performCopy = function() {
|
||||||
var list = GroupList,
|
var list = GroupList,
|
||||||
@@ -229,9 +229,10 @@ function copyHostsDirectiveController($compile, $state, $scope, Rest, ProcessErr
|
|||||||
copy_choice: copy_choice,
|
copy_choice: copy_choice,
|
||||||
name: name,
|
name: name,
|
||||||
cancel: cancel,
|
cancel: cancel,
|
||||||
allowSave: allowSave
|
allowSave: allowSave,
|
||||||
})
|
performCopy: performCopy
|
||||||
};
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export default ['$compile', '$state', '$scope', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
|
export default ['$compile', '$state', '$scope', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
|
||||||
'PaginateInit', 'ParamPass', 'Store', copyHostsDirectiveController
|
'PaginateInit', 'ParamPass', 'Store', copyHostsDirectiveController
|
||||||
|
|||||||
@@ -400,16 +400,12 @@ function InventoriesManage($log, $scope, $rootScope, $location,
|
|||||||
|
|
||||||
$scope.copyGroup = function(id) {
|
$scope.copyGroup = function(id) {
|
||||||
PreviousSearchParams = Store('group_current_search_params');
|
PreviousSearchParams = Store('group_current_search_params');
|
||||||
// GroupsCopy({
|
var params = {
|
||||||
// scope: $scope,
|
scope: $scope
|
||||||
// group_id: id
|
};
|
||||||
// });
|
ParamPass.set(params);
|
||||||
var params = {
|
$location.search('groups', null);
|
||||||
scope: $scope
|
$state.go('inventoryManage.copy.group', {group_id: id});
|
||||||
}
|
|
||||||
ParamPass.set(params);
|
|
||||||
$location.search('groups', null);
|
|
||||||
$state.go('inventoryManage.copy.group', {group_id: id});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.deleteGroup = function (id) {
|
$scope.deleteGroup = function (id) {
|
||||||
@@ -433,7 +429,7 @@ function InventoriesManage($log, $scope, $rootScope, $location,
|
|||||||
host_id: null,
|
host_id: null,
|
||||||
selected_group_id: $scope.selected_group_id,
|
selected_group_id: $scope.selected_group_id,
|
||||||
inventory_id: $scope.inventory.id
|
inventory_id: $scope.inventory.id
|
||||||
}
|
};
|
||||||
ParamPass.set(params);
|
ParamPass.set(params);
|
||||||
$state.go('inventoryManage.addHost');
|
$state.go('inventoryManage.addHost');
|
||||||
};
|
};
|
||||||
@@ -445,7 +441,7 @@ function InventoriesManage($log, $scope, $rootScope, $location,
|
|||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
host_id: host_id,
|
host_id: host_id,
|
||||||
inventory_id: $scope.inventory.id
|
inventory_id: $scope.inventory.id
|
||||||
}
|
};
|
||||||
ParamPass.set(params);
|
ParamPass.set(params);
|
||||||
$state.go('inventoryManage.editHost', {host_id: host_id});
|
$state.go('inventoryManage.editHost', {host_id: host_id});
|
||||||
};
|
};
|
||||||
@@ -461,17 +457,11 @@ function InventoriesManage($log, $scope, $rootScope, $location,
|
|||||||
|
|
||||||
hostScope.copyHost = function(id) {
|
hostScope.copyHost = function(id) {
|
||||||
PreviousSearchParams = Store('group_current_search_params');
|
PreviousSearchParams = Store('group_current_search_params');
|
||||||
// HostsCopy({
|
|
||||||
// group_scope: $scope,
|
|
||||||
// host_scope: hostScope,
|
|
||||||
// host_id: id
|
|
||||||
// });
|
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
group_scope: $scope,
|
group_scope: $scope,
|
||||||
host_scope: hostScope,
|
host_scope: hostScope,
|
||||||
host_id: id
|
host_id: id
|
||||||
}
|
};
|
||||||
|
|
||||||
ParamPass.set(params);
|
ParamPass.set(params);
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
|
|||||||
scope: scope,
|
scope: scope,
|
||||||
field_id: 'host_variables',
|
field_id: 'host_variables',
|
||||||
});
|
});
|
||||||
//scope.$emit('hostVariablesLoaded');
|
|
||||||
scope.parseType = 'yaml';
|
scope.parseType = 'yaml';
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: scope,
|
scope: scope,
|
||||||
|
|||||||
Reference in New Issue
Block a user