Skip to content
Snippets Groups Projects
Commit 914ea32e authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 3546e1bb
No related branches found
No related tags found
No related merge requests found
Showing
with 99 additions and 20 deletions
# frozen_string_literal: true
 
require_relative 'lib/gitlab_danger'
require_relative 'lib/gitlab/danger/request_helper'
 
danger.import_plugin('danger/plugins/helper.rb')
danger.import_plugin('danger/plugins/roulette.rb')
Loading
Loading
<script>
export default {
props: {
signedIn: {
type: Boolean,
required: true,
},
sidebarStatusClass: {
type: String,
required: false,
default: '',
},
},
};
</script>
<template>
<aside
:class="sidebarStatusClass"
class="right-sidebar js-right-sidebar js-issuable-sidebar"
aria-live="polite"
></aside>
</template>
import Vue from 'vue';
import SidebarApp from './components/sidebar_app.vue';
export default () => {
const el = document.getElementById('js-vue-issuable-sidebar');
if (!el) {
return false;
}
const { sidebarStatusClass } = el.dataset;
// An empty string is present when user is signed in.
const signedIn = el.dataset.signedIn === '';
return new Vue({
el,
components: { SidebarApp },
render: createElement =>
createElement('sidebar-app', {
props: {
signedIn,
sidebarStatusClass,
},
}),
});
};
Loading
Loading
@@ -9,7 +9,7 @@ export default {
};
</script>
<template>
<div class="log-duration-badge rounded align-self-start px-2 ml-2 flex-shrink-0">
<div class="log-duration-badge rounded align-self-start px-2 ml-2 flex-shrink-0 ws-normal">
{{ duration }}
</div>
</template>
Loading
Loading
@@ -21,8 +21,12 @@ export default {
<template>
<div class="js-line log-line">
<line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" :class="content.style">{{
content.text
}}</span>
<span
v-for="(content, i) in line.content"
:key="i"
:class="content.style"
class="ws-pre-wrap"
>{{ content.text }}</span
>
</div>
</template>
Loading
Loading
@@ -43,15 +43,19 @@ export default {
 
<template>
<div
class="log-line collapsible-line d-flex justify-content-between"
class="log-line collapsible-line d-flex justify-content-between ws-normal"
role="button"
@click="handleOnClick"
>
<icon :name="iconName" class="arrow position-absolute" />
<line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" class="line-text" :class="content.style">{{
content.text
}}</span>
<span
v-for="(content, i) in line.content"
:key="i"
class="line-text w-100 ws-pre-wrap"
:class="content.style"
>{{ content.text }}</span
>
<duration-badge v-if="duration" :duration="duration" />
</div>
</template>
Loading
Loading
@@ -48,7 +48,7 @@ export default {
<template>
<gl-link
:id="lineNumberId"
class="d-inline-block text-right line-number"
class="d-inline-block text-right line-number flex-shrink-0"
:href="buildLineNumber"
>{{ parsedLineNumber }}</gl-link
>
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ export default {
state.isSidebarOpen = true;
},
 
[types.RECEIVE_TRACE_SUCCESS](state, log) {
[types.RECEIVE_TRACE_SUCCESS](state, log = {}) {
if (log.state) {
state.traceState = log.state;
}
Loading
Loading
Loading
Loading
@@ -416,7 +416,6 @@ export default {
<gl-button
v-if="showRearrangePanelsBtn"
:pressed="isRearrangingPanels"
new-style
variant="default"
class="mr-2 mt-1 js-rearrange-button"
@click="toggleRearrangingPanels"
Loading
Loading
@@ -426,7 +425,6 @@ export default {
<gl-button
v-if="addingMetricsAvailable"
v-gl-modal="$options.addMetric.modalId"
new-style
variant="outline-success"
class="mr-2 mt-1 js-add-metric-button"
>
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ import ZenMode from '~/zen_mode';
import '~/notes/index';
import initIssueableApp from '~/issue_show';
import initRelatedMergeRequestsApp from '~/related_merge_requests';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
 
export default function() {
initIssueableApp();
Loading
Loading
@@ -12,5 +13,9 @@ export default function() {
new Issue(); // eslint-disable-line no-new
new ShortcutsIssuable(); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar();
if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar();
}
}
Loading
Loading
@@ -3,5 +3,7 @@ import initShow from '../show';
 
document.addEventListener('DOMContentLoaded', () => {
initShow();
initSidebarBundle();
if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle();
}
});
Loading
Loading
@@ -4,11 +4,16 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
import { handleLocationHash } from '~/lib/utils/common_utils';
import howToMerge from '~/how_to_merge';
import initPipelines from '~/commit/pipelines/pipelines_bundle';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
import initWidget from '../../../vue_merge_request_widget';
 
export default function() {
new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar();
if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar();
}
initPipelines();
new ShortcutsIssuable(true); // eslint-disable-line no-new
handleLocationHash();
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@ import initShow from '../init_merge_request_show';
 
document.addEventListener('DOMContentLoaded', () => {
initShow();
initSidebarBundle();
if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle();
}
initMrNotes();
});
Loading
Loading
@@ -440,6 +440,7 @@ img.emoji {
.flex-no-shrink { flex-shrink: 0; }
.ws-initial { white-space: initial; }
.ws-normal { white-space: normal; }
.ws-pre-wrap { white-space: pre-wrap; }
.overflow-auto { overflow: auto; }
 
.d-flex-center {
Loading
Loading
Loading
Loading
@@ -9,7 +9,6 @@
border-radius: $border-radius-small;
min-height: 42px;
background-color: $builds-trace-bg;
white-space: pre-wrap;
}
 
.log-line {
Loading
Loading
Loading
Loading
@@ -104,7 +104,6 @@ class GroupsController < Groups::ApplicationController
redirect_to edit_group_path(@group, anchor: params[:update_section]), notice: "Group '#{@group.name}' was successfully updated."
else
@group.path = @group.path_before_last_save || @group.path_was
render action: "edit"
end
end
Loading
Loading
@@ -124,7 +123,7 @@ class GroupsController < Groups::ApplicationController
flash[:notice] = "Group '#{@group.name}' was successfully transferred."
redirect_to group_path(@group)
else
flash[:alert] = service.error
flash[:alert] = service.error.html_safe
redirect_to edit_group_path(@group)
end
end
Loading
Loading
Loading
Loading
@@ -42,6 +42,10 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :authorize_import_issues!, only: [:import_csv]
before_action :authorize_download_code!, only: [:related_branches]
 
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
end
respond_to :html
 
alias_method :designs, :show
Loading
Loading
Loading
Loading
@@ -21,6 +21,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:diffs_batch_load, @project)
end
 
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, @project.group)
end
around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions]
 
def index
Loading
Loading
Loading
Loading
@@ -184,7 +184,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
 
def show_represent_params
{ grouped: true }
{ grouped: true, expanded: params[:expanded].to_a.map(&:to_i) }
end
 
def create_params
Loading
Loading
Loading
Loading
@@ -42,6 +42,7 @@ module Ci
 
has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :job_id, dependent: :destroy, inverse_of: :job # rubocop:disable Cop/ActiveRecordDependent
has_many :job_variables, class_name: 'Ci::JobVariable', foreign_key: :job_id
has_many :sourced_pipelines, class_name: 'Ci::Sources::Pipeline', foreign_key: :source_job_id
 
Ci::JobArtifact.file_types.each do |key, value|
has_one :"job_artifacts_#{key}", -> { where(file_type: value) }, class_name: 'Ci::JobArtifact', inverse_of: :job, foreign_key: :job_id
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