Merge pull request #389 from jaredevantabor/scheduler-fix

Scheduler fixes
This commit is contained in:
jaredevantabor
2015-08-26 18:02:50 -07:00
3 changed files with 11 additions and 8 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.
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>

View File

@@ -297,7 +297,10 @@ angular.module('AngularScheduler', ['underscore'])
}
return false;
});
scope.rrule_nlp_description = rrule.toText().replace(/^RRule error.*$/,'Natural language description not available');
scope.rrule_nlp_description = rrule.toText().replace(/^RRule error.*$/,'Minutely or hourly frequency selected');
if(rrule === "none"){
scope.rrule_nlp_description = 'Natural language description not available';
}
scope.rrule = rrule.toString();
}
};

View File

@@ -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){