Add a way to disable auto updates

This commit is contained in:
Girish Ramakrishnan
2020-07-29 20:14:30 -07:00
parent 31fbffb435
commit ab3abe7e5e
2 changed files with 49 additions and 20 deletions

View File

@@ -58,13 +58,26 @@
Cloudron <a href="/#/backups">backup schedule</a>.
</p>
<div class="row">
<div class="col-md-6">
Days: <multiselect class="input-sm stretch" ng-model="updateSchedule.days" options="a.name for a in cronDays" data-multiple="true"></multiselect>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="updateSchedule.type" value="never"> Disable Auto Updates
</label>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="updateSchedule.type" value="pattern"> Enable Auto Updates
<span class="label label-danger" ng-show="updateSchedule.type === 'pattern' && !updateSchedule.isScheduleValid()">Select at least one day and time</span>
</label>
</div>
<div>
<div style="margin-left: 20px;">
<div class="col-md-5">
Days: <multiselect class="input-sm stretch" ng-model="updateSchedule.days" ng-disabled="updateSchedule.type !== 'pattern'" options="a.name for a in cronDays" data-multiple="true"></multiselect>
</div>
<div class="col-md-6">
Hours: <multiselect class="input-sm stretch" ng-model="updateSchedule.hours" options="a.name for a in cronHours" data-multiple="true"></multiselect>
<div class="col-md-5">
Hours: <multiselect class="input-sm stretch" ng-model="updateSchedule.hours" ng-disabled="updateSchedule.type !== 'pattern'" options="a.name for a in cronHours" data-multiple="true"></multiselect>
</div>
</div>
</div>
</div>
@@ -228,7 +241,9 @@
<div class="row">
<p class="col-md-12">
The current auto update schedule for apps is <b>{{ prettyAutoUpdateSchedule(updateSchedule.currentPattern) }}</b>.<br/>
<span ng-show="updateSchedule.currentPattern !== 'never'">The current auto update schedule for apps is <b>{{ prettyAutoUpdateSchedule(updateSchedule.currentPattern) }}</b>.</span>
<span ng-show="updateSchedule.currentPattern === 'never'">Auto update for apps is <b>disabled</b>.</span>
<br/>
</p>
</div>