Group redis services and have them collapsed

This commit is contained in:
Johannes Zellner
2020-05-05 16:36:52 +02:00
parent a31ea92649
commit aa9317069a
2 changed files with 53 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Configure {{ serviceConfigure.service.name }}</h4>
<h4 class="modal-title">Configure {{ serviceConfigure.service.displayName }}</h4>
</div>
<div class="modal-body">
<form name="serviceConfigureForm" role="form" novalidate ng-submit="serviceConfigure.submit()" autocomplete="off">
@@ -137,13 +137,41 @@
<a class="btn btn-xs btn-default" href="/logs.html?id=box" target="_blank" uib-tooltip="Logs"><i class="fa fa-file-alt"></i></a>
</td>
</tr>
<tr ng-repeat="service in services | orderBy:'name'">
<tr ng-repeat="service in services | filter:{ isRedis: false } | orderBy:'name'">
<td>
<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>
</td>
<td class="elide-table-cell">
{{ service.name }}
{{ service.displayName }}
</td>
<td class="elide-table-cell">
<div class="progress progress-striped" ng-show="service.config.memory">
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ service.memoryPercent }}%"></div>
</div>
</td>
<td class="elide-table-cell text-center">
<span ng-show="service.config.memory">{{ service.config.memorySwap / 1024 / 1024 + ' MB' }}</span>
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<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>
<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>
<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>
</td>
</tr>
<tr ng-show="true" 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>
<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>
</td>
<td class="elide-table-cell">
{{ service.displayName }}
</td>
<td class="elide-table-cell">
<div class="progress progress-striped" ng-show="service.config.memory">