BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1e37e892
Commit
1e37e892
authored
Jan 13, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve github import page UI
parent
4d03a280
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
19 deletions
+23
-19
github_imports_controller.rb
app/controllers/github_imports_controller.rb
+0
-0
create.js.haml
app/views/github_imports/create.js.haml
+1
-4
status.html.haml
app/views/github_imports/status.html.haml
+19
-12
client.rb
lib/gitlab/github/client.rb
+3
-3
No files found.
app/controllers/github_imports_controller.rb
View file @
1e37e892
app/views/github_imports/create.js.haml
View file @
1e37e892
...
...
@@ -13,6 +13,4 @@
-
else
:plain
$("table.import-jobs tbody").prepend($("tr#repo_
#{
@repo_id
}
"))
$("tr#repo_
#{
@repo_id
}
").addClass("active").find(".import-actions").text("started")
\ No newline at end of file
$("tr#repo_
#{
@repo_id
}
").addClass("active").find(".import-actions").html("<i class='fa fa-spinner fa-spin'></i> started")
app/views/github_imports/status.html.haml
View file @
1e37e892
%h3
.page-title
Import repositories from github
%i
.fa.fa-github
Import repositories from GitHub.com
%hr
%h4
%p
.light
Select projects you want to import.
%span
.pull-right
Reload to see the progress.
%table
.table.table-bordered.import-jobs
%hr
%table
.table.import-jobs
%thead
%tr
%th
From GitHub
%th
To GitLab
%th
Status
%tbody
-
@already_added_projects
.
each
do
|
repo
|
%tr
{
id:
"repo_#{repo.id}"
,
class:
"#{project_status_css_class(repo.import_status)}"
}
%td
=
repo
.
import_source
%td
=
repo
.
name_with_namespace
%td
=
repo
.
human_import_status_name
-
@already_added_projects
.
each
do
|
project
|
%tr
{
id:
"repo_#{project.id}"
,
class:
"#{project_status_css_class(project.import_status)}"
}
%td
=
project
.
import_source
%td
%strong
=
link_to
project
.
name_with_namespace
,
project
%td
-
if
project
.
import_status
==
'finished'
%span
.cgreen
%i
.fa.fa-check
done
-
else
=
project
.
human_import_status_name
-
@repos
.
each
do
|
repo
|
%tr
{
id:
"repo_#{repo.id}"
}
...
...
@@ -36,6 +46,3 @@
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 "
#{
github_import_url
}
", {repo_id: id, new_namespace: new_namespace}, dataType: 'script'
lib/gitlab/github/client.rb
View file @
1e37e892
...
...
@@ -19,9 +19,9 @@ module Gitlab
def
github_options
{
:site
=>
'https://api.github.com'
,
:authorize_url
=>
'https://github.com/login/oauth/authorize'
,
:token_url
=>
'https://github.com/login/oauth/access_token'
site:
'https://api.github.com'
,
authorize_url:
'https://github.com/login/oauth/authorize'
,
token_url:
'https://github.com/login/oauth/access_token'
}
end
end
...
...
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