mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 09:18:48 -03:30
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:
@@ -5,16 +5,13 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default
|
export default
|
||||||
['$scope', '$state', '$stateParams', 'GenerateForm', 'HostsService', 'host', '$rootScope',
|
['$scope', '$state', 'HostsService', 'host', '$rootScope',
|
||||||
function($scope, $state, $stateParams, GenerateForm, HostsService, host, $rootScope){
|
function($scope, $state, HostsService, host, $rootScope){
|
||||||
$scope.parseType = 'yaml';
|
$scope.parseType = 'yaml';
|
||||||
$scope.formCancel = function(){
|
$scope.formCancel = function(){
|
||||||
$state.go('^', null, {reload: true});
|
$state.go('^', null, {reload: true});
|
||||||
};
|
};
|
||||||
$scope.toggleHostEnabled = function(){
|
$scope.toggleHostEnabled = function(){
|
||||||
if ($scope.host.has_inventory_sources){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$scope.host.enabled = !$scope.host.enabled;
|
$scope.host.enabled = !$scope.host.enabled;
|
||||||
};
|
};
|
||||||
$scope.toggleEnabled = function(){
|
$scope.toggleEnabled = function(){
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition', 'ParseTypeChange',
|
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,
|
function($state, $stateParams, $scope, RelatedHostsFormDefinition, ParseTypeChange,
|
||||||
GenerateForm, HostsService, rbacUiControlService, GetBasePath, ToJSON, canAdd, GroupsService) {
|
GenerateForm, HostsService, ToJSON, canAdd, GroupsService) {
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
@@ -29,9 +29,6 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition'
|
|||||||
$state.go('^');
|
$state.go('^');
|
||||||
};
|
};
|
||||||
$scope.toggleHostEnabled = function() {
|
$scope.toggleHostEnabled = function() {
|
||||||
if ($scope.host.has_inventory_sources){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$scope.host.enabled = !$scope.host.enabled;
|
$scope.host.enabled = !$scope.host.enabled;
|
||||||
};
|
};
|
||||||
$scope.formSave = function(){
|
$scope.formSave = function(){
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition',
|
export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition',
|
||||||
'GenerateForm', 'HostsService', 'GetBasePath', 'ToJSON', 'canAdd',
|
'GenerateForm', 'HostsService', 'ToJSON', 'canAdd',
|
||||||
function($state, $stateParams, $scope, RelatedHostsFormDefinition,
|
function($state, $stateParams, $scope, RelatedHostsFormDefinition,
|
||||||
GenerateForm, HostsService, GetBasePath, ToJSON, canAdd) {
|
GenerateForm, HostsService, ToJSON, canAdd) {
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
@@ -21,9 +21,6 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition'
|
|||||||
$state.go('^');
|
$state.go('^');
|
||||||
};
|
};
|
||||||
$scope.toggleHostEnabled = function() {
|
$scope.toggleHostEnabled = function() {
|
||||||
if ($scope.host.has_inventory_sources){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$scope.host.enabled = !$scope.host.enabled;
|
$scope.host.enabled = !$scope.host.enabled;
|
||||||
};
|
};
|
||||||
$scope.formSave = function(){
|
$scope.formSave = function(){
|
||||||
|
|||||||
@@ -5,17 +5,14 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default
|
export default
|
||||||
['$scope', '$state', '$stateParams', 'GenerateForm', 'ParseTypeChange', 'HostsService', 'host', '$rootScope',
|
['$scope', '$state', 'HostsService', 'host', '$rootScope',
|
||||||
function($scope, $state, $stateParams, GenerateForm, ParseTypeChange, HostsService, host, $rootScope){
|
function($scope, $state, HostsService, host, $rootScope){
|
||||||
$scope.isSmartInvHost = $state.includes('inventories.editSmartInventory.hosts.edit');
|
$scope.isSmartInvHost = $state.includes('inventories.editSmartInventory.hosts.edit');
|
||||||
$scope.parseType = 'yaml';
|
$scope.parseType = 'yaml';
|
||||||
$scope.formCancel = function(){
|
$scope.formCancel = function(){
|
||||||
$state.go('^', null, {reload: true});
|
$state.go('^', null, {reload: true});
|
||||||
};
|
};
|
||||||
$scope.toggleHostEnabled = function(){
|
$scope.toggleHostEnabled = function(){
|
||||||
if ($scope.host.has_inventory_sources){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$scope.host.enabled = !$scope.host.enabled;
|
$scope.host.enabled = !$scope.host.enabled;
|
||||||
};
|
};
|
||||||
$scope.toggleEnabled = function(){
|
$scope.toggleEnabled = function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user