mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Fixing scope passed to CodeMirror factory on hosts route
This commit is contained in:
@@ -453,7 +453,7 @@ function manageGroupsDirectiveController($filter, $rootScope, $location, $log, $
|
|||||||
// Cancel
|
// Cancel
|
||||||
modal_scope.cancelPanel = function() {
|
modal_scope.cancelPanel = function() {
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
$state.go('inventoryManage', {}, {reload: true})
|
$state.go('inventoryManage', {}, {reload: true});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
@@ -539,7 +539,7 @@ function manageGroupsDirectiveController($filter, $rootScope, $location, $log, $
|
|||||||
angular.extend(vm, {
|
angular.extend(vm, {
|
||||||
cancelPanel : modal_scope.cancelPanel,
|
cancelPanel : modal_scope.cancelPanel,
|
||||||
saveGroup: modal_scope.saveGroup
|
saveGroup: modal_scope.saveGroup
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ['$filter', '$rootScope', '$location', '$log', '$stateParams', '$compile', '$state', '$scope', 'Rest', 'Alert', 'GroupForm', 'GenerateForm',
|
export default ['$filter', '$rootScope', '$location', '$log', '$stateParams', '$compile', '$state', '$scope', 'Rest', 'Alert', 'GroupForm', 'GenerateForm',
|
||||||
|
|||||||
@@ -40,16 +40,6 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
|
|||||||
cancelButton: false
|
cancelButton: false
|
||||||
});
|
});
|
||||||
generator.reset();
|
generator.reset();
|
||||||
console.info(angular.element(document.getElementById('host_variables')));
|
|
||||||
|
|
||||||
$scope.parseType = 'yaml';
|
|
||||||
ParseTypeChange({
|
|
||||||
scope: form_scope,
|
|
||||||
variable: 'variables',
|
|
||||||
parse_variable: 'parseType',
|
|
||||||
field_id: 'host_variables'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Retrieve detail record and prepopulate the form
|
// Retrieve detail record and prepopulate the form
|
||||||
if (mode === 'edit') {
|
if (mode === 'edit') {
|
||||||
@@ -75,6 +65,12 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
|
|||||||
}
|
}
|
||||||
scope.variable_url = data.related.variable_data;
|
scope.variable_url = data.related.variable_data;
|
||||||
scope.has_inventory_sources = data.has_inventory_sources;
|
scope.has_inventory_sources = data.has_inventory_sources;
|
||||||
|
scope.parseType = 'yaml';
|
||||||
|
ParseTypeChange({
|
||||||
|
scope: scope,
|
||||||
|
field_id: 'host_variables',
|
||||||
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
ProcessErrors(parent_scope, data, status, form, {
|
ProcessErrors(parent_scope, data, status, form, {
|
||||||
@@ -99,6 +95,12 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
|
|||||||
scope.variables = '---';
|
scope.variables = '---';
|
||||||
defaultUrl = data.related.hosts;
|
defaultUrl = data.related.hosts;
|
||||||
//scope.$emit('hostVariablesLoaded');
|
//scope.$emit('hostVariablesLoaded');
|
||||||
|
scope.parseType = 'yaml';
|
||||||
|
ParseTypeChange({
|
||||||
|
scope: scope,
|
||||||
|
field_id: 'host_variables',
|
||||||
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
ProcessErrors(parent_scope, data, status, form, {
|
ProcessErrors(parent_scope, data, status, form, {
|
||||||
|
|||||||
Reference in New Issue
Block a user