feat(dashboard): use plural form only when required

* fix(endpoint-item): use plural form only when required

* refactor(endpoint-item): use clearer patterns

* refactor(dashboard): use clearer patterns
pull/2493/head
Andreas Roussos 2018-11-24 22:46:13 +02:00 committed by Anthony Lapenna
parent 52788029ed
commit b809177147
2 changed files with 11 additions and 11 deletions

View File

@ -84,7 +84,7 @@
<i class="fa fa-th-list"></i>
</div>
<div class="title">{{ stackCount }}</div>
<div class="comment">Stacks</div>
<div class="comment">{{ stackCount === 1 ? 'Stack' : 'Stacks' }}</div>
</rd-widget-body>
</rd-widget>
</a>
@ -97,7 +97,7 @@
<i class="fa fa-list-alt"></i>
</div>
<div class="title">{{ serviceCount }}</div>
<div class="comment">Services</div>
<div class="comment">{{ serviceCount === 1 ? 'Service' : 'Services' }}</div>
</rd-widget-body>
</rd-widget>
</a>
@ -114,7 +114,7 @@
<div><i class="fa fa-heartbeat space-right red-icon"></i>{{ containers | stoppedcontainers }} stopped</div>
</div>
<div class="title">{{ containers.length }}</div>
<div class="comment">Containers</div>
<div class="comment">{{ containers.length === 1 ? 'Container' : 'Containers' }}</div>
</rd-widget-body>
</rd-widget>
</a>
@ -130,7 +130,7 @@
<div><i class="fa fa-chart-pie space-right"></i>{{ images | imagestotalsize | humansize }}</div>
</div>
<div class="title">{{ images.length }}</div>
<div class="comment">Images</div>
<div class="comment">{{ images.length === 1 ? 'Image' : 'Images' }}</div>
</rd-widget-body>
</rd-widget>
</a>
@ -143,7 +143,7 @@
<i class="fa fa-cubes"></i>
</div>
<div class="title">{{ volumeCount }}</div>
<div class="comment">Volumes</div>
<div class="comment">{{ volumeCount === 1 ? 'Volume' : 'Volumes' }}</div>
</rd-widget-body>
</rd-widget>
</a>
@ -156,7 +156,7 @@
<i class="fa fa-sitemap"></i>
</div>
<div class="title">{{ networkCount }}</div>
<div class="comment">Networks</div>
<div class="comment">{{ networkCount === 1 ? 'Network' : 'Networks' }}</div>
</rd-widget-body>
</rd-widget>
</a>

View File

@ -38,13 +38,13 @@
<span class="blocklist-item-desc">
<span>
<span style="padding: 0 7px 0 0;">
<i class="fa fa-th-list space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].StackCount }} stacks
<i class="fa fa-th-list space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].StackCount }} {{ $ctrl.model.Snapshots[0].StackCount === 1 ? 'stack' : 'stacks' }}
</span>
<span style="padding: 0 7px 0 7px;" ng-if="$ctrl.model.Snapshots[0].Swarm">
<i class="fa fa-list-alt space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].ServiceCount }} services
<i class="fa fa-list-alt space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].ServiceCount }} {{ $ctrl.model.Snapshots[0].ServiceCount === 1 ? 'service' : 'services' }}
</span>
<span style="padding: 0 7px 0 7px;">
<i class="fa fa-server space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].RunningContainerCount + $ctrl.model.Snapshots[0].StoppedContainerCount }} containers
<i class="fa fa-server space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].RunningContainerCount + $ctrl.model.Snapshots[0].StoppedContainerCount }} {{ $ctrl.model.Snapshots[0].RunningContainerCount + $ctrl.model.Snapshots[0].StoppedContainerCount === 1 ? 'container' : 'containers' }}
<span ng-if="$ctrl.model.Snapshots[0].RunningContainerCount > 0 || $ctrl.model.Snapshots[0].StoppedContainerCount > 0">
-
<i class="fa fa-heartbeat green-icon" aria-hidden="true"></i> {{ $ctrl.model.Snapshots[0].RunningContainerCount }}
@ -52,10 +52,10 @@
</span>
</span>
<span style="padding: 0 7px 0 7px;">
<i class="fa fa-cubes space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].VolumeCount }} volumes
<i class="fa fa-cubes space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].VolumeCount }} {{ $ctrl.model.Snapshots[0].VolumeCount === 1 ? 'volume' : 'volumes' }}
</span>
<span style="padding: 0 7px 0 7px;">
<i class="fa fa-clone space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].ImageCount }} images
<i class="fa fa-clone space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].ImageCount }} {{ $ctrl.model.Snapshots[0].ImageCount === 1 ? 'image' : 'images' }}
</span>
</span>
</span>