mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Only show 'Schedules' tab on inventory groups dialog when a source value is selected.
This commit is contained in:
@@ -34,6 +34,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
scope.$emit('sourceTypeOptionsReady');
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors(scope, data, status, null, {
|
ProcessErrors(scope, data, status, null, {
|
||||||
@@ -853,6 +854,18 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
sources_scope.removeScopeSourceTypeOptionsReady = sources_scope.$on('sourceTypeOptionsReady', function() {
|
||||||
|
if (mode === 'add') {
|
||||||
|
sources_scope.source = Find({
|
||||||
|
list: sources_scope.source_type_options,
|
||||||
|
key: 'value',
|
||||||
|
val: ''
|
||||||
|
});
|
||||||
|
console.log(sources_scope.source);
|
||||||
|
parent_scope.showSourceTab = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (modal_scope.removeChoicesComplete) {
|
if (modal_scope.removeChoicesComplete) {
|
||||||
modal_scope.removeChoicesComplete();
|
modal_scope.removeChoicesComplete();
|
||||||
}
|
}
|
||||||
@@ -889,6 +902,8 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
|
|||||||
modal_scope.$emit('choicesCompleteGroup');
|
modal_scope.$emit('choicesCompleteGroup');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
properties_scope.variables = "---";
|
||||||
|
master.variables = properties_scope.variables;
|
||||||
modal_scope.$emit('groupVariablesLoaded');
|
modal_scope.$emit('groupVariablesLoaded');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1125,6 +1140,7 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
|
|||||||
|
|
||||||
// Change the lookup and regions when the source changes
|
// Change the lookup and regions when the source changes
|
||||||
sources_scope.sourceChange = function () {
|
sources_scope.sourceChange = function () {
|
||||||
|
parent_scope.showSourceTab = (sources_scope.source && sources_scope.source.value) ? true : false;
|
||||||
SourceChange({ scope: sources_scope, form: SourceForm });
|
SourceChange({ scope: sources_scope, form: SourceForm });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
href="#properties-tab" data-toggle="tab">Properties</a></li>
|
href="#properties-tab" data-toggle="tab">Properties</a></li>
|
||||||
<li><a id="source_link" ng-click="toggleTab($event, 'source_link', 'group_tabs')"
|
<li><a id="source_link" ng-click="toggleTab($event, 'source_link', 'group_tabs')"
|
||||||
href="#sources-tab" data-toggle="tab">Source</a></li>
|
href="#sources-tab" data-toggle="tab">Source</a></li>
|
||||||
<li><a id="schedules_link" ng-click="toggleTab($event, 'schedules_link', 'group_tabs')"
|
<li ng-show="showSourceTab"><a id="schedules_link" ng-click="toggleTab($event, 'schedules_link', 'group_tabs')"
|
||||||
href="#schedules-tab" data-toggle="tab">Schedule</a></li>
|
href="#schedules-tab" data-toggle="tab">Schedule</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|||||||
Reference in New Issue
Block a user