mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Fixing scope passed to CodeMirror factory on hosts route
This commit is contained in:
parent
359da2d958
commit
c51501223c
@ -453,7 +453,7 @@ function manageGroupsDirectiveController($filter, $rootScope, $location, $log, $
|
||||
// Cancel
|
||||
modal_scope.cancelPanel = function() {
|
||||
Wait('stop');
|
||||
$state.go('inventoryManage', {}, {reload: true})
|
||||
$state.go('inventoryManage', {}, {reload: true});
|
||||
};
|
||||
|
||||
// Save
|
||||
@ -539,7 +539,7 @@ function manageGroupsDirectiveController($filter, $rootScope, $location, $log, $
|
||||
angular.extend(vm, {
|
||||
cancelPanel : modal_scope.cancelPanel,
|
||||
saveGroup: modal_scope.saveGroup
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
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
|
||||
});
|
||||
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
|
||||
if (mode === 'edit') {
|
||||
@ -75,6 +65,12 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
|
||||
}
|
||||
scope.variable_url = data.related.variable_data;
|
||||
scope.has_inventory_sources = data.has_inventory_sources;
|
||||
scope.parseType = 'yaml';
|
||||
ParseTypeChange({
|
||||
scope: scope,
|
||||
field_id: 'host_variables',
|
||||
});
|
||||
|
||||
})
|
||||
.error(function(data, status) {
|
||||
ProcessErrors(parent_scope, data, status, form, {
|
||||
@ -99,6 +95,12 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam
|
||||
scope.variables = '---';
|
||||
defaultUrl = data.related.hosts;
|
||||
//scope.$emit('hostVariablesLoaded');
|
||||
scope.parseType = 'yaml';
|
||||
ParseTypeChange({
|
||||
scope: scope,
|
||||
field_id: 'host_variables',
|
||||
});
|
||||
|
||||
})
|
||||
.error(function(data, status) {
|
||||
ProcessErrors(parent_scope, data, status, form, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user