diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-24 00:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-24 00:08:58 +0300 |
commit | 78f935d56652eee385683bf7a55c3b9a86a63a0e (patch) | |
tree | 237af4537bdfad4371db92902dbf1f200cb12b63 | |
parent | f986ce9ffa56e25d0a3010c78d9481664742d766 (diff) |
Add latest changes from gitlab-org/gitlab@master
14 files changed, 81 insertions, 52 deletions
diff --git a/app/assets/javascripts/alerts_settings/index.js b/app/assets/javascripts/alerts_settings/index.js index 321af9fedb6..e830f53a55e 100644 --- a/app/assets/javascripts/alerts_settings/index.js +++ b/app/assets/javascripts/alerts_settings/index.js @@ -3,12 +3,15 @@ import Vue from 'vue'; import { parseBoolean } from '~/lib/utils/common_utils'; import AlertSettingsWrapper from './components/alerts_settings_wrapper.vue'; import apolloProvider from './graphql'; +import getCurrentIntegrationQuery from './graphql/queries/get_current_integration.query.graphql'; -apolloProvider.clients.defaultClient.cache.writeData({ +apolloProvider.clients.defaultClient.cache.writeQuery({ + query: getCurrentIntegrationQuery, data: { currentIntegration: null, }, }); + Vue.use(GlToast); export default (el) => { diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index ea24f469ffa..1b00f583b55 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -25,6 +25,7 @@ module ButtonHelper button_text = data[:button_text] || '' hide_tooltip = data[:hide_tooltip] || false hide_button_icon = data[:hide_button_icon] || false + item_prop = data[:itemprop] || nil # This supports code in app/assets/javascripts/copy_to_clipboard.js that # works around ClipboardJS limitations to allow the context-specific copy/pasting of plain text or GFM. @@ -49,7 +50,8 @@ module ButtonHelper data: data, type: :button, title: title, - aria: { label: title } + aria: { label: title }, + itemprop: item_prop } content_tag :button, button_attributes do diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index f5eea9aa9c6..a2d24feaeec 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -17,8 +17,9 @@ = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project .home-panel-metadata.d-flex.flex-wrap.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal - if can?(current_user, :read_project, @project) - %span.text-secondary{ itemprop: 'identifier', data: { qa_selector: 'project_id_content' } } - = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } + - button_class = "btn-clipboard btn-transparent btn-no-padding gl-font-base gl-font-weight-normal gl-line-height-normal home-panel-metadata" + - button_text = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } + = clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id, hide_button_icon: true, button_text: button_text, class: button_class, qa_selector: 'project_id_content', itemprop: 'identifier') - if current_user %span.access-request-links.gl-ml-3 = render 'shared/members/access_request_links', source: @project diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index 810f3752563..d7668dd1c91 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -9,8 +9,8 @@ - else = edit_blob_button(@project, @ref, @path, blob: blob) = ide_edit_button(@project, @ref, @path, blob: blob) - - if can_view_pipeline_editor?(@project) && @path == @project.ci_config_path_or_default - = link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project), class: "btn gl-button btn-confirm-secondary gl-ml-3" + - if can_view_pipeline_editor?(@project) && @path == @project.ci_config_path_or_default + = link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project), class: "btn gl-button btn-confirm-secondary gl-ml-3" .btn-group{ role: "group", class: ("gl-ml-3" if current_user) }> = render_if_exists 'projects/blob/header_file_locks_link' - if current_user diff --git a/app/views/shared/web_hooks/_hook.html.haml b/app/views/shared/web_hooks/_hook.html.haml index 5437748a57e..abe23d0be78 100644 --- a/app/views/shared/web_hooks/_hook.html.haml +++ b/app/views/shared/web_hooks/_hook.html.haml @@ -11,6 +11,6 @@ = hook.enable_ssl_verification ? _('enabled') : _('disabled') .col-md-4.col-lg-5.text-right-md.gl-mt-2 - %span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm gl-mr-3' - %span>= link_to _('Edit'), edit_hook_path(hook), class: 'gl-button btn btn-sm gl-mr-3' - = link_to _('Delete'), destroy_hook_path(hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'gl-button btn btn-sm' + %span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm btn-default gl-mr-3' + %span>= link_to _('Edit'), edit_hook_path(hook), class: 'btn gl-button btn-default btn-sm gl-mr-3' + = link_to _('Delete'), destroy_hook_path(hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn gl-button btn-default btn-sm' diff --git a/app/views/shared/web_hooks/_test_button.html.haml b/app/views/shared/web_hooks/_test_button.html.haml index a683f75c779..3ffa45f01be 100644 --- a/app/views/shared/web_hooks/_test_button.html.haml +++ b/app/views/shared/web_hooks/_test_button.html.haml @@ -2,11 +2,12 @@ - hook = local_assigns.fetch(:hook) - triggers = hook.class.triggers -.hook-test-button.dropdown.inline> +.hook-test-button.dropdown.gl-new-dropdown.inline> %button.btn.gl-button{ 'data-toggle' => 'dropdown', class: button_class } = _('Test') = sprite_icon('chevron-down') %ul.dropdown-menu.dropdown-menu-right{ role: 'menu' } - - triggers.each_value do |event| - %li - = link_to_test_hook(hook, event) + .gl-new-dropdown-inner + - triggers.each_value do |event| + %li.gl-new-dropdown-item + = link_to_test_hook(hook, event) diff --git a/changelogs/unreleased/255288-add-a-click-to-copy-link-against-the-project-ID.yml b/changelogs/unreleased/255288-add-a-click-to-copy-link-against-the-project-ID.yml new file mode 100644 index 00000000000..70c0b51b907 --- /dev/null +++ b/changelogs/unreleased/255288-add-a-click-to-copy-link-against-the-project-ID.yml @@ -0,0 +1,5 @@ +--- +title: "Add click to copy button over project ID" +merge_request: 53224 +author: Virgile MATHIEU @vmathieu +type: added diff --git a/changelogs/unreleased/f_caplette-move-pipeline-editor-button-repo.yml b/changelogs/unreleased/f_caplette-move-pipeline-editor-button-repo.yml new file mode 100644 index 00000000000..7dae553a119 --- /dev/null +++ b/changelogs/unreleased/f_caplette-move-pipeline-editor-button-repo.yml @@ -0,0 +1,5 @@ +--- +title: Move Pipeline Editor repo link outside of feature flag conditional +merge_request: 57144 +author: +type: changed diff --git a/changelogs/unreleased/yo-btn-default-whooks.yml b/changelogs/unreleased/yo-btn-default-whooks.yml new file mode 100644 index 00000000000..758c0e30d67 --- /dev/null +++ b/changelogs/unreleased/yo-btn-default-whooks.yml @@ -0,0 +1,5 @@ +--- +title: Apply new GitLab UI buttons in the webhooks list +merge_request: 51977 +author: Yogi (@yo) +type: other diff --git a/config/feature_flags/development/ci_runner_builds_queue_on_replicas.yml b/config/feature_flags/development/ci_runner_builds_queue_on_replicas.yml index edd16781a14..2c8269ed030 100644 --- a/config/feature_flags/development/ci_runner_builds_queue_on_replicas.yml +++ b/config/feature_flags/development/ci_runner_builds_queue_on_replicas.yml @@ -1,7 +1,7 @@ --- name: ci_runner_builds_queue_on_replicas -introduced_by_url: -rollout_issue_url: +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56849 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/325723 milestone: '13.10' type: development group: group::continuous integration diff --git a/doc/user/application_security/dast/index.md b/doc/user/application_security/dast/index.md index 924b9b22e14..ea365f1daed 100644 --- a/doc/user/application_security/dast/index.md +++ b/doc/user/application_security/dast/index.md @@ -718,6 +718,22 @@ variables: DAST_ZAP_CLI_OPTIONS: "-config replacer.full_list(0).description=auth -config replacer.full_list(0).enabled=true -config replacer.full_list(0).matchtype=REQ_HEADER -config replacer.full_list(0).matchstr=Authorization -config replacer.full_list(0).regex=false -config replacer.full_list(0).replacement=TOKEN" ``` +### Bleeding-edge vulnerability definitions + +ZAP first creates rules in the `alpha` class. After a testing period with +the community, they are promoted to `beta`. DAST uses `beta` definitions by +default. To request `alpha` definitions, use the +`DAST_INCLUDE_ALPHA_VULNERABILITIES` CI/CD variable as shown in the +following configuration: + +```yaml +include: + template: DAST.gitlab-ci.yml + +variables: + DAST_INCLUDE_ALPHA_VULNERABILITIES: "true" +``` + ### Cloning the project's repository The DAST job does not require the project's repository to be present when running, so by default @@ -1172,38 +1188,6 @@ dast: - gl-dast-report.json ``` -## Security Dashboard - -The Security Dashboard is a good place to get an overview of all the security -vulnerabilities in your groups, projects and pipelines. Read more about the -[Security Dashboard](../security_dashboard/index.md). - -## Bleeding-edge vulnerability definitions - -ZAP first creates rules in the `alpha` class. After a testing period with -the community, they are promoted to `beta`. DAST uses `beta` definitions by -default. To request `alpha` definitions, use the -`DAST_INCLUDE_ALPHA_VULNERABILITIES` CI/CD variable as shown in the -following configuration: - -```yaml -include: - template: DAST.gitlab-ci.yml - -variables: - DAST_INCLUDE_ALPHA_VULNERABILITIES: "true" -``` - -## Interacting with the vulnerabilities - -Once a vulnerability is found, you can interact with it. Read more on how to -[address the vulnerabilities](../index.md#addressing-vulnerabilities). - -## Vulnerabilities database update - -For more information about the vulnerabilities database update, check the -[maintenance table](../index.md#maintenance-and-update-of-the-vulnerabilities-database). - ## Optimizing DAST By default, DAST downloads all artifacts defined by previous jobs in the pipeline. If diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 2e6d673e528..7d51559caaf 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -13833,6 +13833,9 @@ msgstr "" msgid "Geo|%{name} is scheduled for re-verify" msgstr "" +msgid "Geo|%{title} checksum progress" +msgstr "" + msgid "Geo|Add site" msgstr "" @@ -13947,15 +13950,15 @@ msgstr "" msgid "Geo|Please refer to Geo Troubleshooting." msgstr "" -msgid "Geo|Primary Details" -msgstr "" - msgid "Geo|Primary node" msgstr "" msgid "Geo|Primary site" msgstr "" +msgid "Geo|Progress Bar Placeholder" +msgstr "" + msgid "Geo|Project" msgstr "" @@ -13980,6 +13983,15 @@ msgstr "" msgid "Geo|Remove tracking database entry" msgstr "" +msgid "Geo|Replicated data is verified with the secondary node(s) using checksums." +msgstr "" + +msgid "Geo|Replication slot WAL" +msgstr "" + +msgid "Geo|Replication slots" +msgstr "" + msgid "Geo|Resync" msgstr "" @@ -14055,6 +14067,9 @@ msgstr "" msgid "Geo|Verification failed - %{error}" msgstr "" +msgid "Geo|Verificaton information" +msgstr "" + msgid "Geo|Waiting for scheduler" msgstr "" @@ -23862,6 +23877,9 @@ msgstr "" msgid "ProjectOverview|You must sign in to star a project" msgstr "" +msgid "ProjectPage|Copy project ID" +msgstr "" + msgid "ProjectPage|Project ID: %{project_id}" msgstr "" diff --git a/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb b/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb index ef3c88b1d9b..b872fa701c8 100644 --- a/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb +++ b/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb @@ -10,7 +10,6 @@ RSpec.describe 'User views pipeline editor button on root ci config file', :js d context "when the ci config is the root file" do before do - stub_feature_flags(consolidated_edit_button: false) project.add_developer(user) sign_in(user) end @@ -33,7 +32,6 @@ RSpec.describe 'User views pipeline editor button on root ci config file', :js d context "when user cannot collaborate" do before do - stub_feature_flags(consolidated_edit_button: false) sign_in(user) end it 'does not shows the Pipeline Editor button' do diff --git a/spec/helpers/button_helper_spec.rb b/spec/helpers/button_helper_spec.rb index ecb9c98b1bf..09495bbde35 100644 --- a/spec/helpers/button_helper_spec.rb +++ b/spec/helpers/button_helper_spec.rb @@ -171,6 +171,7 @@ RSpec.describe ButtonHelper do expect(element.attr('data-placement')).to eq('bottom') expect(element.attr('data-container')).to eq('body') expect(element.attr('data-clipboard-text')).to eq(nil) + expect(element.attr('itemprop')).to eq(nil) expect(element.inner_text).to eq("") expect(element.to_html).to include sprite_icon('copy-to-clipboard') @@ -209,5 +210,11 @@ RSpec.describe ButtonHelper do expect(element(hide_button_icon: true).to_html).not_to include sprite_icon('duplicate') end end + + context 'with `itemprop` attribute provided' do + it 'shows copy to clipboard button with `itemprop` attribute' do + expect(element(itemprop: "identifier").attr('itemprop')).to eq("identifier") + end + end end end |