mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
feat(k8s/cluster): Show the cluster leader (#4027)
* feat(cluster): Show the cluster leader * feat(cluster): Restrict leader label only to admin users * feat(kubernetes): minor UI update * feat(endpoint): move all KubernetesEndpoint related code to a single endpoint sub-folder and change few things * fix(k8s/cluster): fix conflict leftover * feat(k8s/cluster): review component leader UX * refactor(k8s/node): remove useless call to endpoints * refactor(k8s/endpoint): relocate variable declaration Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
f765c63c74
commit
94676df329
7 changed files with 162 additions and 16 deletions
|
@ -9,6 +9,7 @@
|
|||
<div class="col-sm-12">
|
||||
<rd-widget>
|
||||
<rd-widget-body>
|
||||
<!-- resource-reservation -->
|
||||
<form class="form-horizontal" ng-if="ctrl.resourceReservation">
|
||||
<kubernetes-resource-reservation
|
||||
cpu="ctrl.resourceReservation.CPU"
|
||||
|
@ -19,7 +20,9 @@
|
|||
>
|
||||
</kubernetes-resource-reservation>
|
||||
</form>
|
||||
<!-- !resource-reservation -->
|
||||
|
||||
<!-- cluster-status -->
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Cluster status
|
||||
</div>
|
||||
|
@ -27,24 +30,50 @@
|
|||
<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>
|
||||
<td style="border-top: none; width: 25%;">Component</td>
|
||||
<td style="border-top: none; width: 25%;">Status</td>
|
||||
<td style="border-top: none; width: 50%;" ng-if="ctrl.hasUnhealthyComponentStatus">Error</td>
|
||||
</tr>
|
||||
<tr ng-repeat="cs in ctrl.ComponentStatuses">
|
||||
<td>
|
||||
<tr ng-repeat="cs in ctrl.componentStatuses">
|
||||
<td style="width: 25%;">
|
||||
{{ cs.ComponentName }}
|
||||
</td>
|
||||
<td>
|
||||
<td style="width: 25%;">
|
||||
<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">
|
||||
<td ng-if="ctrl.hasUnhealthyComponentStatus" style="width: 50%;">
|
||||
{{ cs.ErrorMessage !== '' ? cs.ErrorMessage : '-' }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- !cluster-status -->
|
||||
|
||||
<!-- leader-status -->
|
||||
<div ng-if="ctrl.endpoints.length > 0">
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Leader status
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr class="text-muted">
|
||||
<td style="border-top: none; width: 25%;">Component</td>
|
||||
<td style="border-top: none; width: 25%;">Leader node</td>
|
||||
</tr>
|
||||
<tr ng-repeat="ep in ctrl.endpoints">
|
||||
<td style="width: 25%;">
|
||||
{{ ep.Name }}
|
||||
</td>
|
||||
<td style="width: 25%;">
|
||||
{{ ep.HolderIdentity }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- !leader-status -->
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue