summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/import_projects/components/imported_project_table_row.vue
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-14 09:48:54 +0000
committerPhil Hughes <me@iamphill.com>2019-02-14 09:48:54 +0000
commita4bb4fbf8f8dce953d05b3916553d0a2fb984bba (patch)
tree53096af07d17412dc38b70327e69433b965504dd /app/assets/javascripts/import_projects/components/imported_project_table_row.vue
parent534a61179e2d0d7f9f376af1d01ed536e27f5b6d (diff)
parentaf989df0ec0c15f269071080ab08417e688dabf7 (diff)
downloadgitlab-ce-import-go-to-project-cta-nibble-backend.tar.gz
Merge branch 'import-go-to-project-cta-nibble-frontend' into 'import-go-to-project-cta-nibble-backend'import-go-to-project-cta-nibble-backend
FE Improve the GitHub and Gitea import feature table interface See merge request gitlab-org/gitlab-ce!24608
Diffstat (limited to 'app/assets/javascripts/import_projects/components/imported_project_table_row.vue')
-rw-r--r--app/assets/javascripts/import_projects/components/imported_project_table_row.vue55
1 files changed, 55 insertions, 0 deletions
diff --git a/app/assets/javascripts/import_projects/components/imported_project_table_row.vue b/app/assets/javascripts/import_projects/components/imported_project_table_row.vue
new file mode 100644
index 00000000000..ab2bd87ee9f
--- /dev/null
+++ b/app/assets/javascripts/import_projects/components/imported_project_table_row.vue
@@ -0,0 +1,55 @@
+<script>
+import ImportStatus from './import_status.vue';
+import { STATUSES } from '../constants';
+
+export default {
+ name: 'ImportedProjectTableRow',
+ components: {
+ ImportStatus,
+ },
+ props: {
+ project: {
+ type: Object,
+ required: true,
+ },
+ },
+
+ computed: {
+ displayFullPath() {
+ return this.project.fullPath.replace(/^\//, '');
+ },
+
+ isFinished() {
+ return this.project.importStatus === STATUSES.FINISHED;
+ },
+ },
+};
+</script>
+
+<template>
+ <tr class="js-imported-project import-row">
+ <td>
+ <a
+ :href="project.providerLink"
+ rel="noreferrer noopener"
+ target="_blank"
+ class="js-provider-link"
+ >
+ {{ project.importSource }}
+ </a>
+ </td>
+ <td class="js-full-path">{{ displayFullPath }}</td>
+ <td><import-status :status="project.importStatus" /></td>
+ <td>
+ <a
+ v-if="isFinished"
+ class="btn btn-default js-go-to-project"
+ :href="project.fullPath"
+ rel="noreferrer noopener"
+ target="_blank"
+ >
+ {{ __('Go to project') }}
+ </a>
+ </td>
+ </tr>
+</template>