diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-09 14:59:07 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 12:22:57 +0300 |
commit | 6743147b7d9f310fbf5afa520e19ae495fd4df33 (patch) | |
tree | 2ac26c5fd33ea635462d73b8925915dff8486694 /app/views | |
parent | e02efff63d2b065f95e4eeac28ba994d245e4505 (diff) | |
download | gitlab-ce-6743147b7d9f310fbf5afa520e19ae495fd4df33.tar.gz |
Improve manifest feature after backend review
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/import/_githubish_status.html.haml | 20 | ||||
-rw-r--r-- | app/views/import/_project_status.html.haml | 11 | ||||
-rw-r--r-- | app/views/import/manifest/_form.html.haml | 15 | ||||
-rw-r--r-- | app/views/import/manifest/status.html.haml | 19 |
4 files changed, 28 insertions, 37 deletions
diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml index 5e7be5cd37b..0f641352e99 100644 --- a/app/views/import/_githubish_status.html.haml +++ b/app/views/import/_githubish_status.html.haml @@ -21,23 +21,13 @@ %th= _('Status') %tbody - @already_added_projects.each do |project| - %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } + %tr{ id: "project_#{project.id}", class: project_status_css_class(project.import_status) } %td = provider_project_link(provider, project.import_source) %td = link_to project.full_path, [project.namespace.becomes(Namespace), project] %td.job-status - - if project.import_status == 'finished' - %span - %i.fa.fa-check - = _('Done') - - elsif project.import_status == 'started' - %i.fa.fa-spinner.fa-spin - = _('Started') - - elsif project.import_status == 'failed' - = _('Failed') - - else - = project.human_import_status_name + = render 'import/project_status', project: project - @repos.each do |repo| %tr{ id: "repo_#{repo.id}", data: { qa: { repo_path: repo.full_name } } } @@ -61,6 +51,6 @@ = has_ci_cd_only_params? ? _('Connect') : _('Import') = icon("spinner spin", class: "loading-icon") -.js-importer-status{ data: { jobs_import_path: "#{url_for([:jobs, :import, provider])}", - import_path: "#{url_for([:import, provider])}", - ci_cd_only: "#{has_ci_cd_only_params?}" } } +.js-importer-status{ data: { jobs_import_path: url_for([:jobs, :import, provider]), + import_path: url_for([:import, provider]), + ci_cd_only: has_ci_cd_only_params? } } diff --git a/app/views/import/_project_status.html.haml b/app/views/import/_project_status.html.haml new file mode 100644 index 00000000000..280bcbc1e63 --- /dev/null +++ b/app/views/import/_project_status.html.haml @@ -0,0 +1,11 @@ +- case project.import_status +- when 'finished' + = icon('check') + = _('Done') +- when 'started' + = icon("spinner spin") + = _('Started') +- when 'failed' + = _('Failed') +- else + = project.human_import_status_name diff --git a/app/views/import/manifest/_form.html.haml b/app/views/import/manifest/_form.html.haml index 6c938255e65..763beb5958f 100644 --- a/app/views/import/manifest/_form.html.haml +++ b/app/views/import/manifest/_form.html.haml @@ -1,12 +1,5 @@ = form_tag upload_import_manifest_path, multipart: true do .form-group - = label_tag :manifest, class: 'label-light' do - = _('Manifest') - = file_field_tag :manifest, class: 'form-control-file', required: true - .form-text.text-muted - = _('Import multiple repositories by uploading a manifest file.') - - .form-group = label_tag :group_id, nil, class: 'label-light' do = _('Group') .input-group @@ -17,6 +10,14 @@ .form-text.text-muted = _('Choose the top-level group for your repository imports.') + .form-group + = label_tag :manifest, class: 'label-light' do + = _('Manifest') + = file_field_tag :manifest, class: 'form-control-file', required: true + .form-text.text-muted + = _('Import multiple repositories by uploading a manifest file.') + = link_to icon('question-circle'), help_page_path('user/project/import/manifest') + .append-bottom-10 = submit_tag _('List available repositories'), class: 'btn btn-success' = link_to _('Cancel'), new_project_path, class: 'btn btn-cancel' diff --git a/app/views/import/manifest/status.html.haml b/app/views/import/manifest/status.html.haml index c8065d90103..5b2e1005398 100644 --- a/app/views/import/manifest/status.html.haml +++ b/app/views/import/manifest/status.html.haml @@ -19,23 +19,13 @@ %th= _('Status') %tbody - @already_added_projects.each do |project| - %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } + %tr{ id: "project_#{project.id}", class: project_status_css_class(project.import_status) } %td = project.import_url %td = link_to_project project %td.job-status - - if project.import_status == 'finished' - %span - = icon('check') - = _('Done') - - elsif project.import_status == 'started' - = icon("spinner spin") - = _('Started') - - elsif project.import_status == 'failed' - = _('Failed') - - else - = project.human_import_status_name + = render 'import/project_status', project: project - @pending_repositories.each do |repository| %tr{ id: "repo_#{repository[:id]}" } @@ -48,6 +38,5 @@ = _('Import') = icon("spinner spin", class: "loading-icon") -.js-importer-status{ data: { jobs_import_path: "#{url_for([:jobs, :import, provider])}", - import_path: "#{url_for([:import, provider])}", - ci_cd_only: "#{has_ci_cd_only_params?}" } } +.js-importer-status{ data: { jobs_import_path: url_for([:jobs, :import, provider]), + import_path: url_for([:import, provider]) } } |