diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/packages | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/packages')
8 files changed, 27 insertions, 26 deletions
diff --git a/app/assets/javascripts/packages/details/components/package_files.vue b/app/assets/javascripts/packages/details/components/package_files.vue index ab46dd0114d..3add454fda3 100644 --- a/app/assets/javascripts/packages/details/components/package_files.vue +++ b/app/assets/javascripts/packages/details/components/package_files.vue @@ -25,14 +25,14 @@ export default { }, computed: { filesTableRows() { - return this.packageFiles.map(pf => ({ + return this.packageFiles.map((pf) => ({ ...pf, size: this.formatSize(pf.size), pipeline: last(pf.pipelines), })); }, showCommitColumn() { - return this.filesTableRows.some(row => Boolean(row.pipeline?.id)); + return this.filesTableRows.some((row) => Boolean(row.pipeline?.id)); }, filesTableHeaderFields() { return [ @@ -55,7 +55,7 @@ export default { label: __('Created'), class: 'gl-text-right', }, - ].filter(c => !c.hide); + ].filter((c) => !c.hide); }, }, methods: { @@ -90,7 +90,7 @@ export default { </gl-link> </template> - <template #cell(commit)="{item}"> + <template #cell(commit)="{ item }"> <gl-link :href="item.pipeline.project.commit_url" class="gl-text-gray-500" diff --git a/app/assets/javascripts/packages/list/components/packages_list.vue b/app/assets/javascripts/packages/list/components/packages_list.vue index 7067f70a923..1e38ee525b8 100644 --- a/app/assets/javascripts/packages/list/components/packages_list.vue +++ b/app/assets/javascripts/packages/list/components/packages_list.vue @@ -24,10 +24,10 @@ export default { }, computed: { ...mapState({ - perPage: state => state.pagination.perPage, - totalItems: state => state.pagination.total, - page: state => state.pagination.page, - isGroupPage: state => state.config.isGroupPage, + perPage: (state) => state.pagination.perPage, + totalItems: (state) => state.pagination.total, + page: (state) => state.pagination.page, + isGroupPage: (state) => state.config.isGroupPage, isLoading: 'isLoading', }), ...mapGetters({ list: 'getList' }), diff --git a/app/assets/javascripts/packages/list/components/packages_list_app.vue b/app/assets/javascripts/packages/list/components/packages_list_app.vue index cbb3bfd35ac..2a786b92515 100644 --- a/app/assets/javascripts/packages/list/components/packages_list_app.vue +++ b/app/assets/javascripts/packages/list/components/packages_list_app.vue @@ -25,12 +25,12 @@ export default { }, computed: { ...mapState({ - emptyListIllustration: state => state.config.emptyListIllustration, - emptyListHelpUrl: state => state.config.emptyListHelpUrl, - filterQuery: state => state.filterQuery, - selectedType: state => state.selectedType, - packageHelpUrl: state => state.config.packageHelpUrl, - packagesCount: state => state.pagination?.total, + emptyListIllustration: (state) => state.config.emptyListIllustration, + emptyListHelpUrl: (state) => state.config.emptyListHelpUrl, + filterQuery: (state) => state.filterQuery, + selectedType: (state) => state.selectedType, + packageHelpUrl: (state) => state.config.packageHelpUrl, + packagesCount: (state) => state.pagination?.total, }), tabsToRender() { return PACKAGE_REGISTRY_TABS; @@ -110,7 +110,7 @@ export default { <template #description> <gl-sprintf v-if="filterQuery" :message="$options.i18n.widenFilters" /> <gl-sprintf v-else :message="$options.i18n.noResults"> - <template #noPackagesLink="{content}"> + <template #noPackagesLink="{ content }"> <gl-link :href="emptyListHelpUrl" target="_blank">{{ content }}</gl-link> </template> </gl-sprintf> diff --git a/app/assets/javascripts/packages/list/components/packages_sort.vue b/app/assets/javascripts/packages/list/components/packages_sort.vue index 47e51bbdca5..4b2d9091f8f 100644 --- a/app/assets/javascripts/packages/list/components/packages_sort.vue +++ b/app/assets/javascripts/packages/list/components/packages_sort.vue @@ -12,12 +12,12 @@ export default { }, computed: { ...mapState({ - isGroupPage: state => state.config.isGroupPage, - orderBy: state => state.sorting.orderBy, - sort: state => state.sorting.sort, + isGroupPage: (state) => state.config.isGroupPage, + orderBy: (state) => state.sorting.orderBy, + sort: (state) => state.sorting.sort, }), sortText() { - const field = this.sortableFields.find(s => s.orderBy === this.orderBy); + const field = this.sortableFields.find((s) => s.orderBy === this.orderBy); return field ? field.label : ''; }, sortableFields() { diff --git a/app/assets/javascripts/packages/list/stores/getters.js b/app/assets/javascripts/packages/list/stores/getters.js index 0af7e453f19..85c489deda0 100644 --- a/app/assets/javascripts/packages/list/stores/getters.js +++ b/app/assets/javascripts/packages/list/stores/getters.js @@ -1,5 +1,5 @@ import { LIST_KEY_PROJECT } from '../constants'; import { beautifyPath } from '../../shared/utils'; -export default state => - state.packages.map(p => ({ ...p, projectPathName: beautifyPath(p[LIST_KEY_PROJECT]) })); +export default (state) => + state.packages.map((p) => ({ ...p, projectPathName: beautifyPath(p[LIST_KEY_PROJECT]) })); diff --git a/app/assets/javascripts/packages/list/utils.js b/app/assets/javascripts/packages/list/utils.js index 6a300d7bfe6..ee89d3cdefe 100644 --- a/app/assets/javascripts/packages/list/utils.js +++ b/app/assets/javascripts/packages/list/utils.js @@ -1,6 +1,7 @@ import { LIST_KEY_PROJECT, SORT_FIELDS } from './constants'; -export default isGroupPage => SORT_FIELDS.filter(f => f.key !== LIST_KEY_PROJECT || isGroupPage); +export default (isGroupPage) => + SORT_FIELDS.filter((f) => f.key !== LIST_KEY_PROJECT || isGroupPage); /** * A small util function that works out if the delete action has deleted the diff --git a/app/assets/javascripts/packages/shared/components/package_tags.vue b/app/assets/javascripts/packages/shared/components/package_tags.vue index 3d7e233c1ba..5172b855fc3 100644 --- a/app/assets/javascripts/packages/shared/components/package_tags.vue +++ b/app/assets/javascripts/packages/shared/components/package_tags.vue @@ -43,7 +43,7 @@ export default { if (this.moreTagsDisplay) { return this.tags .slice(this.tagDisplayLimit) - .map(x => x.name) + .map((x) => x.name) .join(', '); } diff --git a/app/assets/javascripts/packages/shared/utils.js b/app/assets/javascripts/packages/shared/utils.js index d7a883e4397..677550f77ec 100644 --- a/app/assets/javascripts/packages/shared/utils.js +++ b/app/assets/javascripts/packages/shared/utils.js @@ -1,13 +1,13 @@ import { s__ } from '~/locale'; import { PackageType, TrackingCategories } from './constants'; -export const packageTypeToTrackCategory = type => +export const packageTypeToTrackCategory = (type) => // eslint-disable-next-line @gitlab/require-i18n-strings `UI::${TrackingCategories[type]}`; -export const beautifyPath = path => (path ? path.split('/').join(' / ') : ''); +export const beautifyPath = (path) => (path ? path.split('/').join(' / ') : ''); -export const getPackageTypeLabel = packageType => { +export const getPackageTypeLabel = (packageType) => { switch (packageType) { case PackageType.CONAN: return s__('PackageType|Conan'); |