mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
Merge pull request #613 from jaredevantabor/fix-569
removing codemirror instantiation from $transition event
This commit is contained in:
commit
5852c16ba6
@ -6,10 +6,8 @@
|
||||
|
||||
export default ['$state', '$stateParams', '$scope', 'ParseVariableString', 'rbacUiControlService', 'ToJSON',
|
||||
'ParseTypeChange', 'GroupsService', 'GetChoices', 'GetBasePath', 'CreateSelect2', 'groupData', '$rootScope',
|
||||
'$transitions',
|
||||
function($state, $stateParams, $scope, ParseVariableString, rbacUiControlService, ToJSON,
|
||||
ParseTypeChange, GroupsService, GetChoices, GetBasePath, CreateSelect2, groupData, $rootScope,
|
||||
$transitions) {
|
||||
ParseTypeChange, GroupsService, GetChoices, GetBasePath, CreateSelect2, groupData, $rootScope) {
|
||||
|
||||
init();
|
||||
|
||||
@ -32,14 +30,11 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString', 'rbac
|
||||
$scope.parseType = 'yaml';
|
||||
$scope.envParseType = 'yaml';
|
||||
|
||||
$transitions.onSuccess({}, function(trans) {
|
||||
if(trans.to().name === 'inventories.edit.groups.edit') {
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
field_id: 'group_group_variables',
|
||||
variable: 'group_variables',
|
||||
});
|
||||
}
|
||||
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
field_id: 'group_group_variables',
|
||||
variable: 'group_variables',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ function SmartInventoryEdit($scope, $location,
|
||||
$stateParams, InventoryForm, Rest, ProcessErrors,
|
||||
GetBasePath, ParseTypeChange, Wait, ToJSON,
|
||||
ParseVariableString, $state, OrgAdminLookup, resourceData,
|
||||
$rootScope, InstanceGroupsService, InstanceGroupsData, $transitions) {
|
||||
$rootScope, InstanceGroupsService, InstanceGroupsData) {
|
||||
|
||||
// Inject dynamic view
|
||||
var defaultUrl = GetBasePath('inventory'),
|
||||
@ -37,15 +37,12 @@ function SmartInventoryEdit($scope, $location,
|
||||
|
||||
$scope.parseType = 'yaml';
|
||||
|
||||
$transitions.onSuccess({}, function(trans) {
|
||||
if(trans.to().name === 'inventories.editSmartInventory') {
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
variable: 'smartinventory_variables',
|
||||
parse_variable: 'parseType',
|
||||
field_id: 'smartinventory_smartinventory_variables'
|
||||
});
|
||||
}
|
||||
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
variable: 'smartinventory_variables',
|
||||
parse_variable: 'parseType',
|
||||
field_id: 'smartinventory_smartinventory_variables'
|
||||
});
|
||||
|
||||
OrgAdminLookup.checkForAdminAccess({organization: inventoryData.organization})
|
||||
@ -109,5 +106,5 @@ export default [ '$scope', '$location',
|
||||
'ProcessErrors', 'GetBasePath', 'ParseTypeChange', 'Wait',
|
||||
'ToJSON', 'ParseVariableString',
|
||||
'$state', 'OrgAdminLookup', 'resourceData',
|
||||
'$rootScope', 'InstanceGroupsService', 'InstanceGroupsData', '$transitions', SmartInventoryEdit
|
||||
'$rootScope', 'InstanceGroupsService', 'InstanceGroupsData', SmartInventoryEdit
|
||||
];
|
||||
|
||||
@ -14,8 +14,7 @@ function InventoriesEdit($scope, $location,
|
||||
$stateParams, InventoryForm, Rest, ProcessErrors,
|
||||
GetBasePath, ParseTypeChange, Wait, ToJSON,
|
||||
ParseVariableString, $state, OrgAdminLookup, $rootScope, resourceData,
|
||||
CreateSelect2, InstanceGroupsService, InstanceGroupsData, CanRemediate,
|
||||
$transitions) {
|
||||
CreateSelect2, InstanceGroupsService, InstanceGroupsData, CanRemediate) {
|
||||
|
||||
// Inject dynamic view
|
||||
let defaultUrl = GetBasePath('inventory'),
|
||||
@ -41,15 +40,11 @@ function InventoriesEdit($scope, $location,
|
||||
$scope.instance_groups = InstanceGroupsData;
|
||||
$scope.canRemediate = CanRemediate;
|
||||
|
||||
$transitions.onSuccess({}, function(trans) {
|
||||
if(trans.to().name === 'inventories.edit') {
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
variable: 'inventory_variables',
|
||||
parse_variable: 'parseType',
|
||||
field_id: 'inventory_inventory_variables'
|
||||
});
|
||||
}
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
variable: 'inventory_variables',
|
||||
parse_variable: 'parseType',
|
||||
field_id: 'inventory_inventory_variables'
|
||||
});
|
||||
|
||||
OrgAdminLookup.checkForAdminAccess({organization: inventoryData.organization})
|
||||
@ -120,5 +115,5 @@ export default ['$scope', '$location',
|
||||
'ToJSON', 'ParseVariableString',
|
||||
'$state', 'OrgAdminLookup', '$rootScope', 'resourceData', 'CreateSelect2',
|
||||
'InstanceGroupsService', 'InstanceGroupsData', 'CanRemediate',
|
||||
'$transitions', InventoriesEdit,
|
||||
InventoriesEdit,
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user