Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
db7921f2
Commit
db7921f2
authored
Feb 06, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "Import all projects" button to GitHub and GitLab import pages.
Closes #1963.
parent
bc57ff0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
app/assets/javascripts/importer_status.js.coffee
app/assets/javascripts/importer_status.js.coffee
+5
-1
app/views/import/github/status.html.haml
app/views/import/github/status.html.haml
+5
-3
app/views/import/gitlab/status.html.haml
app/views/import/gitlab/status.html.haml
+7
-5
No files found.
app/assets/javascripts/importer_status.js.coffee
View file @
db7921f2
...
...
@@ -4,7 +4,7 @@ class @ImporterStatus
this
.
setAutoUpdate
()
initStatusPage
:
->
$
(
".
btn
-add-to-import"
).
click
(
event
)
=>
$
(
".
js
-add-to-import"
).
click
(
event
)
=>
new_namespace
=
null
tr
=
$
(
event
.
currentTarget
).
closest
(
"tr"
)
id
=
tr
.
attr
(
"id"
).
replace
(
"repo_"
,
""
)
...
...
@@ -12,6 +12,10 @@ class @ImporterStatus
new_namespace
=
tr
.
find
(
".import-target input"
).
prop
(
"value"
)
tr
.
find
(
".import-target"
).
empty
().
append
(
new_namespace
+
"/"
+
tr
.
find
(
".import-target"
).
data
(
"project_name"
))
$
.
post
@
import_url
,
{
repo_id
:
id
,
new_namespace
:
new_namespace
},
dataType
:
'script'
$
(
".js-import-all"
).
click
(
event
)
=>
$
(
".js-add-to-import"
).
each
->
$
(
this
).
click
()
setAutoUpdate
:
->
setInterval
(
=>
...
...
app/views/import/github/status.html.haml
View file @
db7921f2
...
...
@@ -3,9 +3,11 @@
Import repositories from GitHub.com
%p
.light
Select projects you want to import.
Select projects you want to import.
%hr
%p
=
button_tag
'Import all projects'
,
class:
"btn btn-success js-import-all"
%table
.table.import-jobs
%thead
%tr
...
...
@@ -32,7 +34,7 @@
%td
.import-target
=
repo
.
full_name
%td
.import-actions.job-status
=
button_tag
"
Add"
,
class:
"btn btn
-add-to-import"
=
button_tag
"
Import"
,
class:
"btn js
-add-to-import"
:coffeescript
$ ->
...
...
app/views/import/gitlab/status.html.haml
View file @
db7921f2
...
...
@@ -3,9 +3,11 @@
Import repositories from GitLab.com
%p
.light
Select projects you want to import.
Select projects you want to import.
%hr
%p
=
button_tag
'Import all projects'
,
class:
"btn btn-success js-import-all"
%table
.table.import-jobs
%thead
%tr
...
...
@@ -32,8 +34,8 @@
%td
.import-target
=
repo
[
"path_with_namespace"
]
%td
.import-actions.job-status
=
button_tag
"
Add"
,
class:
"btn btn
-add-to-import"
=
button_tag
"
Import"
,
class:
"btn js
-add-to-import"
:coffeescript
$ ->
new ImporterStatus("
#{
jobs_import_gitlab_path
}
", "
#{
import_gitlab_
url
}
")
$ ->
new ImporterStatus("
#{
jobs_import_gitlab_path
}
", "
#{
import_gitlab_
path
}
")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment