Files
cloudron-box/src/views/system.html

148 lines
6.6 KiB
HTML
Raw Normal View History

<!-- Modal reboot server -->
<div class="modal fade" id="rebootModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Really reboot server?</h4>
</div>
<div class="modal-body">
<p class="text-bold">Rebooting the server will cause temporary downtime for all apps installed on this Cloudron!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger" ng-click="reboot.submit()" ng-disabled="reboot.busy"><i class="fa fa-circle-notch fa-spin" ng-show="reboot.busy"></i> Reboot now</button>
</div>
</div>
</div>
</div>
2018-12-10 11:35:53 +01:00
<!-- Modal service configure -->
<div class="modal fade" id="serviceConfigureModal" tabindex="-1" role="dialog">
2018-11-20 16:53:42 +01:00
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
2018-12-10 11:35:53 +01:00
<h4 class="modal-title">Configure {{ serviceConfigure.service.name }}</h4>
2018-11-20 16:53:42 +01:00
</div>
<div class="modal-body">
2018-12-10 11:35:53 +01:00
<form name="serviceConfigureForm" role="form" novalidate ng-submit="serviceConfigure.submit()" autocomplete="off">
2018-11-20 16:53:42 +01:00
<fieldset>
2018-12-10 11:35:53 +01:00
<p class="has-error text-center" ng-show="serviceConfigure.error">{{ serviceConfigure.error }}</p>
2018-11-20 16:53:42 +01:00
<div class="form-group">
2018-12-10 11:35:53 +01:00
<label class="control-label" for="memoryLimit">Memory Limit <sup><a ng-href="/" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup> : <b>{{ serviceConfigure.memoryLimit / 1024 / 1024 + 'MB' }}</b></label>
2018-11-20 16:53:42 +01:00
<br/>
<div style="padding: 0 10px;">
2018-12-10 11:35:53 +01:00
<slider id="memoryLimit" ng-model="serviceConfigure.memoryLimit" step="134217728" tooltip="hide" ticks="serviceConfigure.memoryTicks" ticks-snap-bounds="67108864"></slider>
2018-11-20 16:53:42 +01:00
</div>
</div>
2018-12-10 11:35:53 +01:00
<input class="ng-hide" type="submit" ng-disabled="serviceConfigureForm.$invalid || serviceConfigure.busy"/>
2018-11-20 16:53:42 +01:00
</fieldset>
</form>
</div>
<div class="modal-footer ">
2018-12-10 11:35:53 +01:00
<button type="button" class="btn btn-default pull-left" ng-click="serviceConfigure.submit(0)" ng-disabled="serviceConfigureForm.$invalid || serviceConfigure.busy">
<i class="fa fa-circle-notch fa-spin" ng-show="serviceConfigure.busy"></i> Reset to defaults
</button>
2018-11-20 16:53:42 +01:00
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
2018-12-10 11:35:53 +01:00
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="serviceConfigure.submit(serviceConfigure.memoryLimit)" ng-disabled="serviceConfigureForm.$invalid || serviceConfigure.busy">
<i class="fa fa-circle-notch fa-spin" ng-show="serviceConfigure.busy"></i> Save
2018-11-20 16:53:42 +01:00
</button>
</div>
</div>
</div>
</div>
2018-11-15 19:59:24 +01:00
<div class="content">
<div class="text-left">
<h1>System</h1>
2018-11-15 19:59:24 +01:00
</div>
<div class="text-left">
<h3>Services</h3>
2018-11-15 19:59:24 +01:00
</div>
<div class="card" style="margin-bottom: 15px;">
<div class="row">
<div class="col-md-12">
<p>
Cloudron services implement functionality such as databases, email and authentication.<br/>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
2018-11-15 19:59:24 +01:00
<div class="row ng-hide" ng-show="!ready">
<div class="col-md-12 text-center">
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
2018-11-15 19:59:24 +01:00
</div>
</div>
<div class="row animateMeOpacity ng-hide" ng-show="ready">
<div class="col-md-12">
2018-11-15 19:59:24 +01:00
<table class="table table-hover">
<thead>
<tr>
2018-11-28 12:53:35 +01:00
<th style="width: 5%;"></th>
<th style="width: 20%">Service</th>
2018-11-28 12:53:35 +01:00
<th style="width: 50%">Memory Usage</th>
<th style="width: 20%" class="text-center">Memory Limit</th>
2018-11-15 19:59:24 +01:00
<th style="width: 5%" class="text-right">Actions</th>
</tr>
</thead>
<tbody>
2018-12-10 11:36:34 +01:00
<tr ng-repeat="service in services | orderBy:'name'">
2018-11-15 19:59:24 +01:00
<td>
2018-12-10 11:35:53 +01:00
<i class="fa fa-circle" uib-tooltip="{{ service.status }}" ng-style="{ color: service.status === 'active' ? '#27CE65' : (service.status === 'starting' ? '#f0ad4e' : '#d9534f') }" ng-show="service.status"></i>
<i class="fa fa-circle-notch fa-spin" ng-hide="service.status"></i>
2018-11-15 19:59:24 +01:00
</td>
<td class="elide-table-cell">
2018-12-10 11:35:53 +01:00
{{ service.name }}
2018-11-15 19:59:24 +01:00
</td>
<td class="elide-table-cell">
2018-12-10 11:35:53 +01:00
<div class="progress progress-striped" ng-show="service.config.memory">
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ service.memoryPercent }}%"></div>
2018-11-28 12:53:35 +01:00
</div>
</td>
<td class="elide-table-cell text-center">
2018-12-10 11:35:53 +01:00
<span ng-show="service.config.memory">{{ service.config.memory / 1024 / 1024 + ' MB' }}</span>
2018-11-15 19:59:24 +01:00
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
2018-12-10 11:35:53 +01:00
<button class="btn btn-xs btn-default" ng-click="serviceConfigure.show(service)" uib-tooltip="Configure Memory Limit" ng-show="service.config.memory"><i class="fa fa-pencil-alt"></i></button>
<a class="btn btn-xs btn-default" ng-href="{{ '/logs.html?id=' + service.name }}" target="_blank" uib-tooltip="Logs"><i class="fa fa-file-alt"></i></a>
<button class="btn btn-xs btn-default" ng-click="restartService(service.name)" uib-tooltip="Restart"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': service.status === 'starting' }"></i></button>
2018-11-15 19:59:24 +01:00
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="text-left">
<h3>Server</h3>
</div>
<div class="card" style="margin-bottom: 15px;">
<div class="row">
<div class="col-md-12">
<p class="text-danger text-bold" ng-show="isRebootRequired">
2019-09-05 12:28:04 -07:00
This server requires a reboot to finalize Ubuntu security updates.
</p>
<p ng-hide="isRebootRequired">
2018-12-06 10:12:12 -08:00
Use this only when you experience unexpected behavior. All services and apps will be automatically started.
</p>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<a class="btn btn-primary" href="/logs.html?id=box" target="_blank">Show Logs</a>
<button class="btn btn-danger" ng-click="reboot.show()">Reboot</button>
</div>
</div>
</div>
2018-11-15 19:59:24 +01:00
</div>