Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Jun 3, 2024
1 parent f4794b8 commit 188b122
Show file tree
Hide file tree
Showing 72 changed files with 528 additions and 654 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ variables:
DOCKER_VERSION: "24.0.5"
RUBYGEMS_VERSION: "3.4"
BUNDLER_VERSION: "2.5"
GO_VERSION: "1.21"
GO_VERSION: "1.22"
NODE_VERSION: "20.12"
RUST_VERSION: "1.73"

Expand Down
2 changes: 1 addition & 1 deletion GITALY_SERVER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d1b9497e8e89e8066b575e29437abc1b081bccd4
e91769b14ae7f8a62582a9763ee4e4b284f7fbdc
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ group :development, :test do
gem 'benchmark-memory', '~> 0.1', require: false # rubocop:todo Gemfile/MissingFeatureCategory

# Profiling data from CI/CD pipelines
gem 'influxdb-client', '~> 2.9', require: false # rubocop:todo Gemfile/MissingFeatureCategory
gem 'influxdb-client', '~> 3.1', require: false, feature_category: :tooling

gem 'knapsack', '~> 1.22.0', feature_category: :tooling
gem 'crystalball', '~> 0.7.0', require: false, feature_category: :tooling
Expand Down Expand Up @@ -553,7 +553,7 @@ group :test do
# Moved in `test` because https://gitlab.com/gitlab-org/gitlab/-/issues/217527
gem 'derailed_benchmarks', require: false # rubocop:todo Gemfile/MissingFeatureCategory

gem 'gitlab_quality-test_tooling', '~> 1.26.0', require: false, feature_category: :tooling
gem 'gitlab_quality-test_tooling', '~> 1.27.1', require: false, feature_category: :tooling
end

gem 'octokit', '~> 8.1', feature_category: :importers
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.checksum
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
{"name":"gitlab-styles","version":"12.0.1","platform":"ruby","checksum":"d8a302b0ab0e1f18e2d11501760f1b85c5e70b5e5ca628828a0786c7984ed133"},
{"name":"gitlab_chronic_duration","version":"0.12.0","platform":"ruby","checksum":"0d766944d415b5c831f176871ee8625783fc0c5bfbef2d79a3a616f207ffc16d"},
{"name":"gitlab_omniauth-ldap","version":"2.2.0","platform":"ruby","checksum":"bb4d20acb3b123ed654a8f6a47d3fac673ece7ed0b6992edb92dca14bad2838c"},
{"name":"gitlab_quality-test_tooling","version":"1.26.0","platform":"ruby","checksum":"7dca27d4d4b5901f99623c6dc36a4081aff9d27cf8e835bdb8919911e2b98b31"},
{"name":"gitlab_quality-test_tooling","version":"1.27.1","platform":"ruby","checksum":"d6000221fd93bfc237d3162e448e800bd02a667c37f514aa7ddf4e62404ed81f"},
{"name":"globalid","version":"1.1.0","platform":"ruby","checksum":"b337e1746f0c8cb0a6c918234b03a1ddeb4966206ce288fbb57779f59b2d154f"},
{"name":"gon","version":"6.4.0","platform":"ruby","checksum":"e3a618d659392890f1aa7db420f17c75fd7d35aeb5f8fe003697d02c4b88d2f0"},
{"name":"google-apis-androidpublisher_v3","version":"0.34.0","platform":"ruby","checksum":"d7e1d7dd92f79c498fe2082222a1740d788e022e660c135564b3fd299cab5425"},
Expand Down Expand Up @@ -320,7 +320,7 @@
{"name":"ice_cube","version":"0.16.4","platform":"ruby","checksum":"da117e5de24bdc33931be629f9b55048641924442c7e9b72fedc05e5592531b7"},
{"name":"ice_nine","version":"0.11.2","platform":"ruby","checksum":"5d506a7d2723d5592dc121b9928e4931742730131f22a1a37649df1c1e2e63db"},
{"name":"imagen","version":"0.1.8","platform":"ruby","checksum":"fde7b727d4fe79c6bb5ac46c1f7184bf87a6d54df54d712ad2be039d2f93a162"},
{"name":"influxdb-client","version":"2.9.0","platform":"ruby","checksum":"b51fadb69e521460bcb6626cd0a9e6c29cd1c8426369c7f0a2b67e93ff9b9f02"},
{"name":"influxdb-client","version":"3.1.0","platform":"ruby","checksum":"5e9dc505babd55352858e8a96fa42e152af37b22f1da83df02704405f3c801c8"},
{"name":"invisible_captcha","version":"2.1.0","platform":"ruby","checksum":"02b452f3eb1b691d155ba3e8e97e1be0e6b6be62e8bc94957234b9cde0852b1e"},
{"name":"ipaddr","version":"1.2.5","platform":"ruby","checksum":"4e679c71d6d8ed99f925487082f70f9a958de155591caa0e7f6cef9aa160f17a"},
{"name":"ipaddress","version":"0.8.3","platform":"ruby","checksum":"85640c4f9194c26937afc8c78e3074a8e7c97d5d1210358d1440f01034d006f5"},
Expand Down
13 changes: 7 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ PATH
PATH
remote: gems/ipynbdiff
specs:
ipynbdiff (0.4.7)
ipynbdiff (0.4.8)
diffy (~> 3.4)
oj (~> 3.13.16)

Expand Down Expand Up @@ -739,11 +739,12 @@ GEM
omniauth (>= 1.3, < 3)
pyu-ruby-sasl (>= 0.0.3.3, < 0.1)
rubyntlm (~> 0.5)
gitlab_quality-test_tooling (1.26.0)
activesupport (>= 6.1, < 7.2)
gitlab_quality-test_tooling (1.27.1)
activesupport (>= 7.0, < 7.2)
amatch (~> 0.4.1)
gitlab (~> 4.19)
http (~> 5.0)
influxdb-client (~> 3.1)
nokogiri (~> 1.10)
parallel (>= 1, < 2)
rainbow (>= 3, < 4)
Expand Down Expand Up @@ -958,7 +959,7 @@ GEM
ice_nine (0.11.2)
imagen (0.1.8)
parser (>= 2.5, != 2.5.1.1)
influxdb-client (2.9.0)
influxdb-client (3.1.0)
invisible_captcha (2.1.0)
rails (>= 5.2)
ipaddr (1.2.5)
Expand Down Expand Up @@ -2019,7 +2020,7 @@ DEPENDENCIES
gitlab-utils!
gitlab_chronic_duration (~> 0.12)
gitlab_omniauth-ldap (~> 2.2.0)
gitlab_quality-test_tooling (~> 1.26.0)
gitlab_quality-test_tooling (~> 1.27.1)
gon (~> 6.4.0)
google-apis-androidpublisher_v3 (~> 0.34.0)
google-apis-cloudbilling_v1 (~> 0.21.0)
Expand Down Expand Up @@ -2060,7 +2061,7 @@ DEPENDENCIES
html2text
httparty (~> 0.21.0)
icalendar
influxdb-client (~> 2.9)
influxdb-client (~> 3.1)
invisible_captcha (~> 2.1.0)
ipaddr (~> 1.2.5)
ipaddress (~> 0.8.3)
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/admin/users/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const TOKENS = [
operators: OPERATORS_IS,
unique: true,
options: [
{ value: 'active', title: s__('AdminUsers|Active') },
{ value: 'banned', title: s__('AdminUsers|Banned') },
{ value: 'blocked', title: s__('AdminUsers|Blocked') },
{ value: 'deactivated', title: s__('AdminUsers|Deactivated') },
Expand Down
39 changes: 39 additions & 0 deletions app/assets/javascripts/pages/shared/wikis/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script>
import { GlAlert } from '@gitlab/ui';
import { s__ } from '~/locale';
import WikiHeader from './components/wiki_header.vue';
import WikiContent from './components/wiki_content.vue';
export default {
components: {
GlAlert,
WikiHeader,
WikiContent,
},
inject: ['contentApi', 'isPageHistorical', 'wikiUrl', 'historyUrl'],
i18n: {
alertText: s__('WikiHistoricalPage|This is an old version of this page.'),
alertPrimaryButton: s__('WikiHistoricalPage|Go to most recent version'),
alertSecondaryButton: s__('WikiHistoricalPage|Browse history'),
},
};
</script>

<template>
<div>
<gl-alert
v-if="isPageHistorical"
:dismissible="false"
variant="warning"
class="gl-mt-5"
:primary-button-text="$options.i18n.alertPrimaryButton"
:primary-button-link="wikiUrl"
:secondary-button-text="$options.i18n.alertSecondaryButton"
:secondary-button-link="historyUrl"
>
{{ $options.i18n.alertText }}
</gl-alert>
<wiki-header />
<wiki-content v-if="contentApi" :get-wiki-content-url="contentApi" />
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
directives: {
'gl-modal': GlModalDirective,
},
inject: ['deleteWikiUrl', 'pageTitle', 'csrfToken', 'pagePersisted'],
inject: ['wikiUrl', 'pageTitle', 'csrfToken', 'pagePersisted'],
props: {
showAsDropdownItem: {
type: Boolean,
Expand Down Expand Up @@ -120,7 +120,7 @@ export default {
@ok="onSubmit"
>
{{ modalBody }}
<form ref="form" :action="deleteWikiUrl" method="post" class="js-requires-input">
<form ref="form" :action="wikiUrl" method="post" class="js-requires-input">
<input ref="method" type="hidden" name="_method" value="delete" />
<input :value="csrfToken" type="hidden" name="authenticity_token" />
</form>
Expand Down
107 changes: 107 additions & 0 deletions app/assets/javascripts/pages/shared/wikis/components/wiki_header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<script>
import { GlButton, GlLink, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import { __, s__ } from '~/locale';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import WikiMoreDropdown from './wiki_more_dropdown.vue';
export default {
components: {
GlButton,
GlLink,
GlSprintf,
WikiMoreDropdown,
TimeAgo,
},
directives: {
GlTooltip: GlTooltipDirective,
},
inject: [
'pageTitle',
'showEditButton',
'isPageTemplate',
'editButtonUrl',
'lastVersion',
'pageVersion',
'authorUrl',
],
computed: {
editTooltipText() {
return this.isPageTemplate ? this.$options.i18n.editTemplate : this.$options.i18n.editPage;
},
editTooltip() {
return `${this.editTooltipText} <kbd class='flat ml-1' aria-hidden=true>e</kbd>`;
},
},
mounted() {
if (this.editButtonUrl) {
document.addEventListener('keyup', this.onKeyUp);
}
},
destroyed() {
document.removeEventListener('keyup', this.onKeyUp);
},
methods: {
onKeyUp(event) {
if (event.key === 'e') {
window.location.href = this.editButtonUrl;
}
return false;
},
},
i18n: {
edit: __('Edit'),
editPage: __('Edit page'),
editTemplate: __('Edit template'),
lastEdited: s__('Wiki|Last edited by %{author} %{timeago}'),
},
};
</script>

<template>
<div
class="wiki-page-header has-sidebar-toggle detail-page-header border-bottom-0 gl-pt-5 gl-flex gl-flex-wrap"
>
<div class="gl-flex gl-w-full">
<h1
class="gl-heading-1 !gl-my-0 gl-inline-block gl-grow gl-break-anywhere"
data-testid="wiki-page-title"
>
{{ pageTitle }}
</h1>
<div class="detail-page-header-actions gl-self-start gl-flex gl-gap-3">
<gl-button
v-if="showEditButton"
v-gl-tooltip.html
:title="editTooltip"
:href="editButtonUrl"
data-testid="wiki-edit-button"
>
{{ $options.i18n.edit }}
</gl-button>
<gl-button
v-gl-tooltip.html
icon="chevron-double-lg-left"
class="js-sidebar-wiki-toggle md:gl-hidden"
/>
<wiki-more-dropdown />
</div>
</div>
<div
v-if="lastVersion"
class="wiki-last-version gl-leading-20 gl-text-secondary gl-mt-3 gl-mb-5"
data-testid="wiki-page-last-version"
>
<gl-sprintf :message="$options.i18n.lastEdited">
<template #author>
<gl-link :href="authorUrl" class="gl-text-black-normal gl-font-bold">{{
pageVersion.commit.author_name
}}</gl-link>
</template>
<template #timeago>
<time-ago :time="pageVersion.commit.authored_date" target="wiki-last-version" />
</template>
</gl-sprintf>
</div>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
directives: {
GlTooltip: GlTooltipDirective,
},
inject: ['newUrl', 'history', 'templatesUrl', 'cloneLinkClass', 'pagePersisted'],
inject: ['newUrl', 'historyUrl', 'templatesUrl', 'cloneLinkClass', 'pagePersisted'],
i18n: {
wikiActions: s__('Wiki|Wiki actions'),
},
Expand All @@ -46,7 +46,7 @@ export default {
historyItem() {
return {
text: this.isTemplate ? s__('Wiki|Template history') : s__('Wiki|Page history'),
href: this.history,
href: this.historyUrl,
extraAttrs: {
'data-testid': 'page-history-button',
},
Expand Down Expand Up @@ -121,8 +121,8 @@ export default {

<clone-wiki-modal show-as-dropdown-item />

<gl-disclosure-dropdown-group v-if="history || showPrintItem" bordered>
<gl-disclosure-dropdown-item v-if="history" :item="historyItem">
<gl-disclosure-dropdown-group v-if="historyUrl || showPrintItem" bordered>
<gl-disclosure-dropdown-item v-if="historyUrl" :item="historyItem">
<template #list-item>
<gl-icon name="history" class="gl-mr-2 gl-text-secondary" />
{{ historyItem.text }}
Expand Down
11 changes: 2 additions & 9 deletions app/assets/javascripts/pages/shared/wikis/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ const createWikiFormApp = () => {
const el = document.getElementById('js-wiki-form');

if (el) {
const {
pageInfo,
formatOptions,
templates,
deleteWikiUrl,
pageTitle,
pagePersisted,
} = el.dataset;
const { pageInfo, formatOptions, templates, wikiUrl, pageTitle, pagePersisted } = el.dataset;

Vue.use(VueApollo);

Expand All @@ -57,7 +50,7 @@ const createWikiFormApp = () => {
drawioUrl: gon.diagramsnet_url,
templates: JSON.parse(templates),
pageTitle,
deleteWikiUrl,
wikiUrl,
csrfToken: csrf.token,
pagePersisted: parseBoolean(pagePersisted),
},
Expand Down
Loading

0 comments on commit 188b122

Please sign in to comment.