2020-06-23 00:09:42 +05:30
< script >
import { GlAlert , GlSprintf , GlLink } from '@gitlab/ui' ;
import ImportProjectsTable from './import_projects_table.vue' ;
export default {
components : {
ImportProjectsTable ,
GlAlert ,
GlSprintf ,
GlLink ,
} ,
2020-10-24 23:57:45 +05:30
inheritAttrs : false ,
2020-06-23 00:09:42 +05:30
props : {
providerTitle : {
type : String ,
required : true ,
} ,
} ,
data ( ) {
return {
isWarningDismissed : false ,
} ;
} ,
computed : {
currentPage ( ) {
return window . location . href ;
} ,
} ,
} ;
< / script >
< template >
2020-10-24 23:57:45 +05:30
< import-projects-table :provider-title = "providerTitle" v-bind = "$attrs" >
2020-06-23 00:09:42 +05:30
< template # actions >
< slot name = "actions" > < / slot >
< / template >
< template # incompatible -repos -warning >
< gl-alert
v - if = "!isWarningDismissed"
variant = "warning"
class = "gl-my-2"
@ dismiss = "isWarningDismissed = true"
>
< gl-sprintf
: message = "
_ _ (
'One or more of your %{provider} projects cannot be imported into GitLab directly because they use Subversion or Mercurial for version control, rather than Git.' ,
)
"
>
< template # provider >
{ { providerTitle } }
< / template >
< / gl-sprintf >
< gl-sprintf
: message = "
_ _ (
'Please convert %{linkStart}them to Git%{linkEnd}, and go through the %{linkToImportFlow} again.' ,
)
"
>
< template # link = "{ content }" >
< gl-link
href = "https://www.atlassian.com/git/tutorials/migrating-overview"
target = "_blank"
> { { content } } < / g l - l i n k
>
< / template >
< template # linkToImportFlow >
< gl-link :href = "currentPage" > { { _ _ ( 'import flow' ) } } < / gl-link >
< / template >
< / gl-sprintf >
< / gl-alert >
< / template >
< / import-projects-table >
< / template >