2020-09-28 15:16:02 +02:00
|
|
|
<!-- Modal service configure -->
|
|
|
|
|
<div class="modal fade" id="serviceConfigureModal" tabindex="-1" role="dialog">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
2020-11-12 23:13:52 +01:00
|
|
|
<h4 class="modal-title">{{ 'services.configure.title' | tr:{ name: serviceConfigure.service.displayName } }}</h4>
|
2020-09-28 15:16:02 +02:00
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<form name="serviceConfigureForm" role="form" novalidate ng-submit="serviceConfigure.submit()" autocomplete="off">
|
|
|
|
|
<fieldset>
|
|
|
|
|
<p class="has-error text-center" ng-show="serviceConfigure.error">{{ serviceConfigure.error }}</p>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2020-12-04 17:36:38 +01:00
|
|
|
<label class="control-label" style="display: block;" for="memoryLimit">
|
2024-04-10 12:17:14 +02:00
|
|
|
{{ 'services.memoryLimit' | tr }}: <b>{{ serviceConfigure.memoryLimit | prettyBinarySize:'' }}</b>
|
2020-12-04 17:36:38 +01:00
|
|
|
<button type="button" class="btn btn-xs btn-default pull-right" ng-click="serviceConfigure.resetToDefaults()">{{ 'services.configure.resetToDefaults' | tr }}</button>
|
|
|
|
|
</label>
|
2020-09-28 15:16:02 +02:00
|
|
|
<div style="padding: 0 10px;">
|
2024-03-12 15:28:47 +01:00
|
|
|
<input type="range" id="memoryLimit" ng-model="serviceConfigure.memoryLimit" step="134217728" min="{{ serviceConfigure.memoryTicks[0] }}" max="{{ serviceConfigure.memoryTicks[serviceConfigure.memoryTicks.length-1] }}" list="memoryLimitTicks" />
|
|
|
|
|
<datalist id="memoryLimitTicks">
|
|
|
|
|
<option ng-repeat="limit in serviceConfigure.memoryTicks" value="{{ limit }}"></option>
|
|
|
|
|
</datalist>
|
2020-09-28 15:16:02 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-10-01 13:42:10 -07:00
|
|
|
<div class="form-group">
|
|
|
|
|
<br>
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<label>
|
2021-10-01 14:28:09 -07:00
|
|
|
<input type="checkbox" ng-model="serviceConfigure.recoveryMode"><b>{{ 'services.configure.enableRecoveryMode' | tr }}</b></input>
|
2021-10-01 13:42:10 -07:00
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<p ng-bind-html="'services.configure.recoveryModeDescription' | tr:{ docsLink: 'https://docs.cloudron.io/troubleshooting/#unresponsive-service' }"></p>
|
|
|
|
|
</div>
|
|
|
|
|
|
2020-09-28 15:16:02 +02:00
|
|
|
<input class="ng-hide" type="submit" ng-disabled="serviceConfigureForm.$invalid || serviceConfigure.busy"/>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer ">
|
2020-11-05 14:48:36 +01:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
2021-10-01 13:42:10 -07:00
|
|
|
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="serviceConfigure.submit()" ng-disabled="serviceConfigureForm.$invalid || serviceConfigure.busy"><i class="fa fa-circle-notch fa-spin" ng-show="serviceConfigure.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
2020-09-28 15:16:02 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
2024-10-15 18:46:51 +02:00
|
|
|
<h1 class="section-header">
|
|
|
|
|
{{ 'services.title' | tr }}
|
|
|
|
|
<button class="btn btn-default" ng-click="refreshAll()">{{ 'services.refresh' | tr }}</button>
|
|
|
|
|
</h1>
|
2020-09-28 15:16:02 +02:00
|
|
|
|
|
|
|
|
<div class="card" style="margin-bottom: 15px;">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
2020-11-05 14:48:36 +01:00
|
|
|
<p>{{ 'services.description' | tr }}</p>
|
2020-09-28 15:16:02 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="row ng-hide" ng-show="!servicesReady">
|
|
|
|
|
<div class="col-md-12 text-center">
|
|
|
|
|
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row animateMeOpacity ng-hide" ng-show="servicesReady">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<table class="table table-hover">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2024-10-15 19:24:05 +02:00
|
|
|
<th style="width: 30px;"></th>
|
|
|
|
|
<th>{{ 'services.service' | tr }}</th>
|
|
|
|
|
<th class="hide-mobile">{{ 'services.memoryUsage' | tr }}</th>
|
|
|
|
|
<th class="text-center hide-mobile">{{ 'services.memoryLimit' | tr }}</th>
|
|
|
|
|
<th class="text-right">{{ 'main.actions' | tr }}</th>
|
2020-09-28 15:16:02 +02:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
2022-02-16 16:31:22 +01:00
|
|
|
<td><i class="fa fa-circle status-active" uib-tooltip="active"></i></td>
|
2020-09-28 15:16:02 +02:00
|
|
|
<td class="elide-table-cell">cloudron</td>
|
2024-10-15 19:24:05 +02:00
|
|
|
<td class="elide-table-cell hide-mobile"></td>
|
|
|
|
|
<td class="elide-table-cell hide-mobile"></td>
|
2020-09-28 15:16:02 +02:00
|
|
|
<td class="text-right no-wrap" style="vertical-align: bottom">
|
2024-10-04 21:37:17 +02:00
|
|
|
<a class="btn btn-xs btn-default" href="/logs.html?id=box" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
2020-09-28 15:16:02 +02:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr ng-repeat="service in services | filter:{ isRedis: false } | orderBy:'name'">
|
|
|
|
|
<td>
|
2021-10-19 15:51:44 -07:00
|
|
|
<span ng-switch on="service.status" ng-show="service.status">
|
|
|
|
|
<span ng-switch-when="active">
|
2022-02-16 16:31:22 +01:00
|
|
|
<i class="fa fa-circle status-active" uib-tooltip="active"></i>
|
2021-10-19 15:51:44 -07:00
|
|
|
</span>
|
|
|
|
|
<span ng-switch-when="starting">
|
2022-02-16 16:31:22 +01:00
|
|
|
<i class="fa fa-circle status-starting" uib-tooltip="starting" ng-show="!service.config.recoveryMode"></i>
|
|
|
|
|
<i class="fa fa-circle status-inactive" uib-tooltip="recovery mode" ng-show="service.config.recoveryMode"></i>
|
2021-10-19 15:51:44 -07:00
|
|
|
</span>
|
|
|
|
|
<span ng-switch-default>
|
2022-02-16 16:31:22 +01:00
|
|
|
<i class="fa fa-circle status-error" uib-tooltip="{{ service.status }}"></i>
|
2021-10-19 15:51:44 -07:00
|
|
|
</span>
|
|
|
|
|
</span>
|
2020-09-28 15:16:02 +02:00
|
|
|
<i class="fa fa-circle-notch fa-spin" ng-hide="service.status"></i>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="elide-table-cell">
|
|
|
|
|
{{ service.displayName }}
|
|
|
|
|
</td>
|
2024-10-15 19:24:05 +02:00
|
|
|
<td class="elide-table-cell hide-mobile">
|
2021-01-19 18:51:43 -08:00
|
|
|
<div class="progress progress-striped" ng-show="service.config.memoryLimit">
|
2023-07-27 10:46:41 +02:00
|
|
|
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ service.memoryPercent }}%">{{ service.memoryPercent }}%</div>
|
2020-09-28 15:16:02 +02:00
|
|
|
</div>
|
|
|
|
|
</td>
|
2024-10-15 19:24:05 +02:00
|
|
|
<td class="elide-table-cell text-center hide-mobile">
|
Fix SI and Decimal unit usage
SI: For 1000, it is kB, MB, GB
IEC: For 1024, it is KiB, MiB, GiB
JEDEC: For 1024, it is KB, MB (conflicts with SI, of course)
Ultimately, what we decided is for RAM use IEC and for Disk use SI.
This is what docker does and also suggested here -
https://stackoverflow.com/questions/8632269/displaying-file-size-1000b-1kb-or-1024b-1kb
2022-10-13 21:48:03 +02:00
|
|
|
<span ng-show="service.config.memoryLimit">{{ service.config.memoryLimit | prettyBinarySize }}</span>
|
2020-09-28 15:16:02 +02:00
|
|
|
</td>
|
|
|
|
|
<td class="text-right no-wrap" style="vertical-align: bottom">
|
2024-04-01 12:04:48 +02:00
|
|
|
<button class="btn btn-xs btn-default" ng-click="serviceConfigure.show(service)" uib-tooltip="{{ 'services.configureActionTooltip' | tr }}" ng-disabled="service.status === 'disabled' || !service.config.memoryLimit"><i class="fa fa-pencil-alt"></i></button>
|
2024-04-01 22:49:22 +02:00
|
|
|
<!-- restart is always clickable so that a user can rebuild mongodb in disabled state when using VMs where CPU flags can be dynamically changed -->
|
|
|
|
|
<button class="btn btn-xs btn-default" ng-click="restartService(service.name)" uib-tooltip="{{ 'services.restartActionTooltip' | tr }}"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': service.status === 'starting' && !service.config.recoveryMode }"></i></button>
|
2024-10-04 21:37:17 +02:00
|
|
|
<a class="btn btn-xs btn-default" ng-href="{{ service.status === 'disabled' ? '' : ('/logs.html?id=' + service.name) }}" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}" ng-disabled="service.status === 'disabled'"><i class="fa fa-file-alt"></i></a>
|
2020-09-28 15:16:02 +02:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr ng-show="hasRedisServices" ng-click="redisServicesExpanded = !redisServicesExpanded" class="hand">
|
|
|
|
|
<td>
|
|
|
|
|
<i class="fas fa-angle-right" ng-class="{'fa-rotate-90': redisServicesExpanded }"></i>
|
|
|
|
|
</td>
|
|
|
|
|
<td colspan="4">redis</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr ng-show="redisServicesExpanded" ng-repeat="service in services | filter:{ isRedis: true } | orderBy:'name'">
|
|
|
|
|
<td>
|
2022-02-16 16:31:22 +01:00
|
|
|
<i class="fa fa-circle" uib-tooltip="{{ service.status }}" ng-class="{ 'status-active': service.status === 'active', 'status-starting': service.status === 'starting', 'status-error': (service.status !== 'starting' && service.status !== 'active') }" ng-show="service.status"></i>
|
2020-09-28 15:16:02 +02:00
|
|
|
<i class="fa fa-circle-notch fa-spin" ng-hide="service.status"></i>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="elide-table-cell">
|
|
|
|
|
{{ service.displayName }}
|
|
|
|
|
</td>
|
2024-10-15 19:24:05 +02:00
|
|
|
<td class="elide-table-cell hide-mobile">
|
2021-01-19 18:51:43 -08:00
|
|
|
<div class="progress progress-striped" ng-show="service.config.memoryLimit">
|
2020-09-28 15:16:02 +02:00
|
|
|
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ service.memoryPercent }}%"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
2024-10-15 19:24:05 +02:00
|
|
|
<td class="elide-table-cell text-center hide-mobile">
|
Fix SI and Decimal unit usage
SI: For 1000, it is kB, MB, GB
IEC: For 1024, it is KiB, MiB, GiB
JEDEC: For 1024, it is KB, MB (conflicts with SI, of course)
Ultimately, what we decided is for RAM use IEC and for Disk use SI.
This is what docker does and also suggested here -
https://stackoverflow.com/questions/8632269/displaying-file-size-1000b-1kb-or-1024b-1kb
2022-10-13 21:48:03 +02:00
|
|
|
<span ng-show="service.config.memoryLimit">{{ service.config.memoryLimit | prettyBinarySize }}</span>
|
2020-09-28 15:16:02 +02:00
|
|
|
</td>
|
|
|
|
|
<td class="text-right no-wrap" style="vertical-align: bottom">
|
2021-01-19 18:51:43 -08:00
|
|
|
<button class="btn btn-xs btn-default" ng-click="serviceConfigure.show(service)" uib-tooltip="{{ 'services.configureActionTooltip' | tr }}" ng-show="service.config.memoryLimit"><i class="fa fa-pencil-alt"></i></button>
|
2021-10-01 13:42:10 -07:00
|
|
|
<button class="btn btn-xs btn-default" ng-click="restartService(service.name)" uib-tooltip="{{ 'services.restartActionTooltip' | tr }}"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': service.status === 'starting' && !service.config.recoveryMode }"></i></button>
|
2024-10-04 21:37:17 +02:00
|
|
|
<a class="btn btn-xs btn-default" ng-href="{{ '/logs.html?id=' + service.name }}" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
2020-09-28 15:16:02 +02:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|