1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 16:29:44 +02:00

fix(services): fix invalid replica count (#1990) (#2127)

* fix(services): replicas numbers display is now correct with constraints and down nodes

* refactor(helpers): constraint helper has less complexity

* feat(services): constraints on node/engine labels are now supported

* refactor(helpers): ConstraintsHelper - remove regex patterns and improve code lisibility

* refactor(helpers): rework matchesConstraint() for better code lisibility and lodash find() instead for IE compatibility
This commit is contained in:
baron_l 2018-08-19 08:05:16 +02:00 committed by Anthony Lapenna
parent e1e263d8c8
commit 1b51daf9c4
4 changed files with 113 additions and 6 deletions

View file

@ -96,7 +96,7 @@
<td>{{ item.Image | hideshasum }}</td>
<td ng-controller="ServicesDatatableActionsController as actionCtrl">
{{ item.Mode }}
<code>{{ item.Tasks | runningtaskscount }}</code> / <code>{{ item.Mode === 'replicated' ? item.Replicas : ($ctrl.nodes | availablenodecount) }}</code>
<code>{{ item.Tasks | runningtaskscount }}</code> / <code>{{ item.Mode === 'replicated' ? item.Replicas : ($ctrl.nodes | availablenodecount:item) }}</code>
<span ng-if="item.Mode === 'replicated' && !item.Scale">
<a class="interactive" ng-click="item.Scale = true; item.ReplicaCount = item.Replicas; $event.stopPropagation();">
<i class="fa fa-arrows-alt-v" aria-hidden="true"></i> Scale