mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(cluster): Show the cluster health by showing the status of the underlying cluster components (#4022)
* feat(cluster): add tabs * feat(cluster): add cluster status informations to cluster detail view * feat(cluster): change data display * feat(cluster): prevent regular users to see cluster health * feat(kubernetes): reviewed ComponentStatus handling * refactor(kubernetes): review apiToModel for KubernetesComponentStatus * refactor(kubernetes): remove unused variable * refactor(kubernetes): clean hasUnhealthyComponentStatus code Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
833abb24cb
commit
f765c63c74
6 changed files with 142 additions and 3 deletions
|
@ -5,11 +5,11 @@
|
|||
<kubernetes-view-loading view-ready="ctrl.state.viewReady"></kubernetes-view-loading>
|
||||
|
||||
<div ng-if="ctrl.state.viewReady">
|
||||
<div class="row" ng-if="ctrl.resourceReservation && ctrl.isAdmin">
|
||||
<div class="row" ng-if="ctrl.isAdmin">
|
||||
<div class="col-sm-12">
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<form class="form-horizontal">
|
||||
<form class="form-horizontal" ng-if="ctrl.resourceReservation">
|
||||
<kubernetes-resource-reservation
|
||||
cpu="ctrl.resourceReservation.CPU"
|
||||
cpu-limit="ctrl.CPULimit"
|
||||
|
@ -19,6 +19,32 @@
|
|||
>
|
||||
</kubernetes-resource-reservation>
|
||||
</form>
|
||||
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Cluster status
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr class="text-muted">
|
||||
<td style="border-top: none;">Component</td>
|
||||
<td style="border-top: none;">Status</td>
|
||||
<td style="border-top: none;" ng-if="ctrl.hasUnhealthyComponentStatus">Error</td>
|
||||
</tr>
|
||||
<tr ng-repeat="cs in ctrl.ComponentStatuses">
|
||||
<td>
|
||||
{{ cs.ComponentName }}
|
||||
</td>
|
||||
<td>
|
||||
<span ng-if="cs.Healthy"><i class="fa fa-check green-icon" aria-hidden="true" style="margin-right: 2px;"></i> healthy</span>
|
||||
<span ng-if="!cs.Healthy"><i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i> unhealthy</span>
|
||||
</td>
|
||||
<td ng-if="ctrl.hasUnhealthyComponentStatus">
|
||||
{{ cs.ErrorMessage !== '' ? cs.ErrorMessage : '-' }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue