app: add cron section

part of cloudron/box#793
This commit is contained in:
Girish Ramakrishnan
2021-09-27 15:32:44 -07:00
parent e1801b7a99
commit ce323ca60a
3 changed files with 63 additions and 1 deletions

View File

@@ -562,6 +562,7 @@
<div ng-click="setView('graphs')" ng-class="{ 'active': view === 'graphs' }">{{ 'app.graphsTabTitle' | tr }}</div>
<div ng-click="setView('security')" ng-class="{ 'active': view === 'security' }">{{ 'app.securityTabTitle' | tr }}</div>
<div ng-click="setView('email')" ng-class="{ 'active': view === 'email' }" ng-show="app.accessLevel === 'admin' && (app.manifest.addons.sendmail || app.manifest.addons.recvmail)">{{ 'app.emailTabTitle' | tr }}</div>
<div ng-click="setView('cron')" ng-class="{ 'active': view === 'cron' }">{{ 'app.cronTabTitle' | tr }}</div>
<div ng-click="setView('eventlog')" ng-class="{ 'active': view === 'eventlog' }">{{ 'app.eventlogTabTitle' | tr }}</div>
<div ng-click="setView('updates')" ng-class="{ 'active': view === 'updates' }">{{ 'app.updatesTabTitle' | tr }}</div>
<div ng-click="setView('backups')" ng-class="{ 'active': view === 'backups' }">{{ 'app.backupsTabTitle' | tr }}</div>
@@ -1009,6 +1010,30 @@
</div>
</div>
<div class="card" ng-show="view === 'cron'">
<div class="row">
<div class="col-md-12">
<form role="form" name="cronForm" ng-submit="cron.submit()" autocomplete="off">
<div class="form-group" ng-class="{ 'has-error': cron.error.crontab }">
<label class="control-label" style="width: 100%">{{ 'app.cron.title' | tr }} <sup><a ng-href="https://docs.cloudron.io/apps/#cron" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
<div ng-show="cron.error.crontab"><small>{{ cron.error.crontab }}</small></div>
<textarea ng-trim="false" style="white-space: pre-wrap" ng-model="cron.crontab" class="form-control" rows="10"></textarea>
</div>
<input class="ng-hide" type="submit" ng-disabled="cronForm.$invalid || cron.busy"/>
</form>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12 text-right">
<button class="btn btn-outline btn-primary pull-right" ng-click="cron.submit()" ng-disabled="cron.$invalid || cron.busy || app.error" tooltip-enable="app.error" uib-tooltip="App is in error state">
<i class="fa fa-circle-notch fa-spin" ng-show="cron.busy"></i> {{ 'app.cron.saveAction' | tr }}
</button>
</div>
</div>
</div>
<div class="card" ng-show="view === 'eventlog'">
<div class="row">
<div class="col-md-12">