diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-12 19:21:47 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-12 19:21:47 +0400 |
commit | 7ecebdd02df9b11fa6ba4f8033dcfe097935ed66 (patch) | |
tree | a080ef380992f880b7b29714772152dc3ac71ed5 /app/views/projects/empty.html.haml | |
parent | e2f946fddb7caf9757b33ba3dc7de8634f4ee825 (diff) |
Repository import during project creation often return timeout for medium and large repos.
So lets do it async. First create project, then import repo and create
satellite with Sidekiq
Diffstat (limited to 'app/views/projects/empty.html.haml')
-rw-r--r-- | app/views/projects/empty.html.haml | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 56dbbf0755e..5279ddf47ef 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,33 +1,42 @@ = render 'clone_panel' -%div.git-empty - %fieldset - %legend Git global setup: - %pre.dark - :preserve - git config --global user.name "#{current_user.name}" - git config --global user.email "#{current_user.email}" +- if @project.import? && !@project.imported + .save-project-loader + %center + = image_tag "ajax_loader.gif" + %h3 Importing repository. + %p.monospace git clone --bare #{@project.import_url} + %p Please wait until we import repository for you. Refresh at will. - %fieldset - %legend Create Repository - %pre.dark - :preserve - mkdir #{@project.path} - cd #{@project.path} - git init - touch README - git add README - git commit -m 'first commit' - git remote add origin #{@project.url_to_repo} - git push -u origin master +- else + %div.git-empty + %fieldset + %legend Git global setup: + %pre.dark + :preserve + git config --global user.name "#{current_user.name}" + git config --global user.email "#{current_user.email}" - %fieldset - %legend Existing Git Repo? - %pre.dark - :preserve - cd existing_git_repo - git remote add origin #{@project.url_to_repo} - git push -u origin master + %fieldset + %legend Create Repository + %pre.dark + :preserve + mkdir #{@project.path} + cd #{@project.path} + git init + touch README + git add README + git commit -m 'first commit' + git remote add origin #{@project.url_to_repo} + git push -u origin master + + %fieldset + %legend Existing Git Repo? + %pre.dark + :preserve + cd existing_git_repo + git remote add origin #{@project.url_to_repo} + git push -u origin master - if can? current_user, :remove_project, @project .prepend-top-20 |