1
0
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:
Jared Tabor 2015-08-19 15:37:36 -07:00
parent e80dcd9645
commit 40700d76c9
2 changed files with 7 additions and 7 deletions

View File

@ -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. <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> 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> <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"> <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> <div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required">A value is required.</div>

View File

@ -220,13 +220,13 @@ export default
Rest.get() Rest.get()
.success(function(data) { .success(function(data) {
schedule = data; schedule = data;
if(schedule.hasOwnProperty('extra_data')) { if(schedule.extra_data.hasOwnProperty('granularity')){
if(schedule.extra_data.hasOwnProperty('granularity')){ scope.isFactCleanup = true;
scope.isFactCleanup = true;
} else {
scope.cleanupJob = true;
}
} }
if (schedule.extra_data.hasOwnProperty('days')){
scope.cleanupJob = true;
}
scope.$emit('ScheduleFound'); scope.$emit('ScheduleFound');
}) })
.error(function(data,status){ .error(function(data,status){