mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
change ng-show to ng-if and only make a job a cleanup job or fact cleanup job if extra vars have addtional properties
This commit is contained in:
parent
e80dcd9645
commit
40700d76c9
@ -25,7 +25,7 @@
|
||||
<div class="factDetailsNote" ng-if="isFactCleanup"><span class="factDetailsHeader">Note:</span> For facts collected older than the time period specified, save one fact scan (snapshot) per time window (frequency). For example, facts older than 30 days are purged, while one weekly fact scan is kept.
|
||||
Caution: Setting both numerical variables to "0" will delete all facts.</div>
|
||||
|
||||
<div class="form-group" ng-show="cleanupJob && !isFactCleanup">
|
||||
<div class="form-group" ng-if="cleanupJob && !isFactCleanup">
|
||||
<label><span class="red-text">*</span> Days of data to keep</label>
|
||||
<input type="number" class="form-control input-sm" name="schedulerPurgeDays" id="schedulerPurgeDays" min="1" ng-model="schedulerPurgeDays" required placeholder="Days of data to keep">
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required">A value is required.</div>
|
||||
|
@ -220,13 +220,13 @@ export default
|
||||
Rest.get()
|
||||
.success(function(data) {
|
||||
schedule = data;
|
||||
if(schedule.hasOwnProperty('extra_data')) {
|
||||
if(schedule.extra_data.hasOwnProperty('granularity')){
|
||||
scope.isFactCleanup = true;
|
||||
} else {
|
||||
scope.cleanupJob = true;
|
||||
}
|
||||
if(schedule.extra_data.hasOwnProperty('granularity')){
|
||||
scope.isFactCleanup = true;
|
||||
}
|
||||
if (schedule.extra_data.hasOwnProperty('days')){
|
||||
scope.cleanupJob = true;
|
||||
}
|
||||
|
||||
scope.$emit('ScheduleFound');
|
||||
})
|
||||
.error(function(data,status){
|
||||
|
Loading…
Reference in New Issue
Block a user