Merge pull request #4440 from mabashian/toggle-dynamics

Remove restriction on toggling dynamic hosts on/off from the host form view

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-08-19 16:42:17 +00:00 committed by GitHub
commit b28655181d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 20 deletions

View File

@ -5,16 +5,13 @@
*************************************************/
export default
['$scope', '$state', '$stateParams', 'GenerateForm', 'HostsService', 'host', '$rootScope',
function($scope, $state, $stateParams, GenerateForm, HostsService, host, $rootScope){
['$scope', '$state', 'HostsService', 'host', '$rootScope',
function($scope, $state, HostsService, host, $rootScope){
$scope.parseType = 'yaml';
$scope.formCancel = function(){
$state.go('^', null, {reload: true});
};
$scope.toggleHostEnabled = function(){
if ($scope.host.has_inventory_sources){
return;
}
$scope.host.enabled = !$scope.host.enabled;
};
$scope.toggleEnabled = function(){

View File

@ -5,9 +5,9 @@
*************************************************/
export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition', 'ParseTypeChange',
'GenerateForm', 'HostsService', 'rbacUiControlService', 'GetBasePath', 'ToJSON', 'canAdd', 'GroupsService',
'GenerateForm', 'HostsService', 'ToJSON', 'canAdd', 'GroupsService',
function($state, $stateParams, $scope, RelatedHostsFormDefinition, ParseTypeChange,
GenerateForm, HostsService, rbacUiControlService, GetBasePath, ToJSON, canAdd, GroupsService) {
GenerateForm, HostsService, ToJSON, canAdd, GroupsService) {
init();
@ -29,9 +29,6 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition'
$state.go('^');
};
$scope.toggleHostEnabled = function() {
if ($scope.host.has_inventory_sources){
return;
}
$scope.host.enabled = !$scope.host.enabled;
};
$scope.formSave = function(){

View File

@ -5,9 +5,9 @@
*************************************************/
export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition',
'GenerateForm', 'HostsService', 'GetBasePath', 'ToJSON', 'canAdd',
'GenerateForm', 'HostsService', 'ToJSON', 'canAdd',
function($state, $stateParams, $scope, RelatedHostsFormDefinition,
GenerateForm, HostsService, GetBasePath, ToJSON, canAdd) {
GenerateForm, HostsService, ToJSON, canAdd) {
init();
@ -21,9 +21,6 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition'
$state.go('^');
};
$scope.toggleHostEnabled = function() {
if ($scope.host.has_inventory_sources){
return;
}
$scope.host.enabled = !$scope.host.enabled;
};
$scope.formSave = function(){

View File

@ -5,17 +5,14 @@
*************************************************/
export default
['$scope', '$state', '$stateParams', 'GenerateForm', 'ParseTypeChange', 'HostsService', 'host', '$rootScope',
function($scope, $state, $stateParams, GenerateForm, ParseTypeChange, HostsService, host, $rootScope){
['$scope', '$state', 'HostsService', 'host', '$rootScope',
function($scope, $state, HostsService, host, $rootScope){
$scope.isSmartInvHost = $state.includes('inventories.editSmartInventory.hosts.edit');
$scope.parseType = 'yaml';
$scope.formCancel = function(){
$state.go('^', null, {reload: true});
};
$scope.toggleHostEnabled = function(){
if ($scope.host.has_inventory_sources){
return;
}
$scope.host.enabled = !$scope.host.enabled;
};
$scope.toggleEnabled = function(){