Skip to content
Snippets Groups Projects

Resolve "GitLab Migration - History page inconsistencies"

Merged Illya Klymov requested to merge 383759-gitlab-migration-history-page-inconsistencies into master
Files
2
<script>
import { GlButton, GlEmptyState, GlIcon, GlLink, GlLoadingIcon, GlTableLite } from '@gitlab/ui';
import {
GlButton,
GlEmptyState,
GlIcon,
GlLink,
GlLoadingIcon,
GlTableLite,
GlTooltipDirective as GlTooltip,
} from '@gitlab/ui';
import { s__, __ } from '~/locale';
import { createAlert } from '~/flash';
@@ -44,6 +52,10 @@ export default {
LocalStorageSync,
},
directives: {
GlTooltip,
},
data() {
return {
loading: true,
@@ -119,8 +131,19 @@ export default {
},
getPresentationUrl(item) {
const prefix = item.entity_type === 'group' ? '/' : '';
return `${prefix}${item.destination_full_path}`;
const suffix = item.entity_type === 'group' ? '/' : '';
return `${item.destination_full_path}${suffix}`;
},
getEntityTooltip(item) {
switch (item.entity_type) {
case 'project':
return __('Project');
case 'group':
return __('Group');
default:
return '';
}
},
},
@@ -153,7 +176,13 @@ export default {
class="gl-w-full"
>
<template #cell(destination_name)="{ item }">
<gl-icon :name="item.entity_type" />
<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>
Loading