From 7fcda12793acc54ba8de037f50cc3696dbd0f002 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 3 Mar 2021 15:10:53 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- Gemfile | 3 + Gemfile.lock | 44 ++++++++ .../boards/components/board_list_header.vue | 46 ++++---- .../boards/components/issue_due_date.vue | 6 +- .../boards/components/issue_time_estimate.vue | 2 +- .../javascripts/boards/stores/actions.js | 4 + .../boards/stores/mutation_types.js | 1 + .../javascripts/boards/stores/mutations.js | 4 + .../forks/new/components/fork_form.vue | 10 +- .../components/snippet_visibility_edit.vue | 7 +- .../stylesheets/_page_specific_files.scss | 1 - .../stylesheets/framework/variables.scss | 4 +- .../lazy_bundles/select2_overrides.scss | 16 +++ app/assets/stylesheets/pages/trials.scss | 15 --- app/assets/stylesheets/utilities.scss | 1 + .../admin/application_settings_controller.rb | 5 +- .../boards/issues/issue_move_list.rb | 43 ++++---- app/helpers/application_settings_helper.rb | 9 +- app/models/application_setting.rb | 15 +-- .../application_setting_implementation.rb | 28 +++-- .../application_settings/update_service.rb | 2 +- app/services/merge_requests/update_service.rb | 7 ++ .../_repository_storage.html.haml | 9 +- .../unreleased/292128-fix-icon-spacing.yml | 5 + .../292824-track-mr-time-changes.yml | 5 + ...nux-distribution-details-in-usage-ping.yml | 5 + ...-in-13-9-for-geo-with-downtime-upgrade.yml | 5 + .../fix_repo_storage_weights_admin.yml | 5 + ...ithubimporter-avoid-approval-exception.yml | 5 + config/application.rb | 1 - ...duce_queries_when_ticking_runner_queue.yml | 2 +- ...code_review_user_time_estimate_changed.yml | 8 ++ ..._i_code_review_user_time_spent_changed.yml | 8 ++ ...iew_user_time_estimate_changed_monthly.yml | 20 ++++ ...review_user_time_spent_changed_monthly.yml | 20 ++++ ...view_user_time_estimate_changed_weekly.yml | 20 ++++ ..._review_user_time_spent_changed_weekly.yml | 20 ++++ .../20210225045628_operating_system.yml | 20 ++++ ...proxy_allowlist_on_application_settings.rb | 21 ++++ ...llowlist_rename_on_application_settings.rb | 21 ++++ db/schema_migrations/20210301200601 | 1 + db/schema_migrations/20210301200959 | 1 + db/structure.sql | 2 +- doc/development/usage_ping/dictionary.md | 100 ++++++++++++++++++ .../reports/codequality_reports_comparer.rb | 8 +- lib/gitlab/ci/reports/reports_comparer.rb | 10 +- .../importer/pull_request_review_importer.rb | 18 +++- lib/gitlab/usage_data.rb | 14 ++- .../aggregated_metrics/code_review.yml | 8 +- .../known_events/code_review_events.yml | 10 ++ .../merge_request_activity_unique_counter.rb | 10 ++ locale/gitlab.pot | 17 +++ qa/qa/page/component/new_snippet.rb | 6 +- rubocop/rubocop-usage-data.yml | 1 + .../application_settings_controller_spec.rb | 4 +- spec/factories/ci/build_trace_chunks.rb | 2 +- spec/features/admin/admin_settings_spec.rb | 15 ++- .../components/board_list_header_spec.js | 78 ++++++-------- spec/frontend/boards/stores/actions_spec.js | 16 +++ spec/frontend/boards/stores/mutations_spec.js | 18 ++++ .../snippet_visibility_edit_spec.js.snap | 6 ++ .../application_settings_helper_spec.rb | 15 +-- .../codequality_reports_comparer_spec.rb | 56 ++++++++++ .../ci/reports/reports_comparer_spec.rb | 26 +++-- .../pull_request_review_importer_spec.rb | 14 ++- .../import_export/import_export_spec.rb | 4 +- ...ge_request_activity_unique_counter_spec.rb | 16 +++ spec/lib/gitlab/usage_data_spec.rb | 28 +++++ spec/models/application_setting_spec.rb | 55 ++++++---- .../update_service_spec.rb | 1 + .../merge_requests/update_service_spec.rb | 17 +++ .../services/projects/destroy_service_spec.rb | 29 ++++- .../application_setting_shared_examples.rb | 15 ++- .../_repository_storage.html.haml_spec.rb | 47 +++++--- 74 files changed, 911 insertions(+), 230 deletions(-) delete mode 100644 app/assets/stylesheets/pages/trials.scss create mode 100644 changelogs/unreleased/292128-fix-icon-spacing.yml create mode 100644 changelogs/unreleased/292824-track-mr-time-changes.yml create mode 100644 changelogs/unreleased/297020-linux-distribution-details-in-usage-ping.yml create mode 100644 changelogs/unreleased/322991-asset_proxy_allowlist-errors-in-13-9-for-geo-with-downtime-upgrade.yml create mode 100644 changelogs/unreleased/fix_repo_storage_weights_admin.yml create mode 100644 changelogs/unreleased/kassio-githubimporter-avoid-approval-exception.yml create mode 100644 config/feature_flags/development/usage_data_i_code_review_user_time_estimate_changed.yml create mode 100644 config/feature_flags/development/usage_data_i_code_review_user_time_spent_changed.yml create mode 100644 config/metrics/counts_28d/20210301102134_i_code_review_user_time_estimate_changed_monthly.yml create mode 100644 config/metrics/counts_28d/20210301102204_i_code_review_user_time_spent_changed_monthly.yml create mode 100644 config/metrics/counts_7d/20210302103539_i_code_review_user_time_estimate_changed_weekly.yml create mode 100644 config/metrics/counts_7d/20210302103615_i_code_review_user_time_spent_changed_weekly.yml create mode 100644 config/metrics/settings/20210225045628_operating_system.yml create mode 100644 db/migrate/20210301200601_rename_asset_proxy_allowlist_on_application_settings.rb create mode 100644 db/post_migrate/20210301200959_clean_up_asset_proxy_allowlist_rename_on_application_settings.rb create mode 100644 db/schema_migrations/20210301200601 create mode 100644 db/schema_migrations/20210301200959 diff --git a/Gemfile b/Gemfile index dbeda69ef98..d35cbcf73a7 100644 --- a/Gemfile +++ b/Gemfile @@ -74,6 +74,9 @@ gem 'acme-client', '~> 2.0', '>= 2.0.6' # Browser detection gem 'browser', '~> 4.2' +# OS detection for usage ping +gem 'ohai', '~> 16.10' + # GPG gem 'gpgme', '~> 2.0.19' diff --git a/Gemfile.lock b/Gemfile.lock index 5e06975ec87..a70aa8185ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -172,6 +172,14 @@ GEM cbor (0.5.9.6) character_set (1.4.0) charlock_holmes (0.7.7) + chef-config (16.10.17) + addressable + chef-utils (= 16.10.17) + fuzzyurl + mixlib-config (>= 2.2.12, < 4.0) + mixlib-shellout (>= 2.0, < 4.0) + tomlrb (~> 1.2) + chef-utils (16.10.17) childprocess (3.0.0) chunky_png (1.3.5) citrus (3.0.2) @@ -348,6 +356,8 @@ GEM ffi-compiler (1.0.1) ffi (>= 1.0.0) rake + ffi-yajl (2.3.4) + libyajl2 (~> 1.2) flipper (0.17.1) flipper-active_record (0.17.1) activerecord (>= 4.2, < 7) @@ -403,6 +413,7 @@ GEM fuubar (2.2.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) + fuzzyurl (0.9.0) gemoji (3.0.1) gemojione (3.3.0) json @@ -668,6 +679,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) + libyajl2 (1.2.0) license_finder (6.0.0) bundler rubyzip (>= 1, < 3) @@ -717,6 +729,12 @@ GEM mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.11.3) + mixlib-cli (2.1.8) + mixlib-config (3.0.9) + tomlrb + mixlib-log (3.0.9) + mixlib-shellout (3.2.5) + chef-utils ms_rest (0.7.6) concurrent-ruby (~> 1.0) faraday (>= 0.9, < 2.0.0) @@ -741,6 +759,8 @@ GEM connection_pool (~> 2.2) net-ldap (0.16.3) net-ntp (2.1.3) + net-scp (3.0.0) + net-ssh (>= 2.6.5, < 7.0.0) net-ssh (6.0.0) netrc (0.11.0) nio4r (2.5.4) @@ -764,6 +784,19 @@ GEM octokit (4.20.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) + ohai (16.10.6) + chef-config (>= 12.8, < 17) + chef-utils (>= 16.0, < 17) + ffi (~> 1.9) + ffi-yajl (~> 2.2) + ipaddress + mixlib-cli (>= 1.7.0) + mixlib-config (>= 2.0, < 4.0) + mixlib-log (>= 2.0.1, < 4.0) + mixlib-shellout (>= 2.0, < 4.0) + plist (~> 3.1) + train-core + wmi-lite (~> 1.0) oj (3.10.6) omniauth (1.9.0) hashie (>= 3.4.6, < 3.7.0) @@ -857,6 +890,7 @@ GEM railties (>= 4.0.0) pg (1.2.3) pg_query (1.3.0) + plist (3.6.0) png_quantizator (0.2.1) po_to_json (1.0.1) json (>= 1.6.0) @@ -1196,9 +1230,17 @@ GEM parslet (~> 1.8.0) toml-rb (1.0.0) citrus (~> 3.0, > 3.0) + tomlrb (1.3.0) tpm-key_attestation (0.9.0) bindata (~> 2.4) openssl-signature_algorithm (~> 0.4.0) + train-core (3.4.9) + addressable (~> 2.5) + ffi (!= 1.13.0) + json (>= 1.8, < 3.0) + mixlib-shellout (>= 2.0, < 4.0) + net-scp (>= 1.2, < 4.0) + net-ssh (>= 2.9, < 7.0) truncato (0.7.11) htmlentities (~> 4.3.1) nokogiri (>= 1.7.0, <= 2.0) @@ -1271,6 +1313,7 @@ GEM expression_parser rinku with_env (1.1.0) + wmi-lite (1.0.5) xml-simple (1.1.5) xpath (3.2.0) nokogiri (~> 1.8) @@ -1443,6 +1486,7 @@ DEPENDENCIES nokogiri (~> 1.11.1) oauth2 (~> 1.4) octokit (~> 4.15) + ohai (~> 16.10) oj (~> 3.10.6) omniauth (~> 1.8) omniauth-atlassian-oauth2 (~> 0.2.0) diff --git a/app/assets/javascripts/boards/components/board_list_header.vue b/app/assets/javascripts/boards/components/board_list_header.vue index a933370427c..7a92aed720d 100644 --- a/app/assets/javascripts/boards/components/board_list_header.vue +++ b/app/assets/javascripts/boards/components/board_list_header.vue @@ -10,7 +10,7 @@ import { } from '@gitlab/ui'; import { mapActions, mapState } from 'vuex'; import { isListDraggable } from '~/boards/boards_util'; -import { isScopedLabel } from '~/lib/utils/common_utils'; +import { isScopedLabel, parseBoolean } from '~/lib/utils/common_utils'; import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { n__, s__, __ } from '~/locale'; import sidebarEventHub from '~/sidebar/event_hub'; @@ -69,7 +69,7 @@ export default { }, }, computed: { - ...mapState(['activeId']), + ...mapState(['activeId', 'isEpicBoard']), isLoggedIn() { return Boolean(this.currentUserId); }, @@ -97,11 +97,14 @@ export default { showListDetails() { return !this.list.collapsed || !this.isSwimlanesHeader; }, - issuesCount() { + itemsCount() { return this.list.issuesCount; }, - issuesTooltipLabel() { - return n__(`%d issue`, `%d issues`, this.issuesCount); + countIcon() { + return 'issues'; + }, + itemsTooltipLabel() { + return n__(`%d issue`, `%d issues`, this.itemsCount); }, chevronTooltip() { return this.list.collapsed ? this.$options.i18n.expand : this.$options.i18n.collapse; @@ -110,7 +113,7 @@ export default { return this.list.collapsed ? 'chevron-down' : 'chevron-right'; }, isNewIssueShown() { - return this.listType === ListType.backlog || this.showListHeaderButton; + return (this.listType === ListType.backlog || this.showListHeaderButton) && !this.isEpicBoard; }, isSettingsShown() { return ( @@ -131,8 +134,14 @@ export default { return !this.disabled && isListDraggable(this.list); }, }, + created() { + const localCollapsed = parseBoolean(localStorage.getItem(`${this.uniqueKey}.collapsed`)); + if ((!this.isLoggedIn || this.isEpicBoard) && localCollapsed) { + this.toggleListCollapsed({ listId: this.list.id, collapsed: true }); + } + }, methods: { - ...mapActions(['updateList', 'setActiveId']), + ...mapActions(['updateList', 'setActiveId', 'toggleListCollapsed']), openSidebarSettings() { if (this.activeId === inactiveId) { sidebarEventHub.$emit('sidebar.closeAll'); @@ -148,10 +157,10 @@ export default { eventHub.$emit(`toggle-issue-form-${this.list.id}`); }, toggleExpanded() { - // eslint-disable-next-line vue/no-mutating-props - this.list.collapsed = !this.list.collapsed; + const collapsed = !this.list.collapsed; + this.toggleListCollapsed({ listId: this.list.id, collapsed }); - if (!this.isLoggedIn) { + if (!this.isLoggedIn || this.isEpicBoard) { this.addToLocalStorage(); } else { this.updateListFunction(); @@ -163,7 +172,7 @@ export default { }, addToLocalStorage() { if (AccessorUtilities.isLocalStorageAccessSafe()) { - localStorage.setItem(`${this.uniqueKey}.expanded`, !this.list.collapsed); + localStorage.setItem(`${this.uniqueKey}.collapsed`, this.list.collapsed); } }, updateListFunction() { @@ -203,6 +212,7 @@ export default { class="board-title-caret no-drag gl-cursor-pointer" category="tertiary" size="small" + data-testid="board-title-caret" @click="toggleExpanded" /> @@ -301,11 +311,11 @@ export default {
- +
-
• {{ issuesTooltipLabel }}
+
• {{ itemsTooltipLabel }}
@@ -323,13 +333,13 @@ export default { }" > - - - - + + + + -