summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/components/table_registry.vue
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-01-05 00:18:35 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-01-05 00:45:32 +0000
commitcdc49388343c973295e0b1106a658293cd30029e (patch)
tree1722a83b5d3cd2729980f0e8a308df8246053f98 /app/assets/javascripts/registry/components/table_registry.vue
parent318d6f449e26dd3ac05e9556fcd8f427e9388134 (diff)
downloadgitlab-ce-cdc49388343c973295e0b1106a658293cd30029e.tar.gz
[ci skip] Fix more rules
Diffstat (limited to 'app/assets/javascripts/registry/components/table_registry.vue')
-rw-r--r--app/assets/javascripts/registry/components/table_registry.vue148
1 files changed, 75 insertions, 73 deletions
diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue
index 14d43e135fe..bef850eddc0 100644
--- a/app/assets/javascripts/registry/components/table_registry.vue
+++ b/app/assets/javascripts/registry/components/table_registry.vue
@@ -1,8 +1,7 @@
<script>
- /* globals Flash */
import { mapActions } from 'vuex';
import { n__ } from '../../locale';
- import '../../flash';
+ import Flash from '../../flash';
import clipboardButton from '../../vue_shared/components/clipboard_button.vue';
import tablePagination from '../../vue_shared/components/table_pagination.vue';
import tooltip from '../../vue_shared/directives/tooltip';
@@ -11,21 +10,21 @@
import { numberToHumanSize } from '../../lib/utils/number_utils';
export default {
- props: {
- repo: {
- type: Object,
- required: true,
- },
- },
components: {
clipboardButton,
tablePagination,
},
+ directives: {
+ tooltip,
+ },
mixins: [
timeagoMixin,
],
- directives: {
- tooltip,
+ props: {
+ repo: {
+ type: Object,
+ required: true,
+ },
},
computed: {
shouldRenderPagination() {
@@ -68,75 +67,78 @@
};
</script>
<template>
-<div>
- <table class="table tags">
- <thead>
- <tr>
- <th>{{s__('ContainerRegistry|Tag')}}</th>
- <th>{{s__('ContainerRegistry|Tag ID')}}</th>
- <th>{{s__("ContainerRegistry|Size")}}</th>
- <th>{{s__("ContainerRegistry|Created")}}</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr
- v-for="(item, i) in repo.list"
- :key="i">
- <td>
+ <div>
+ <table class="table tags">
+ <thead>
+ <tr>
+ <th>{{ s__('ContainerRegistry|Tag') }}</th>
+ <th>{{ s__('ContainerRegistry|Tag ID') }}</th>
+ <th>{{ s__("ContainerRegistry|Size") }}</th>
+ <th>{{ s__("ContainerRegistry|Created") }}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr
+ v-for="(item, i) in repo.list"
+ :key="i">
+ <td>
- {{item.tag}}
+ {{ item.tag }}
- <clipboard-button
- v-if="item.location"
- :title="item.location"
- :text="clipboardText(item.location)"
+ <clipboard-button
+ v-if="item.location"
+ :title="item.location"
+ :text="clipboardText(item.location)"
/>
- </td>
- <td>
- <span
- v-tooltip
- :title="item.revision"
- data-placement="bottom">
- {{item.shortRevision}}
+ </td>
+ <td>
+ <span
+ v-tooltip
+ :title="item.revision"
+ data-placement="bottom"
+ >
+ {{ item.shortRevision }}
</span>
- </td>
- <td>
- {{formatSize(item.size)}}
- <template v-if="item.size && item.layers">
- &middot;
- </template>
- {{layers(item)}}
- </td>
+ </td>
+ <td>
+ {{ formatSize(item.size) }}
+ <template v-if="item.size && item.layers">
+ &middot;
+ </template>
+ {{ layers(item) }}
+ </td>
- <td>
- {{timeFormated(item.createdAt)}}
- </td>
+ <td>
+ {{ timeFormated(item.createdAt) }}
+ </td>
- <td class="content">
- <button
- v-if="item.canDelete"
- type="button"
- class="js-delete-registry btn btn-danger hidden-xs pull-right"
- :title="s__('ContainerRegistry|Remove tag')"
- :aria-label="s__('ContainerRegistry|Remove tag')"
- data-container="body"
- v-tooltip
- @click="handleDeleteRegistry(item)">
- <i
- class="fa fa-trash"
- aria-hidden="true">
- </i>
- </button>
- </td>
- </tr>
- </tbody>
- </table>
+ <td class="content">
+ <button
+ v-if="item.canDelete"
+ type="button"
+ class="js-delete-registry btn btn-danger hidden-xs pull-right"
+ :title="s__('ContainerRegistry|Remove tag')"
+ :aria-label="s__('ContainerRegistry|Remove tag')"
+ data-container="body"
+ v-tooltip
+ @click="handleDeleteRegistry(item)"
+ >
+ <i
+ class="fa fa-trash"
+ aria-hidden="true"
+ >
+ </i>
+ </button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
- <table-pagination
- v-if="shouldRenderPagination"
- :change="onPageChange"
- :page-info="repo.pagination"
+ <table-pagination
+ v-if="shouldRenderPagination"
+ :change="onPageChange"
+ :page-info="repo.pagination"
/>
-</div>
+ </div>
</template>