Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/import_entities/import_groups/components/import_source_cell.vue')
-rw-r--r--app/assets/javascripts/import_entities/import_groups/components/import_source_cell.vue53
1 files changed, 53 insertions, 0 deletions
diff --git a/app/assets/javascripts/import_entities/import_groups/components/import_source_cell.vue b/app/assets/javascripts/import_entities/import_groups/components/import_source_cell.vue
new file mode 100644
index 00000000000..2de9bd4f868
--- /dev/null
+++ b/app/assets/javascripts/import_entities/import_groups/components/import_source_cell.vue
@@ -0,0 +1,53 @@
+<script>
+import { GlLink, GlSprintf, GlIcon } from '@gitlab/ui';
+import { joinPaths } from '~/lib/utils/url_utility';
+import { isFinished } from '../utils';
+
+export default {
+ components: {
+ GlLink,
+ GlSprintf,
+ GlIcon,
+ },
+ props: {
+ group: {
+ type: Object,
+ required: true,
+ },
+ },
+ computed: {
+ fullLastImportPath() {
+ return this.group.last_import_target
+ ? `${this.group.last_import_target.target_namespace}/${this.group.last_import_target.new_name}`
+ : null;
+ },
+ absoluteLastImportPath() {
+ return joinPaths(gon.relative_url_root || '/', this.fullLastImportPath);
+ },
+ isFinished() {
+ return isFinished(this.group);
+ },
+ },
+};
+</script>
+
+<template>
+ <div>
+ <gl-link
+ :href="group.web_url"
+ target="_blank"
+ class="gl-display-inline-flex gl-align-items-center gl-h-7"
+ >
+ {{ group.full_path }} <gl-icon name="external-link" />
+ </gl-link>
+ <div v-if="isFinished && fullLastImportPath" class="gl-font-sm">
+ <gl-sprintf :message="s__('BulkImport|Last imported to %{link}')">
+ <template #link>
+ <gl-link :href="absoluteLastImportPath" class="gl-font-sm" target="_blank">{{
+ fullLastImportPath
+ }}</gl-link>
+ </template>
+ </gl-sprintf>
+ </div>
+ </div>
+</template>