Skip to content

Commit 50e177d

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 9cf113d commit 50e177d

File tree

55 files changed

+843
-336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+843
-336
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
documentation](doc/development/changelog.md) for instructions on adding your own
33
entry.
44

5+
## 15.8.3 (2023-02-15)
6+
7+
### Fixed (3 changes)
8+
9+
- [Attempt reading schema file instead of a file named `#{report_version}`](gitlab-org/gitlab@f4b236c5f22c2da89bd4275cd8f5bf2807069ee4) ([merge request](gitlab-org/gitlab!111934))
10+
- [Revert changes on wiki replication/verification legacy code](gitlab-org/gitlab@71b29b669f0415fa371560139d699aa7ad568549) ([merge request](gitlab-org/gitlab!111934)) **GitLab Enterprise Edition**
11+
- [Revert changes on wiki replication/verification legacy code](gitlab-org/gitlab@fd824d99fb7b341088841edfaa6c401c4c20dad8) ([merge request](gitlab-org/gitlab!111879)) **GitLab Enterprise Edition**
12+
13+
### Changed (1 change)
14+
15+
- [Upgrade Alert - Add proper API support](gitlab-org/gitlab@6658efdbfb89847f20836e862710260e49c44778) ([merge request](gitlab-org/gitlab!111934))
16+
517
## 15.8.2 (2023-02-10)
618

719
No changes.

app/assets/javascripts/ci/runner/admin_new_runner/index.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const initAdminNewRunner = (selector = '#js-admin-new-runner') => {
1212
return null;
1313
}
1414

15-
const { legacyRegistrationToken, awsImgPath, dockerImgPath, kubernetesImgPath } = el.dataset;
15+
const { legacyRegistrationToken } = el.dataset;
1616

1717
const apolloProvider = new VueApollo({
1818
defaultClient: createDefaultClient(),
@@ -21,11 +21,6 @@ export const initAdminNewRunner = (selector = '#js-admin-new-runner') => {
2121
return new Vue({
2222
el,
2323
apolloProvider,
24-
provide: {
25-
awsImgPath,
26-
dockerImgPath,
27-
kubernetesImgPath,
28-
},
2924
render(h) {
3025
return h(AdminNewRunnerApp, {
3126
props: {

app/assets/javascripts/ci/runner/components/runner_platforms_radio_group.vue

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<script>
2+
import AWS_LOGO_URL from '@gitlab/svgs/dist/illustrations/logos/aws.svg?url';
3+
import DOCKER_LOGO_URL from '@gitlab/svgs/dist/illustrations/third-party-logos/ci_cd-template-logos/docker.png';
4+
import KUBERNETES_LOGO_URL from '@gitlab/svgs/dist/illustrations/logos/kubernetes.svg?url';
25
import { GlFormRadioGroup, GlIcon, GlLink } from '@gitlab/ui';
6+
37
import {
48
LINUX_PLATFORM,
59
MACOS_PLATFORM,
@@ -18,7 +22,6 @@ export default {
1822
GlIcon,
1923
RunnerPlatformsRadio,
2024
},
21-
inject: ['awsImgPath', 'dockerImgPath', 'kubernetesImgPath'],
2225
props: {
2326
value: {
2427
type: String,
@@ -39,9 +42,13 @@ export default {
3942
LINUX_PLATFORM,
4043
MACOS_PLATFORM,
4144
WINDOWS_PLATFORM,
45+
4246
AWS_PLATFORM,
47+
AWS_LOGO_URL,
4348
DOCKER_HELP_URL,
49+
DOCKER_LOGO_URL,
4450
KUBERNETES_HELP_URL,
51+
KUBERNETES_LOGO_URL,
4552
};
4653
</script>
4754

@@ -68,7 +75,11 @@ export default {
6875
<label>{{ s__('Runners|Cloud templates') }}</label>
6976
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
7077
<div class="gl-display-flex gl-flex-wrap gl-gap-5">
71-
<runner-platforms-radio v-model="model" :image="awsImgPath" :value="$options.AWS_PLATFORM">
78+
<runner-platforms-radio
79+
v-model="model"
80+
:image="$options.AWS_LOGO_URL"
81+
:value="$options.AWS_PLATFORM"
82+
>
7283
AWS
7384
</runner-platforms-radio>
7485
</div>
@@ -79,13 +90,13 @@ export default {
7990

8091
<div class="gl-display-flex gl-flex-wrap gl-gap-5">
8192
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
82-
<runner-platforms-radio :image="dockerImgPath">
93+
<runner-platforms-radio :image="$options.DOCKER_LOGO_URL">
8394
<gl-link :href="$options.DOCKER_HELP_URL" target="_blank">
8495
Docker
8596
<gl-icon name="external-link" />
8697
</gl-link>
8798
</runner-platforms-radio>
88-
<runner-platforms-radio :image="kubernetesImgPath">
99+
<runner-platforms-radio :image="$options.KUBERNETES_LOGO_URL">
89100
<gl-link :href="$options.KUBERNETES_HELP_URL" target="_blank">
90101
Kubernetes
91102
<gl-icon name="external-link" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import Vue from 'vue';
2+
3+
/**
4+
* Initializes a component as a simple vue app, passing the necessary props. If the element
5+
* has a data attribute named `data-view-model`, the content of that attributed will be
6+
* converted from json and passed on to the component as a prop. The root component is then
7+
* responsible for setting up it's children, injections, and other desired features.
8+
*
9+
* @param {string} selector css selector for where to build
10+
* @param {Vue.component} component The Vue compoment to be built as the root of the app
11+
*
12+
* @example
13+
* ```html
14+
* <div id='#mount-here' data-view-model="{'some': 'object'}" />
15+
* ```
16+
*
17+
* ```javascript
18+
* initSimpleApp('#mount-here', MyApp)
19+
* ```
20+
*
21+
* This will mount MyApp as root on '#mount-here'. It will receive {'some': 'object'} as it's
22+
* view model prop.
23+
*/
24+
export const initSimpleApp = (selector, component) => {
25+
const element = document.querySelector(selector);
26+
27+
if (!element) {
28+
return null;
29+
}
30+
31+
const props = element.dataset.viewModel ? JSON.parse(element.dataset.viewModel) : {};
32+
33+
return new Vue({
34+
el: element,
35+
render(h) {
36+
return h(component, { props });
37+
},
38+
});
39+
};

app/assets/javascripts/ide/init_gitlab_web_ide.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import csrf from '~/lib/utils/csrf';
77
import { getBaseConfig } from './lib/gitlab_web_ide/get_base_config';
88
import { setupRootElement } from './lib/gitlab_web_ide/setup_root_element';
99
import { GITLAB_WEB_IDE_FEEDBACK_ISSUE } from './constants';
10+
import { handleTracking } from './lib/gitlab_web_ide/handle_tracking_event';
1011

1112
const buildRemoteIdeURL = (ideRemotePath, remoteHost, remotePathArg) => {
1213
const remotePath = cleanLeadingSeparator(remotePathArg);
@@ -72,6 +73,7 @@ export const initGitlabWebIDE = async (el) => {
7273
fontFamily: editorFontFamily,
7374
format: editorFontFormat,
7475
},
76+
handleTracking,
7577
async handleStartRemote({ remoteHost, remotePath, connectionToken }) {
7678
const confirmed = await confirmAction(
7779
__('Are you sure you want to leave the Web IDE? All unsaved changes will be lost.'),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { snakeCase } from 'lodash';
2+
import { convertObjectPropsToSnakeCase } from '~/lib/utils/common_utils';
3+
import Tracking from '~/tracking';
4+
5+
export const handleTracking = ({ name, data }) => {
6+
const snakeCaseEventName = snakeCase(name);
7+
8+
if (data && Object.keys(data).length) {
9+
Tracking.event(undefined, snakeCaseEventName, {
10+
/* See GitLab snowplow schema for a definition of the extra field
11+
* https://docs.gitlab.com/ee/development/snowplow/schemas.html#gitlab_standard.
12+
*/
13+
extra: convertObjectPropsToSnakeCase(data, {
14+
deep: true,
15+
}),
16+
});
17+
} else {
18+
Tracking.event(undefined, snakeCaseEventName);
19+
}
20+
};

app/assets/javascripts/ide/remote/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { startRemote } from '@gitlab/web-ide';
22
import { getBaseConfig, setupRootElement } from '~/ide/lib/gitlab_web_ide';
33
import { isSameOriginUrl, joinPaths } from '~/lib/utils/url_utility';
4+
import { handleTracking } from '~/ide/lib/gitlab_web_ide/handle_tracking_event';
45

56
/**
67
* @param {Element} rootEl
@@ -36,5 +37,6 @@ export const mountRemoteIDE = async (el) => {
3637
// TODO Handle error better
3738
handleError: visitReturnUrl,
3839
handleClose: visitReturnUrl,
40+
handleTracking,
3941
});
4042
};

app/assets/javascripts/ml/experiment_tracking/components/ml_candidate.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ export default {
1010
IncubationAlert,
1111
GlLink,
1212
},
13-
inject: ['candidate'],
13+
props: {
14+
candidate: {
15+
type: Object,
16+
required: true,
17+
},
18+
},
1419
i18n: {
1520
titleLabel: __('Model candidate details'),
1621
infoLabel: __('Info'),
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
1-
import Vue from 'vue';
1+
import { initSimpleApp } from '~/helpers/init_simple_app_helper';
22
import MlCandidate from '~/ml/experiment_tracking/components/ml_candidate.vue';
33

4-
const initShowCandidate = () => {
5-
const element = document.querySelector('#js-show-ml-candidate');
6-
if (!element) {
7-
return;
8-
}
9-
10-
const container = document.createElement('div');
11-
element.appendChild(container);
12-
13-
const candidate = JSON.parse(element.dataset.candidate);
14-
15-
// eslint-disable-next-line no-new
16-
new Vue({
17-
el: container,
18-
provide: {
19-
candidate,
20-
},
21-
render(h) {
22-
return h(MlCandidate);
23-
},
24-
});
25-
};
26-
27-
initShowCandidate();
4+
initSimpleApp('#js-show-ml-candidate', MlCandidate);

app/assets/javascripts/related_issues/components/add_issuable_form.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script>
22
import { GlFormGroup, GlFormRadioGroup, GlButton } from '@gitlab/ui';
3+
import { TYPE_ISSUE } from '~/issues/constants';
34
import { mergeUrlParams } from '~/lib/utils/url_utility';
45
import { __ } from '~/locale';
56
67
import {
7-
issuableTypesMap,
88
itemAddFailureTypesMap,
99
linkedIssueTypesMap,
1010
addRelatedIssueErrorMap,
@@ -54,7 +54,7 @@ export default {
5454
issuableType: {
5555
type: String,
5656
required: false,
57-
default: issuableTypesMap.ISSUE,
57+
default: TYPE_ISSUE,
5858
},
5959
hasError: {
6060
type: Boolean,

app/assets/javascripts/related_issues/components/related_issuable_input.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script>
22
import $ from 'jquery';
33
import GfmAutoComplete from 'ee_else_ce/gfm_auto_complete';
4+
import { TYPE_ISSUE } from '~/issues/constants';
45
import {
56
autoCompleteTextMap,
67
inputPlaceholderConfidentialTextMap,
78
inputPlaceholderTextMap,
8-
issuableTypesMap,
99
} from '../constants';
1010
import IssueToken from './issue_token.vue';
1111
@@ -54,7 +54,7 @@ export default {
5454
issuableType: {
5555
type: String,
5656
required: false,
57-
default: issuableTypesMap.ISSUE,
57+
default: TYPE_ISSUE,
5858
},
5959
confidential: {
6060
type: Boolean,

app/assets/javascripts/related_issues/components/related_issues_root.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Your caret can stop touching a `rawReference` can happen in a variety of ways:
2525
*/
2626
import { createAlert } from '~/flash';
2727
import { getIdFromGraphQLId, isGid } from '~/graphql_shared/utils';
28+
import { TYPE_ISSUE } from '~/issues/constants';
2829
import { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status';
2930
import { __ } from '~/locale';
3031
import {
3132
relatedIssuesRemoveErrorMap,
3233
pathIndeterminateErrorMap,
3334
addRelatedIssueErrorMap,
34-
issuableTypesMap,
3535
PathIdSeparator,
3636
} from '../constants';
3737
import RelatedIssuesService from '../services/related_issues_service';
@@ -66,7 +66,7 @@ export default {
6666
issuableType: {
6767
type: String,
6868
required: false,
69-
default: issuableTypesMap.ISSUE,
69+
default: TYPE_ISSUE,
7070
},
7171
allowAutoComplete: {
7272
type: Boolean,

0 commit comments

Comments
 (0)