mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Fixed inventory groups not refreshing after group added. Fixed vault_password_confirm displaying when credential type not machine.
This commit is contained in:
parent
4b75e1f8e0
commit
03dce0e4a0
@ -270,6 +270,7 @@ angular.module('CredentialFormDefinition', [])
|
||||
"vault_password_confirm": {
|
||||
label: "Confirm Vault Password",
|
||||
type: 'password',
|
||||
ngShow: "kind.value == 'ssh'",
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awPassMatch: true,
|
||||
|
@ -627,6 +627,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
inventory_id = params.inventory_id,
|
||||
groups_reload = params.groups_reload,
|
||||
generator = GenerateForm,
|
||||
group_created = false,
|
||||
defaultUrl,
|
||||
master = {},
|
||||
choicesReady,
|
||||
@ -1028,7 +1029,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
parent_scope.removeAddTreeRefreshed();
|
||||
}
|
||||
parent_scope.removeAddTreeRefreshed = parent_scope.$on('GroupTreeRefreshed', function() {
|
||||
//Clean up
|
||||
// Clean up
|
||||
// Change the selected group
|
||||
if (groups_reload && parent_scope.selected_tree_id !== tree_id) {
|
||||
parent_scope.showHosts(tree_id, group_id, false);
|
||||
@ -1191,7 +1192,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
data.inventory = inventory_id;
|
||||
|
||||
Rest.setUrl(defaultUrl);
|
||||
if (mode === 'edit') {
|
||||
if (mode === 'edit' || (mode === 'add' && group_created)) {
|
||||
Rest.put(data)
|
||||
.success(function () {
|
||||
if (properties_scope.variables) {
|
||||
@ -1211,8 +1212,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
else {
|
||||
Rest.post(data)
|
||||
.success(function (data) {
|
||||
mode = 'edit'; // Once the group is saved, we're in edit mode. We may end up re-saving
|
||||
// the group, if there is an error on the source
|
||||
group_created = true;
|
||||
if (properties_scope.variables) {
|
||||
sources_scope.source_url = data.related.inventory_source;
|
||||
modal_scope.$emit('updateVariables', json_data, data.related.variable_data);
|
||||
|
Loading…
Reference in New Issue
Block a user