mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Only show 'Schedules' tab on inventory groups dialog when a source value is selected.
This commit is contained in:
parent
2585855e1c
commit
0f3bd58745
@ -34,6 +34,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
|
||||
});
|
||||
}
|
||||
}
|
||||
scope.$emit('sourceTypeOptionsReady');
|
||||
})
|
||||
.error(function (data, status) {
|
||||
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) {
|
||||
modal_scope.removeChoicesComplete();
|
||||
}
|
||||
@ -889,6 +902,8 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
|
||||
modal_scope.$emit('choicesCompleteGroup');
|
||||
}
|
||||
else {
|
||||
properties_scope.variables = "---";
|
||||
master.variables = properties_scope.variables;
|
||||
modal_scope.$emit('groupVariablesLoaded');
|
||||
}
|
||||
}
|
||||
@ -1125,6 +1140,7 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
|
||||
|
||||
// Change the lookup and regions when the source changes
|
||||
sources_scope.sourceChange = function () {
|
||||
parent_scope.showSourceTab = (sources_scope.source && sources_scope.source.value) ? true : false;
|
||||
SourceChange({ scope: sources_scope, form: SourceForm });
|
||||
};
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
href="#properties-tab" data-toggle="tab">Properties</a></li>
|
||||
<li><a id="source_link" ng-click="toggleTab($event, 'source_link', 'group_tabs')"
|
||||
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>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user