diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-27 15:11:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-27 15:11:21 +0300 |
commit | 5471fef2360f9bcf604a026d5807a554dae243e9 (patch) | |
tree | 8b9c82036dc5da7fdf30ba3c2c5f85997ad41eaa /app/assets/javascripts | |
parent | b6f32e82a08a171debbb57236e8995b8d741e6a5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/pages/import/bulk_imports/history/components/bulk_imports_history_app.vue | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/app/assets/javascripts/pages/import/bulk_imports/history/components/bulk_imports_history_app.vue b/app/assets/javascripts/pages/import/bulk_imports/history/components/bulk_imports_history_app.vue index 7f376cde680..459546a5562 100644 --- a/app/assets/javascripts/pages/import/bulk_imports/history/components/bulk_imports_history_app.vue +++ b/app/assets/javascripts/pages/import/bulk_imports/history/components/bulk_imports_history_app.vue @@ -168,13 +168,22 @@ export default { } }, - getFullDestinationUrl(params) { + destinationLinkHref(params) { return joinPaths(gon.relative_url_root || '', '/', params.destination_full_path); }, - getPresentationUrl(item) { + pathWithSuffix(path, item) { const suffix = item.entity_type === WORKSPACE_GROUP ? '/' : ''; - return `${item.destination_full_path}${suffix}`; + return `${path}${suffix}`; + }, + + destinationLinkText(item) { + return this.pathWithSuffix(item.destination_full_path, item); + }, + + destinationText(item) { + const fullPath = joinPaths(item.destination_namespace, item.destination_slug); + return this.pathWithSuffix(fullPath, item); }, getEntityTooltip(item) { @@ -223,19 +232,21 @@ export default { class="gl-w-full" > <template #cell(destination_name)="{ item }"> - <template v-if="item.destination_full_path"> - <gl-icon - v-gl-tooltip - :name="item.entity_type" - :title="getEntityTooltip(item)" - :aria-label="getEntityTooltip(item)" - class="gl-text-gray-500" - /> - <gl-link :href="getFullDestinationUrl(item)" target="_blank"> - {{ getPresentationUrl(item) }} - </gl-link> - </template> - <gl-loading-icon v-else inline /> + <gl-icon + v-gl-tooltip + :name="item.entity_type" + :title="getEntityTooltip(item)" + :aria-label="getEntityTooltip(item)" + class="gl-text-gray-500" + /> + <gl-link + v-if="item.destination_full_path" + :href="destinationLinkHref(item)" + target="_blank" + > + {{ destinationLinkText(item) }} + </gl-link> + <span v-else>{{ destinationText(item) }}</span> </template> <template #cell(created_at)="{ value }"> <time-ago :time="value" /> |