diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-11-13 19:51:14 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-11-13 19:51:14 +0000 |
commit | 476b28a1a28cfbd692c1ccd06f69097cc553e2ef (patch) | |
tree | 1d8b51e2123fafe52af063bc7b800b072be04f64 /app/assets/javascripts/registry/components | |
parent | c8d594e04e2d12a1c0d68ed80998f0b42f0fc8c5 (diff) | |
download | gitlab-ce-476b28a1a28cfbd692c1ccd06f69097cc553e2ef.tar.gz |
Formats bytes to human reabale number in registry table40092-fix-cluster-size
Diffstat (limited to 'app/assets/javascripts/registry/components')
-rw-r--r-- | app/assets/javascripts/registry/components/table_registry.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue index e917279947e..14d43e135fe 100644 --- a/app/assets/javascripts/registry/components/table_registry.vue +++ b/app/assets/javascripts/registry/components/table_registry.vue @@ -8,6 +8,7 @@ import tooltip from '../../vue_shared/directives/tooltip'; import timeagoMixin from '../../vue_shared/mixins/timeago'; import { errorMessages, errorMessagesTypes } from '../constants'; + import { numberToHumanSize } from '../../lib/utils/number_utils'; export default { props: { @@ -41,6 +42,10 @@ return item.layers ? n__('%d layer', '%d layers', item.layers) : ''; }, + formatSize(size) { + return numberToHumanSize(size); + }, + handleDeleteRegistry(registry) { this.deleteRegistry(registry) .then(() => this.fetchList({ repo: this.repo })) @@ -97,7 +102,7 @@ </span> </td> <td> - {{item.size}} + {{formatSize(item.size)}} <template v-if="item.size && item.layers"> · </template> |