diff options
author | Luke Bennett <lbennett@gitlab.com> | 2018-11-07 16:44:21 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-02-13 00:17:52 +0000 |
commit | af989df0ec0c15f269071080ab08417e688dabf7 (patch) | |
tree | 53096af07d17412dc38b70327e69433b965504dd /app/assets/javascripts/import_projects/components/imported_project_table_row.vue | |
parent | 534a61179e2d0d7f9f376af1d01ed536e27f5b6d (diff) | |
download | gitlab-ce-af989df0ec0c15f269071080ab08417e688dabf7.tar.gz |
Improve the GitHub and Gitea import feature table interfaceimport-go-to-project-cta-nibble-frontend
These are frontend changes.
Use Vue for the import feature UI for "githubish"
providers (GitHub and Gitea).
Add "Go to project" button after a successful import.
Use CI-style status icons and improve spacing of the
table and its component.
Adds ETag polling to the github and gitea import
jobs endpoint.
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.vue | 55 |
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> |