Files
cloudron-box/dashboard/public/views/notifications.html
2025-05-07 13:19:20 +02:00

96 lines
5.2 KiB
HTML

<!-- Modal configure notifications -->
<div class="modal fade" id="notificationsSettingsModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ 'notifications.settings.title' | tr:{ username: (userRemove.userInfo.username || userRemove.userInfo.email) } }}</h4>
</div>
<div class="modal-body">
<p>{{ 'notifications.settingsDialog.description' | tr }}</p>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.appUp"> {{ 'notifications.settings.appUp' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.appDown"> {{ 'notifications.settings.appDown' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.appOutOfMemory"> {{ 'notifications.settings.appOutOfMemory' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.backupFailed"> {{ 'notifications.settings.backupFailed' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.certificateRenewalFailed"> {{ 'notifications.settings.certificateRenewalFailed' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.diskSpace"> {{ 'notifications.settings.diskSpace' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.cloudronUpdateFailed"> {{ 'notifications.settings.cloudronUpdateFailed' | tr }}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.config.reboot"> {{ 'notifications.settings.rebootRequired' | tr }}
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
<button type="button" class="btn btn-primary" ng-click="settings.submit()" ng-disabled="settings.busy"><i class="fa fa-circle-notch fa-spin" ng-show="settings.busy"></i> {{ 'main.saveAction' | tr }}</button>
</div>
</div>
</div>
</div>
<div class="content content-large">
<h1 class="section-header">
{{ 'notifications.title' | tr }}
<div style="flex-grow: 1;"></div>
<button class="btn btn-default" ng-click="settings.show()"><i class="fas fa-mail-bulk"></i></button>
<button class="btn btn-default" ng-click="showPrevPage()" ng-disabled="busy || currentPage <= 1"><i class="fa fa-angle-double-left"></i> {{ 'main.pagination.prev' | tr }}</button>
<button class="btn btn-default" ng-click="showNextPage()" ng-disabled="busy || perPage > notifications.length">{{ 'main.pagination.next' | tr }} <i class="fa fa-angle-double-right"></i></button>
<button class="btn btn-primary" ng-click="clearAll()" ng-disabled="!$parent.notificationCount || clearAllBusy"><i class="fa fa-circle-notch fa-spin" ng-show="clearAllBusy"></i><i class="fa fa-check" ng-hide="clearAllBusy"></i> {{ 'notifications.markAllAsRead' | tr }}</button>
</h1>
<div class="col-lg-12 text-center" ng-show="busy">
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
</div>
<div class="card card-large" ng-hide="busy || notifications.length">
<div class="row">
<div class="col-xs-12">
<h3 class="text-center" style="margin: 20px;">{{ 'notifications.nonePending' | tr }}</h3>
</div>
</div>
</div>
<div class="card card-large notification-item" ng-repeat="notification in notifications" ng-class="{'notification-unread': !notification.acknowledged }" ng-click="notification.isCollapsed = !notification.isCollapsed" ng-style="{ borderLeftColor: (notification | notificationTypeToColor) }">
<div class="row">
<div class="col-xs-12" ng-class="{ 'notification-details': notification.detailsShown }">
<span class="notification-title">{{ notification.title }}</span> <small class="text-muted" uib-tooltip="{{ notification.creationTime | prettyLongDate }}">{{ notification.creationTime | prettyDate }}</small>
<div uib-collapse="notification.isCollapsed" expanding="ack(notification)">
<br/>
<p ng-hide="notification.messageJson" ng-click="$event.stopPropagation();" style="cursor: auto; overflow: auto;" ng-bind-html="notification.message | markdown2html"></p>
<pre ng-show="notification.messageJson" ng-click="$event.stopPropagation();" style="cursor: auto">{{ notification.messageJson | json }}</pre>
<button type="button" class="btn btn-danger pull-right" ng-click="$event.stopPropagation(); $parent.reboot.show()" ng-show="notification.title === 'Reboot Required'" ng-disabled="reboot.busy"><i class="fa fa-circle-notch fa-spin" ng-show="reboot.busy"></i> {{ 'main.action.reboot' | tr }}</button>
</div>
</div>
</div>
</div>
</div>