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