Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2018-11-07 19:44:21 +0300
committerLuke Bennett <lbennett@gitlab.com>2019-02-13 03:15:57 +0300
commit534a61179e2d0d7f9f376af1d01ed536e27f5b6d (patch)
treea06cb82e175bd87c6e42edd83f606666022edf4e /app/helpers/import_helper.rb
parentbc881b8455c0059acfd8c1dc5dd3bf6c329ae53c (diff)
Improve the GitHub and Gitea import feature table interface
These are backend 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/helpers/import_helper.rb')
-rw-r--r--app/helpers/import_helper.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/app/helpers/import_helper.rb b/app/helpers/import_helper.rb
index d3befd87ccc..2306963347e 100644
--- a/app/helpers/import_helper.rb
+++ b/app/helpers/import_helper.rb
@@ -18,10 +18,8 @@ module ImportHelper
"#{namespace}/#{name}"
end
- def provider_project_link(provider, full_path)
- url = __send__("#{provider}_project_url", full_path) # rubocop:disable GitlabSecurity/PublicSend
-
- link_to full_path, url, target: '_blank', rel: 'noopener noreferrer'
+ def provider_project_link_url(provider_url, full_path)
+ Gitlab::Utils.append_path(provider_url, full_path)
end
def import_will_timeout_message(_ci_cd_only)
@@ -81,22 +79,4 @@ module ImportHelper
def import_all_githubish_repositories_button_label
_('Import all repositories')
end
-
- private
-
- def github_project_url(full_path)
- Gitlab::Utils.append_path(github_root_url, full_path)
- end
-
- def github_root_url
- strong_memoize(:github_url) do
- provider = Gitlab::Auth::OAuth::Provider.config_for('github')
-
- provider&.dig('url').presence || 'https://github.com'
- end
- end
-
- def gitea_project_url(full_path)
- Gitlab::Utils.append_path(@gitea_host_url, full_path)
- end
end