diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-26 10:13:10 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-26 10:13:10 +0100 |
commit | c83ed559e107476a4cf9d50fd35874d523506486 (patch) | |
tree | 3565d13bb447ba3b7a9c06e2991543514714de64 /app/views | |
parent | 70affaa0663f8fd4aa1aa08f85e35d312e78fee1 (diff) | |
parent | 9f35f6d9d53638aeb8ee917a388705458ddd87d7 (diff) | |
download | gitlab-ce-c83ed559e107476a4cf9d50fd35874d523506486.tar.gz |
Merge branch 'ide-workbench-bar' into ide-activity-bar-review-mode
Diffstat (limited to 'app/views')
9 files changed, 69 insertions, 49 deletions
diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index ac31977e1a9..4eebb59110a 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -21,7 +21,7 @@ .help-block Manage repository storage paths. Learn more in the = succeed "." do - = link_to "repository storages documentation", help_page_path("administration/repository_storages") + = link_to "repository storages documentation", help_page_path("administration/repository_storage_paths") .sub-section %h4 Circuit breaker .form-group diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index b15fe514a08..a066f9f4cca 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -22,7 +22,7 @@ %hr %p - - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings')) + - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings')) - link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), new_project_cluster_path(@project)) = s_('AutoDevOps|You can automatically build and test your application if you %{link_to_auto_devops_settings} for this project. You can automatically deploy it as well, if you %{link_to_add_kubernetes_cluster}.').html_safe % { link_to_auto_devops_settings: link_to_auto_devops_settings, link_to_add_kubernetes_cluster: link_to_add_kubernetes_cluster } @@ -58,7 +58,9 @@ touch README.md git add README.md git commit -m "add README" - git push -u origin master + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master %fieldset %h5 Existing folder @@ -69,7 +71,9 @@ git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')} git add . git commit -m "Initial commit" - git push -u origin master + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master %fieldset %h5 Existing Git repository @@ -78,8 +82,10 @@ cd existing_repo git remote rename origin old-origin git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')} - git push -u origin --all - git push -u origin --tags + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin --all + git push -u origin --tags - if can? current_user, :remove_project, @project .prepend-top-20 diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml index 9963cc93633..fe1c338b634 100644 --- a/app/views/projects/jobs/index.html.haml +++ b/app/views/projects/jobs/index.html.haml @@ -15,7 +15,7 @@ - unless @repository.gitlab_ci_yml = link_to 'Get started with Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - = link_to ci_lint_path, class: 'btn btn-default' do + = link_to project_ci_lint_path(@project), class: 'btn btn-default' do %span CI lint .content-list.builds-content-list diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 852143ecb2a..218e7338c83 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -26,7 +26,7 @@ %ul - pipeline.yaml_errors.split(",").each do |error| %li= error - You can also test your .gitlab-ci.yml in the #{link_to "Lint", ci_lint_path} + You can also test your .gitlab-ci.yml in the #{link_to "Lint", project_ci_lint_path(@project)} - if pipeline.project.builds_enabled? && !pipeline.ci_yaml_file .bs-callout.bs-callout-warning diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index 2c80f7c3fa3..76f57320f99 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -29,7 +29,7 @@ docker login #{Gitlab.config.registry.host_port} %br %p - - deploy_token = link_to(_('deploy token'), help_page_path('user/projects/deploy_tokens/index', anchor: 'read-container-registry-images'), target: '_blank') + - deploy_token = link_to(_('deploy token'), help_page_path('user/project/deploy_tokens/index', anchor: 'read-container-registry-images'), target: '_blank') = s_('ContainerRegistry|You can also %{deploy_token} for read-only access to the registry images.').html_safe % { deploy_token: deploy_token } %br %p diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml new file mode 100644 index 00000000000..7b410101c05 --- /dev/null +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -0,0 +1,40 @@ +.row.prepend-top-default + .col-lg-12 + = form_for @project, url: project_settings_ci_cd_path(@project) do |f| + = form_errors(@project) + %fieldset.builds-feature + .form-group + - message = auto_devops_warning_message(@project) + - ci_file_formatted = '<code>.gitlab-ci.yml</code>'.html_safe + - if message + %p.settings-message.text-center + = message.html_safe + = f.fields_for :auto_devops_attributes, @auto_devops do |form| + .radio + = form.label :enabled_true do + = form.radio_button :enabled, 'true' + %strong= s_('CICD|Enable Auto DevOps') + %br + = s_('CICD|The Auto DevOps pipeline configuration will be used when there is no %{ci_file} in the project.').html_safe % { ci_file: ci_file_formatted } + + .radio + = form.label :enabled_false do + = form.radio_button :enabled, 'false' + %strong= s_('CICD|Disable Auto DevOps') + %br + = s_('CICD|An explicit %{ci_file} needs to be specified before you can begin using Continuous Integration and Delivery.').html_safe % { ci_file: ci_file_formatted } + + .radio + = form.label :enabled_ do + = form.radio_button :enabled, '' + %strong= s_('CICD|Instance default (%{state})') % { state: "#{Gitlab::CurrentSettings.auto_devops_enabled? ? _('enabled') : _('disabled')}" } + %br + = s_('CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.').html_safe % { ci_file: ci_file_formatted } + + = form.label :domain, class:"prepend-top-10" do + = _('Domain') + = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' + .help-block + = s_('CICD|You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages.') + + = f.submit 'Save changes', class: "btn btn-success prepend-top-15" diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 20868f9ba5d..80c226ad273 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -3,44 +3,6 @@ = form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_errors(@project) %fieldset.builds-feature - .form-group - %h5 Auto DevOps (Beta) - %p - Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration. - = link_to 'Learn more about Auto DevOps', help_page_path('topics/autodevops/index.md') - - message = auto_devops_warning_message(@project) - - if message - %p.settings-message.text-center - = message.html_safe - = f.fields_for :auto_devops_attributes, @auto_devops do |form| - .radio - = form.label :enabled_true do - = form.radio_button :enabled, 'true' - %strong Enable Auto DevOps - %br - %span.descr - The Auto DevOps pipeline configuration will be used when there is no <code>.gitlab-ci.yml</code> in the project. - - .radio - = form.label :enabled_false do - = form.radio_button :enabled, 'false' - %strong Disable Auto DevOps - %br - %span.descr - An explicit <code>.gitlab-ci.yml</code> needs to be specified before you can begin using Continuous Integration and Delivery. - - .radio - = form.label :enabled_ do - = form.radio_button :enabled, '' - %strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'}) - %br - %span.descr - Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific <code>.gitlab-ci.yml</code>. - %p - You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages. - = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' - - %hr .form-group.append-bottom-default.js-secret-runner-token = f.label :runners_token, "Runner token", class: 'label-light' .form-control.js-secret-value-placeholder diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 09268c9943b..5f596a019f7 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -12,10 +12,22 @@ %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - Update your CI/CD configuration, like job timeout or Auto DevOps. + Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report. .settings-content = render 'form' +%section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) } + .settings-header + %h4 + = s_('CICD|Auto DevOps (Beta)') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = s_('CICD|Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration.') + = link_to s_('CICD|Learn more about Auto DevOps'), help_page_path('topics/autodevops/index.md') + .settings-content + = render 'autodevops_form' + %section.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 diff --git a/app/views/shared/_auto_devops_callout.html.haml b/app/views/shared/_auto_devops_callout.html.haml index e9ac192f5f7..d3fa324e460 100644 --- a/app/views/shared/_auto_devops_callout.html.haml +++ b/app/views/shared/_auto_devops_callout.html.haml @@ -9,7 +9,7 @@ - link = link_to(s_('AutoDevOps|Auto DevOps documentation'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer') = s_('AutoDevOps|Learn more in the %{link_to_documentation}').html_safe % { link_to_documentation: link } .banner-buttons - = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings'), class: 'btn js-close-callout' + = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings'), class: 'btn js-close-callout' %button.btn-transparent.banner-close.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Auto DevOps box' } |