PR feedback implemented.

This commit is contained in:
Ken Hoes 2016-04-05 09:12:52 -04:00
parent ec2e5a0224
commit 07ab1e7787
4 changed files with 16 additions and 26 deletions

View File

@ -437,10 +437,10 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
.factory('HostsEdit', ['$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
'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,
GetBasePath, HostsReload, ParseTypeChange, Wait, Find, SetStatus, ApplyEllipsis, ToJSON,
ParseVariableString, CreateDialog, TextareaResize, ParamPass) {
ParseVariableString, CreateDialog, TextareaResize) {
return function(params) {
var parent_scope = params.host_scope,

View File

@ -142,7 +142,7 @@ function copyHostsDirectiveController($compile, $state, $scope, Rest, ProcessErr
setWidgets: false
});
$scope.refreshHostsOnGroupRefresh = true;
}
};
var performCopy = function() {
var list = GroupList,
@ -229,9 +229,10 @@ function copyHostsDirectiveController($compile, $state, $scope, Rest, ProcessErr
copy_choice: copy_choice,
name: name,
cancel: cancel,
allowSave: allowSave
})
};
allowSave: allowSave,
performCopy: performCopy
});
}
export default ['$compile', '$state', '$scope', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
'PaginateInit', 'ParamPass', 'Store', copyHostsDirectiveController

View File

@ -400,16 +400,12 @@ function InventoriesManage($log, $scope, $rootScope, $location,
$scope.copyGroup = function(id) {
PreviousSearchParams = Store('group_current_search_params');
// GroupsCopy({
// scope: $scope,
// group_id: id
// });
var params = {
scope: $scope
}
ParamPass.set(params);
$location.search('groups', null);
$state.go('inventoryManage.copy.group', {group_id: id});
var params = {
scope: $scope
};
ParamPass.set(params);
$location.search('groups', null);
$state.go('inventoryManage.copy.group', {group_id: id});
};
$scope.deleteGroup = function (id) {
@ -433,7 +429,7 @@ function InventoriesManage($log, $scope, $rootScope, $location,
host_id: null,
selected_group_id: $scope.selected_group_id,
inventory_id: $scope.inventory.id
}
};
ParamPass.set(params);
$state.go('inventoryManage.addHost');
};
@ -445,7 +441,7 @@ function InventoriesManage($log, $scope, $rootScope, $location,
mode: 'edit',
host_id: host_id,
inventory_id: $scope.inventory.id
}
};
ParamPass.set(params);
$state.go('inventoryManage.editHost', {host_id: host_id});
};
@ -461,17 +457,11 @@ function InventoriesManage($log, $scope, $rootScope, $location,
hostScope.copyHost = function(id) {
PreviousSearchParams = Store('group_current_search_params');
// HostsCopy({
// group_scope: $scope,
// host_scope: hostScope,
// host_id: id
// });
var params = {
group_scope: $scope,
host_scope: hostScope,
host_id: id
}
};
ParamPass.set(params);

View File

@ -99,7 +99,6 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
scope: scope,
field_id: 'host_variables',
});
//scope.$emit('hostVariablesLoaded');
scope.parseType = 'yaml';
ParseTypeChange({
scope: scope,