Skip to content
Snippets Groups Projects
Commit 58f29d5f authored by Jacques Erasmus's avatar Jacques Erasmus
Browse files

Merge branch 'master' into 48746-fix-files-uploaded-in-base64

parents 0572da24 a9827357
No related branches found
No related tags found
No related merge requests found
Showing
with 99 additions and 57 deletions
Loading
@@ -50,7 +50,8 @@ Style/FrozenStringLiteralComment:
Loading
@@ -50,7 +50,8 @@ Style/FrozenStringLiteralComment:
- 'danger/**/*' - 'danger/**/*'
- 'db/**/*' - 'db/**/*'
- 'ee/**/*' - 'ee/**/*'
- 'lib/**/*' - 'lib/gitlab/**/*'
- 'lib/tasks/**/*'
- 'qa/**/*' - 'qa/**/*'
- 'rubocop/**/*' - 'rubocop/**/*'
- 'scripts/**/*' - 'scripts/**/*'
Loading
@@ -84,6 +85,7 @@ Naming/FileName:
Loading
@@ -84,6 +85,7 @@ Naming/FileName:
- EE - EE
- JSON - JSON
- LDAP - LDAP
- SAML
- IO - IO
- HMAC - HMAC
- QA - QA
Loading
Loading
1.1.0 1.2.1
8.3.3 8.4.0
\ No newline at end of file
<script> <script>
import _ from 'underscore'; import _ from 'underscore';
import helmInstallIllustration from '@gitlab-org/gitlab-svgs/illustrations/kubernetes-installation.svg'; import helmInstallIllustration from '@gitlab-org/gitlab-svgs/dist/illustrations/kubernetes-installation.svg';
import elasticsearchLogo from 'images/cluster_app_logos/elasticsearch.png'; import elasticsearchLogo from 'images/cluster_app_logos/elasticsearch.png';
import gitlabLogo from 'images/cluster_app_logos/gitlab.png'; import gitlabLogo from 'images/cluster_app_logos/gitlab.png';
import helmLogo from 'images/cluster_app_logos/helm.png'; import helmLogo from 'images/cluster_app_logos/helm.png';
Loading
Loading
Loading
@@ -20,6 +20,11 @@ export default {
Loading
@@ -20,6 +20,11 @@ export default {
Tooltip, Tooltip,
}, },
props: { props: {
discussionPath: {
type: String,
required: false,
default: '',
},
diffFile: { diffFile: {
type: Object, type: Object,
required: true, required: true,
Loading
@@ -65,8 +70,7 @@ export default {
Loading
@@ -65,8 +70,7 @@ export default {
if (this.diffFile.submodule) { if (this.diffFile.submodule) {
return this.diffFile.submoduleTreeUrl || this.diffFile.submoduleLink; return this.diffFile.submoduleTreeUrl || this.diffFile.submoduleLink;
} }
return this.discussionPath;
return `#${this.diffFile.fileHash}`;
}, },
filePath() { filePath() {
if (this.diffFile.submodule) { if (this.diffFile.submodule) {
Loading
@@ -152,7 +156,7 @@ export default {
Loading
@@ -152,7 +156,7 @@ export default {
v-once v-once
ref="titleWrapper" ref="titleWrapper"
:href="titleLink" :href="titleLink"
class="append-right-4" class="append-right-4 js-title-wrapper"
> >
<file-icon <file-icon
:file-name="filePath" :file-name="filePath"
Loading
Loading
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { getParameterValues } from '~/lib/utils/url_utility'; import { getParameterValues } from '~/lib/utils/url_utility';
import bp from '~/breakpoints';
import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME, MR_TREE_SHOW_KEY } from '../../constants'; import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME, MR_TREE_SHOW_KEY } from '../../constants';
   
const viewTypeFromQueryString = getParameterValues('view')[0]; const viewTypeFromQueryString = getParameterValues('view')[0];
Loading
@@ -20,6 +21,7 @@ export default () => ({
Loading
@@ -20,6 +21,7 @@ export default () => ({
diffViewType: viewTypeFromQueryString || viewTypeFromCookie || defaultViewType, diffViewType: viewTypeFromQueryString || viewTypeFromCookie || defaultViewType,
tree: [], tree: [],
treeEntries: {}, treeEntries: {},
showTreeList: storedTreeShow === null ? true : storedTreeShow === 'true', showTreeList:
storedTreeShow === null ? bp.getBreakpointSize() !== 'xs' : storedTreeShow === 'true',
currentDiffFileId: '', currentDiffFileId: '',
}); });
Loading
@@ -18,7 +18,7 @@
Loading
@@ -18,7 +18,7 @@
StuckBlock, StuckBlock,
}, },
props: { props: {
runnerHelpUrl: { runnerSettingsUrl: {
type: String, type: String,
required: false, required: false,
default: null, default: null,
Loading
@@ -30,7 +30,7 @@
Loading
@@ -30,7 +30,7 @@
'headerActions', 'headerActions',
'headerTime', 'headerTime',
'shouldRenderCalloutMessage', 'shouldRenderCalloutMessage',
'jobHasStarted', 'shouldRenderTriggeredLabel',
'hasEnvironment', 'hasEnvironment',
'isJobStuck', 'isJobStuck',
'hasTrace', 'hasTrace',
Loading
@@ -58,7 +58,7 @@
Loading
@@ -58,7 +58,7 @@
:user="job.user" :user="job.user"
:actions="headerActions" :actions="headerActions"
:has-sidebar-button="true" :has-sidebar-button="true"
:should-render-triggered-label="jobHasStarted" :should-render-triggered-label="shouldRenderTriggeredLabel"
:item-name="__('Job')" :item-name="__('Job')"
/> />
</div> </div>
Loading
@@ -76,7 +76,7 @@
Loading
@@ -76,7 +76,7 @@
class="js-job-stuck" class="js-job-stuck"
:has-no-runners-for-project="job.runners.available" :has-no-runners-for-project="job.runners.available"
:tags="job.tags" :tags="job.tags"
:runners-path="runnerHelpUrl" :runners-path="runnerSettingsUrl"
/> />
   
<environments-block <environments-block
Loading
@@ -87,8 +87,8 @@
Loading
@@ -87,8 +87,8 @@
/> />
   
<erased-block <erased-block
v-if="job.erased" v-if="job.erased_at"
class="js-job-erased" class="js-job-erased-block"
:user="job.erased_by" :user="job.erased_by"
:erased-at="job.erased_at" :erased-at="job.erased_at"
/> />
Loading
Loading
Loading
@@ -65,7 +65,7 @@ export default {
Loading
@@ -65,7 +65,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="top-bar"> <div class="top-bar affix js-top-bar">
<!-- truncate information --> <!-- truncate information -->
<div class="js-truncated-info truncated-info d-none d-sm-block float-left"> <div class="js-truncated-info truncated-info d-none d-sm-block float-left">
<template v-if="isTraceSizeVisible"> <template v-if="isTraceSizeVisible">
Loading
Loading
Loading
@@ -36,7 +36,7 @@ export default {
Loading
@@ -36,7 +36,7 @@ export default {
}, },
}, },
computed: { computed: {
...mapState(['job', 'isLoading', 'stages', 'jobs']), ...mapState(['job', 'isLoading', 'stages', 'jobs', 'selectedStage']),
coverage() { coverage() {
return `${this.job.coverage}%`; return `${this.job.coverage}%`;
}, },
Loading
@@ -110,7 +110,7 @@ export default {
Loading
@@ -110,7 +110,7 @@ export default {
</script> </script>
<template> <template>
<aside <aside
class="right-sidebar right-sidebar-expanded build-sidebar" class="js-build-sidebar right-sidebar right-sidebar-expanded build-sidebar"
data-offset-top="101" data-offset-top="101"
data-spy="affix" data-spy="affix"
> >
Loading
@@ -276,6 +276,7 @@ export default {
Loading
@@ -276,6 +276,7 @@ export default {
<stages-dropdown <stages-dropdown
:stages="stages" :stages="stages"
:pipeline="job.pipeline" :pipeline="job.pipeline"
:selected-stage="selectedStage"
@requestSidebarStageDropdown="fetchJobsForStage" @requestSidebarStageDropdown="fetchJobsForStage"
/> />
   
Loading
Loading
Loading
@@ -2,7 +2,6 @@
Loading
@@ -2,7 +2,6 @@
import _ from 'underscore'; import _ from 'underscore';
import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import { __ } from '~/locale';
   
export default { export default {
components: { components: {
Loading
@@ -18,30 +17,20 @@ export default {
Loading
@@ -18,30 +17,20 @@ export default {
type: Array, type: Array,
required: true, required: true,
}, },
selectedStage: {
type: String,
required: true,
},
}, },
data() {
return {
selectedStage: this.stages.length > 0 ? this.stages[0].name : __('More'),
};
},
computed: { computed: {
hasRef() { hasRef() {
return !_.isEmpty(this.pipeline.ref); return !_.isEmpty(this.pipeline.ref);
}, },
}, },
watch: {
// When the component is initially mounted it may start with an empty stages array.
// Once the prop is updated, we set the first stage as the selected one
stages(newVal) {
if (newVal.length) {
this.selectedStage = newVal[0].name;
}
},
},
methods: { methods: {
onStageClick(stage) { onStageClick(stage) {
this.$emit('requestSidebarStageDropdown', stage); this.$emit('requestSidebarStageDropdown', stage);
this.selectedStage = stage.name;
}, },
}, },
}; };
Loading
Loading
Loading
@@ -9,8 +9,7 @@ import createStore from './store';
Loading
@@ -9,8 +9,7 @@ import createStore from './store';
export default () => { export default () => {
const { dataset } = document.getElementById('js-job-details-vue'); const { dataset } = document.getElementById('js-job-details-vue');
   
// eslint-disable-next-line no-new
new Job();
   
const store = createStore(); const store = createStore();
store.dispatch('setJobEndpoint', dataset.endpoint); store.dispatch('setJobEndpoint', dataset.endpoint);
Loading
@@ -33,7 +32,7 @@ export default () => {
Loading
@@ -33,7 +32,7 @@ export default () => {
props: { props: {
isLoading: this.isLoading, isLoading: this.isLoading,
job: this.job, job: this.job,
runnerHelpUrl: dataset.runnerHelpUrl, runnerSettingsUrl: dataset.runnerSettingsUrl,
}, },
}); });
}, },
Loading
@@ -71,4 +70,7 @@ export default () => {
Loading
@@ -71,4 +70,7 @@ export default () => {
}); });
}, },
}); });
// eslint-disable-next-line no-new
new Job();
}; };
Loading
@@ -139,10 +139,12 @@ export const fetchStages = ({ state, dispatch }) => {
Loading
@@ -139,10 +139,12 @@ export const fetchStages = ({ state, dispatch }) => {
dispatch('requestStages'); dispatch('requestStages');
   
axios axios
.get(state.job.pipeline.path) .get(`${state.job.pipeline.path}.json`)
.then(({ data }) => { .then(({ data }) => {
// Set selected stage
dispatch('receiveStagesSuccess', data.details.stages); dispatch('receiveStagesSuccess', data.details.stages);
dispatch('fetchJobsForStage', data.details.stages[0]); const selectedStage = data.details.stages.find(stage => stage.name === state.selectedStage);
dispatch('fetchJobsForStage', selectedStage);
}) })
.catch(() => dispatch('receiveStagesError')); .catch(() => dispatch('receiveStagesError'));
}; };
Loading
@@ -156,11 +158,12 @@ export const receiveStagesError = ({ commit }) => {
Loading
@@ -156,11 +158,12 @@ export const receiveStagesError = ({ commit }) => {
/** /**
* Jobs list on sidebar - depend on stages dropdown * Jobs list on sidebar - depend on stages dropdown
*/ */
export const requestJobsForStage = ({ commit }) => commit(types.REQUEST_JOBS_FOR_STAGE); export const requestJobsForStage = ({ commit }, stage) =>
commit(types.REQUEST_JOBS_FOR_STAGE, stage);
   
// On stage click, set selected stage + fetch job // On stage click, set selected stage + fetch job
export const fetchJobsForStage = ({ dispatch }, stage) => { export const fetchJobsForStage = ({ dispatch }, stage) => {
dispatch('requestJobsForStage'); dispatch('requestJobsForStage', stage);
   
axios axios
.get(stage.dropdown_path, { .get(stage.dropdown_path, {
Loading
Loading
Loading
@@ -22,10 +22,10 @@ export const shouldRenderCalloutMessage = state =>
Loading
@@ -22,10 +22,10 @@ export const shouldRenderCalloutMessage = state =>
!_.isEmpty(state.job.status) && !_.isEmpty(state.job.callout_message); !_.isEmpty(state.job.status) && !_.isEmpty(state.job.callout_message);
   
/** /**
* When job has not started the key will be `false` * When job has not started the key will be null
* When job started the key will be a string with a date. * When job started the key will be a string with a date.
*/ */
export const jobHasStarted = state => !(state.job.started === false); export const shouldRenderTriggeredLabel = state => _.isString(state.job.started);
   
export const hasEnvironment = state => !_.isEmpty(state.job.deployment_status); export const hasEnvironment = state => !_.isEmpty(state.job.deployment_status);
   
Loading
Loading
Loading
@@ -53,6 +53,16 @@ export default {
Loading
@@ -53,6 +53,16 @@ export default {
state.isLoading = false; state.isLoading = false;
state.hasError = false; state.hasError = false;
state.job = job; state.job = job;
/**
* We only update it on the first request
* The dropdown can be changed by the user
* after the first request,
* and we do not want to hijack that
*/
if (state.selectedStage === 'More' && job.stage) {
state.selectedStage = job.stage;
}
}, },
[types.RECEIVE_JOB_ERROR](state) { [types.RECEIVE_JOB_ERROR](state) {
state.isLoading = false; state.isLoading = false;
Loading
@@ -81,8 +91,9 @@ export default {
Loading
@@ -81,8 +91,9 @@ export default {
state.stages = []; state.stages = [];
}, },
   
[types.REQUEST_JOBS_FOR_STAGE](state) { [types.REQUEST_JOBS_FOR_STAGE](state, stage) {
state.isLoadingJobs = true; state.isLoadingJobs = true;
state.selectedStage = stage.name;
}, },
[types.RECEIVE_JOBS_FOR_STAGE_SUCCESS](state, jobs) { [types.RECEIVE_JOBS_FOR_STAGE_SUCCESS](state, jobs) {
state.isLoadingJobs = false; state.isLoadingJobs = false;
Loading
Loading
import { __ } from '~/locale';
export default () => ({ export default () => ({
jobEndpoint: null, jobEndpoint: null,
traceEndpoint: null, traceEndpoint: null,
Loading
@@ -34,7 +36,7 @@ export default () => ({
Loading
@@ -34,7 +36,7 @@ export default () => ({
// sidebar dropdown // sidebar dropdown
isLoadingStages: false, isLoadingStages: false,
isLoadingJobs: false, isLoadingJobs: false,
selectedStage: null, selectedStage: __('More'),
stages: [], stages: [],
jobs: [], jobs: [],
}); });
Loading
@@ -94,6 +94,7 @@ export default {
Loading
@@ -94,6 +94,7 @@ export default {
class="diff-file file-holder" class="diff-file file-holder"
> >
<diff-file-header <diff-file-header
:discussion-path="discussion.discussionPath"
:diff-file="diffFile" :diff-file="diffFile"
:can-current-user-fork="false" :can-current-user-fork="false"
:discussions-expanded="isDiscussionsExpanded" :discussions-expanded="isDiscussionsExpanded"
Loading
Loading
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { glEmojiTag } from '~/emoji';
   
import detailedMetric from './detailed_metric.vue'; import detailedMetric from './detailed_metric.vue';
import requestSelector from './request_selector.vue'; import requestSelector from './request_selector.vue';
Loading
@@ -64,6 +65,16 @@ export default {
Loading
@@ -64,6 +65,16 @@ export default {
lineProfileModal() { lineProfileModal() {
return $('#modal-peek-line-profile'); return $('#modal-peek-line-profile');
}, },
hasHost() {
return this.currentRequest && this.currentRequest.details && this.currentRequest.details.host;
},
birdEmoji() {
if (this.hasHost && this.currentRequest.details.host.canary) {
return glEmojiTag('baby_chick');
}
return '';
},
}, },
mounted() { mounted() {
this.currentRequest = this.requestId; this.currentRequest = this.requestId;
Loading
@@ -93,9 +104,11 @@ export default {
Loading
@@ -93,9 +104,11 @@ export default {
class="view" class="view"
> >
<span <span
v-if="currentRequest.details" v-if="hasHost"
class="current-host" class="current-host"
:class="{ 'canary' : currentRequest.details.host.canary }"
> >
<span v-html="birdEmoji"></span>
{{ currentRequest.details.host.hostname }} {{ currentRequest.details.host.hostname }}
</span> </span>
</div> </div>
Loading
Loading
Loading
@@ -162,18 +162,20 @@
Loading
@@ -162,18 +162,20 @@
<span class="label-branch"> <span class="label-branch">
<a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a> <a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a>
</span> </span>
with <template v-if="mr.mergeCommitSha">
<a with
:href="mr.mergeCommitPath" <a
class="commit-sha js-mr-merged-commit-sha" :href="mr.mergeCommitPath"
v-text="mr.shortMergeCommitSha" class="commit-sha js-mr-merged-commit-sha"
> v-text="mr.shortMergeCommitSha"
</a> >
<clipboard-button </a>
:title="__('Copy commit SHA to clipboard')" <clipboard-button
:text="mr.mergeCommitSha" :title="__('Copy commit SHA to clipboard')"
css-class="btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha" :text="mr.mergeCommitSha"
/> css-class="btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha"
/>
</template>
</p> </p>
<p v-if="mr.sourceBranchRemoved"> <p v-if="mr.sourceBranchRemoved">
{{ s__("mrWidget|The source branch has been removed") }} {{ s__("mrWidget|The source branch has been removed") }}
Loading
Loading
Loading
@@ -12,6 +12,15 @@
Loading
@@ -12,6 +12,15 @@
max-width: $max-width; max-width: $max-width;
} }
   
/**
* Mixin for fixed width container
*/
@mixin fixed-width-container {
max-width: $limited-layout-width - ($gl-padding * 2);
margin-left: auto;
margin-right: auto;
}
/* /*
* Mixin for markdown tables * Mixin for markdown tables
*/ */
Loading
Loading
Loading
@@ -605,6 +605,7 @@ $perf-bar-development: #4c1210;
Loading
@@ -605,6 +605,7 @@ $perf-bar-development: #4c1210;
$perf-bar-bucket-bg: #111; $perf-bar-bucket-bg: #111;
$perf-bar-bucket-box-shadow-from: rgba($white-light, 0.2); $perf-bar-bucket-box-shadow-from: rgba($white-light, 0.2);
$perf-bar-bucket-box-shadow-to: rgba($black, 0.25); $perf-bar-bucket-box-shadow-to: rgba($black, 0.25);
$perf-bar-canary-text: $orange-400;
   
/* /*
Issuable warning Issuable warning
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment