From 0b789f95a35aa3e4b99ce12fc98bd3cce6555602 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 5 May 2022 18:08:40 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- GITALY_SERVER_VERSION | 2 +- .../components/database_listbox.vue | 51 +++++++++++ .../admin/background_migrations/index.js | 38 ++++++++ .../components/bubble_menus/code_block.vue | 2 +- .../{frontmatter.vue => code_block.vue} | 14 ++- .../extensions/code_block_highlight.js | 17 ++-- .../content_editor/extensions/diagram.js | 3 + .../content_editor/extensions/frontmatter.js | 15 ++-- .../services/code_block_language_loader.js | 24 +++-- .../content_editor/services/content_editor.js | 11 +-- .../services/create_content_editor.js | 4 +- .../services/gl_api_markdown_deserializer.js | 7 +- .../services/remark_markdown_deserializer.js | 6 +- app/assets/javascripts/editor/schema/ci.json | 17 ---- .../admin/background_migrations/index.js | 3 + .../admin/application_settings_controller.rb | 14 ++- .../admin/background_migrations_controller.rb | 4 +- .../types/container_repository_type.rb | 1 + app/models/raw_usage_data.rb | 7 ++ .../_migration.html.haml | 6 +- .../background_migrations/index.html.haml | 20 ++++- doc/api/graphql/reference/index.md | 2 + doc/ci/yaml/artifacts_reports.md | 27 ++---- doc/development/code_review.md | 2 +- doc/development/dangerbot.md | 2 +- .../documentation/styleguide/word_list.md | 2 +- .../fe_guide/design_anti_patterns.md | 2 +- doc/development/fips_compliance.md | 14 +++ doc/development/pipelines.md | 2 +- doc/development/ruby_upgrade.md | 2 +- doc/development/service_ping/implement.md | 2 + doc/topics/git/troubleshooting_git.md | 2 +- .../test_coverage_visualization.md | 2 +- lib/gitlab/ci/config/entry/reports.rb | 5 +- lib/gitlab/ci/templates/MATLAB.gitlab-ci.yml | 4 +- lib/gitlab/usage/service_ping_report.rb | 4 +- locale/gitlab.pot | 39 ++++++++ ...ce_with_forward_pipeline_variables_spec.rb | 3 +- .../application_settings_controller_spec.rb | 53 +++++++++++ .../admin_sees_background_migrations_spec.rb | 90 +++++++++++++++++++ spec/features/admin/admin_settings_spec.rb | 5 +- .../schemas/graphql/container_repository.json | 5 +- .../components/database_listbox_spec.js | 57 ++++++++++++ .../admin/background_migrations/mock_data.js | 6 ++ .../bubble_menus/code_block_spec.js | 4 +- ...frontmatter_spec.js => code_block_spec.js} | 33 +++++-- .../extensions/code_block_highlight_spec.js | 13 ++- .../content_editor/extensions/diagram_spec.js | 16 ++++ .../extensions/frontmatter_spec.js | 12 +++ .../code_block_language_loader_spec.js | 18 ++-- .../services/content_editor_spec.js | 9 -- .../gl_api_markdown_deserializer_spec.js | 4 - .../remark_markdown_deserializer_spec.js | 8 +- .../json_tests/positive_tests/gitlab-ci.json | 10 ++- .../container_repository_details_type_spec.rb | 2 +- .../types/container_repository_type_spec.rb | 2 +- .../gitlab/ci/config/entry/reports_spec.rb | 13 --- spec/models/raw_usage_data_spec.rb | 25 ++++++ 58 files changed, 589 insertions(+), 178 deletions(-) create mode 100644 app/assets/javascripts/admin/background_migrations/components/database_listbox.vue create mode 100644 app/assets/javascripts/admin/background_migrations/index.js rename app/assets/javascripts/content_editor/components/wrappers/{frontmatter.vue => code_block.vue} (60%) create mode 100644 app/assets/javascripts/pages/admin/background_migrations/index.js create mode 100644 spec/frontend/admin/background_migrations/components/database_listbox_spec.js create mode 100644 spec/frontend/admin/background_migrations/mock_data.js rename spec/frontend/content_editor/components/wrappers/{frontmatter_spec.js => code_block_spec.js} (54%) create mode 100644 spec/frontend/content_editor/extensions/diagram_spec.js diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index ae9fa84a927..292efacb872 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -1f98d5a94c880e3e556ae3ace095f83e44f002fb +86aa7ee82a5dd241fd7d4b33435da0a7ecad12b0 diff --git a/app/assets/javascripts/admin/background_migrations/components/database_listbox.vue b/app/assets/javascripts/admin/background_migrations/components/database_listbox.vue new file mode 100644 index 00000000000..7f6e5dc4f35 --- /dev/null +++ b/app/assets/javascripts/admin/background_migrations/components/database_listbox.vue @@ -0,0 +1,51 @@ + + + diff --git a/app/assets/javascripts/admin/background_migrations/index.js b/app/assets/javascripts/admin/background_migrations/index.js new file mode 100644 index 00000000000..4ddd8f17c9a --- /dev/null +++ b/app/assets/javascripts/admin/background_migrations/index.js @@ -0,0 +1,38 @@ +import Vue from 'vue'; +import * as Sentry from '@sentry/browser'; +import Translate from '~/vue_shared/translate'; +import BackgroundMigrationsDatabaseListbox from './components/database_listbox.vue'; + +Vue.use(Translate); + +export const initBackgroundMigrationsApp = () => { + const el = document.getElementById('js-database-listbox'); + + if (!el) { + return false; + } + + const { selectedDatabase } = el.dataset; + let { databases } = el.dataset; + + try { + databases = JSON.parse(databases).map((database) => ({ + value: database, + text: database, + })); + } catch (e) { + Sentry.captureException(e); + } + + return new Vue({ + el, + render(createElement) { + return createElement(BackgroundMigrationsDatabaseListbox, { + props: { + databases, + selectedDatabase, + }, + }); + }, + }); +}; diff --git a/app/assets/javascripts/content_editor/components/bubble_menus/code_block.vue b/app/assets/javascripts/content_editor/components/bubble_menus/code_block.vue index 210f259b20f..518ddd7a09c 100644 --- a/app/assets/javascripts/content_editor/components/bubble_menus/code_block.vue +++ b/app/assets/javascripts/content_editor/components/bubble_menus/code_block.vue @@ -72,7 +72,7 @@ export default { async applySelectedLanguage(language) { this.selectedLanguage = language; - await codeBlockLanguageLoader.loadLanguages([language.syntax]); + await codeBlockLanguageLoader.loadLanguage(language.syntax); this.tiptapEditor.commands.setCodeBlock({ language: this.selectedLanguage.syntax }); }, diff --git a/app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue b/app/assets/javascripts/content_editor/components/wrappers/code_block.vue similarity index 60% rename from app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue rename to app/assets/javascripts/content_editor/components/wrappers/code_block.vue index e8829d00986..1390b9b2daf 100644 --- a/app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue +++ b/app/assets/javascripts/content_editor/components/wrappers/code_block.vue @@ -1,9 +1,10 @@