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 # frozen_string_literal: true
   
require_relative 'lib/gitlab_danger' require_relative 'lib/gitlab_danger'
require_relative 'lib/gitlab/danger/request_helper'
   
danger.import_plugin('danger/plugins/helper.rb') danger.import_plugin('danger/plugins/helper.rb')
danger.import_plugin('danger/plugins/roulette.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
@@ -9,7 +9,7 @@ export default {
Loading
@@ -9,7 +9,7 @@ export default {
}; };
</script> </script>
<template> <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 }} {{ duration }}
</div> </div>
</template> </template>
Loading
@@ -21,8 +21,12 @@ export default {
Loading
@@ -21,8 +21,12 @@ export default {
<template> <template>
<div class="js-line log-line"> <div class="js-line log-line">
<line-number :line-number="line.lineNumber" :path="path" /> <line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" :class="content.style">{{ <span
content.text v-for="(content, i) in line.content"
}}</span> :key="i"
:class="content.style"
class="ws-pre-wrap"
>{{ content.text }}</span
>
</div> </div>
</template> </template>
Loading
@@ -43,15 +43,19 @@ export default {
Loading
@@ -43,15 +43,19 @@ export default {
   
<template> <template>
<div <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" role="button"
@click="handleOnClick" @click="handleOnClick"
> >
<icon :name="iconName" class="arrow position-absolute" /> <icon :name="iconName" class="arrow position-absolute" />
<line-number :line-number="line.lineNumber" :path="path" /> <line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" class="line-text" :class="content.style">{{ <span
content.text v-for="(content, i) in line.content"
}}</span> :key="i"
class="line-text w-100 ws-pre-wrap"
:class="content.style"
>{{ content.text }}</span
>
<duration-badge v-if="duration" :duration="duration" /> <duration-badge v-if="duration" :duration="duration" />
</div> </div>
</template> </template>
Loading
@@ -48,7 +48,7 @@ export default {
Loading
@@ -48,7 +48,7 @@ export default {
<template> <template>
<gl-link <gl-link
:id="lineNumberId" :id="lineNumberId"
class="d-inline-block text-right line-number" class="d-inline-block text-right line-number flex-shrink-0"
:href="buildLineNumber" :href="buildLineNumber"
>{{ parsedLineNumber }}</gl-link >{{ parsedLineNumber }}</gl-link
> >
Loading
Loading
Loading
@@ -19,7 +19,7 @@ export default {
Loading
@@ -19,7 +19,7 @@ export default {
state.isSidebarOpen = true; state.isSidebarOpen = true;
}, },
   
[types.RECEIVE_TRACE_SUCCESS](state, log) { [types.RECEIVE_TRACE_SUCCESS](state, log = {}) {
if (log.state) { if (log.state) {
state.traceState = log.state; state.traceState = log.state;
} }
Loading
Loading
Loading
@@ -416,7 +416,6 @@ export default {
Loading
@@ -416,7 +416,6 @@ export default {
<gl-button <gl-button
v-if="showRearrangePanelsBtn" v-if="showRearrangePanelsBtn"
:pressed="isRearrangingPanels" :pressed="isRearrangingPanels"
new-style
variant="default" variant="default"
class="mr-2 mt-1 js-rearrange-button" class="mr-2 mt-1 js-rearrange-button"
@click="toggleRearrangingPanels" @click="toggleRearrangingPanels"
Loading
@@ -426,7 +425,6 @@ export default {
Loading
@@ -426,7 +425,6 @@ export default {
<gl-button <gl-button
v-if="addingMetricsAvailable" v-if="addingMetricsAvailable"
v-gl-modal="$options.addMetric.modalId" v-gl-modal="$options.addMetric.modalId"
new-style
variant="outline-success" variant="outline-success"
class="mr-2 mt-1 js-add-metric-button" class="mr-2 mt-1 js-add-metric-button"
> >
Loading
Loading
Loading
@@ -5,6 +5,7 @@ import ZenMode from '~/zen_mode';
Loading
@@ -5,6 +5,7 @@ import ZenMode from '~/zen_mode';
import '~/notes/index'; import '~/notes/index';
import initIssueableApp from '~/issue_show'; import initIssueableApp from '~/issue_show';
import initRelatedMergeRequestsApp from '~/related_merge_requests'; import initRelatedMergeRequestsApp from '~/related_merge_requests';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
   
export default function() { export default function() {
initIssueableApp(); initIssueableApp();
Loading
@@ -12,5 +13,9 @@ export default function() {
Loading
@@ -12,5 +13,9 @@ export default function() {
new Issue(); // eslint-disable-line no-new new Issue(); // eslint-disable-line no-new
new ShortcutsIssuable(); // eslint-disable-line no-new new ShortcutsIssuable(); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar(); if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar();
}
} }
Loading
@@ -3,5 +3,7 @@ import initShow from '../show';
Loading
@@ -3,5 +3,7 @@ import initShow from '../show';
   
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initShow(); initShow();
initSidebarBundle(); if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle();
}
}); });
Loading
@@ -4,11 +4,16 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
Loading
@@ -4,11 +4,16 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
import { handleLocationHash } from '~/lib/utils/common_utils'; import { handleLocationHash } from '~/lib/utils/common_utils';
import howToMerge from '~/how_to_merge'; import howToMerge from '~/how_to_merge';
import initPipelines from '~/commit/pipelines/pipelines_bundle'; import initPipelines from '~/commit/pipelines/pipelines_bundle';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
import initWidget from '../../../vue_merge_request_widget'; import initWidget from '../../../vue_merge_request_widget';
   
export default function() { export default function() {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar(); if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar();
}
initPipelines(); initPipelines();
new ShortcutsIssuable(true); // eslint-disable-line no-new new ShortcutsIssuable(true); // eslint-disable-line no-new
handleLocationHash(); handleLocationHash();
Loading
Loading
Loading
@@ -4,6 +4,8 @@ import initShow from '../init_merge_request_show';
Loading
@@ -4,6 +4,8 @@ import initShow from '../init_merge_request_show';
   
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initShow(); initShow();
initSidebarBundle(); if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle();
}
initMrNotes(); initMrNotes();
}); });
Loading
@@ -440,6 +440,7 @@ img.emoji {
Loading
@@ -440,6 +440,7 @@ img.emoji {
.flex-no-shrink { flex-shrink: 0; } .flex-no-shrink { flex-shrink: 0; }
.ws-initial { white-space: initial; } .ws-initial { white-space: initial; }
.ws-normal { white-space: normal; } .ws-normal { white-space: normal; }
.ws-pre-wrap { white-space: pre-wrap; }
.overflow-auto { overflow: auto; } .overflow-auto { overflow: auto; }
   
.d-flex-center { .d-flex-center {
Loading
Loading
Loading
@@ -9,7 +9,6 @@
Loading
@@ -9,7 +9,6 @@
border-radius: $border-radius-small; border-radius: $border-radius-small;
min-height: 42px; min-height: 42px;
background-color: $builds-trace-bg; background-color: $builds-trace-bg;
white-space: pre-wrap;
} }
   
.log-line { .log-line {
Loading
Loading
Loading
@@ -104,7 +104,6 @@ class GroupsController < Groups::ApplicationController
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." redirect_to edit_group_path(@group, anchor: params[:update_section]), notice: "Group '#{@group.name}' was successfully updated."
else else
@group.path = @group.path_before_last_save || @group.path_was @group.path = @group.path_before_last_save || @group.path_was
render action: "edit" render action: "edit"
end end
end end
Loading
@@ -124,7 +123,7 @@ class GroupsController < Groups::ApplicationController
Loading
@@ -124,7 +123,7 @@ class GroupsController < Groups::ApplicationController
flash[:notice] = "Group '#{@group.name}' was successfully transferred." flash[:notice] = "Group '#{@group.name}' was successfully transferred."
redirect_to group_path(@group) redirect_to group_path(@group)
else else
flash[:alert] = service.error flash[:alert] = service.error.html_safe
redirect_to edit_group_path(@group) redirect_to edit_group_path(@group)
end end
end end
Loading
Loading
Loading
@@ -42,6 +42,10 @@ class Projects::IssuesController < Projects::ApplicationController
Loading
@@ -42,6 +42,10 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :authorize_import_issues!, only: [:import_csv] before_action :authorize_import_issues!, only: [:import_csv]
before_action :authorize_download_code!, only: [:related_branches] before_action :authorize_download_code!, only: [:related_branches]
   
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
end
respond_to :html respond_to :html
   
alias_method :designs, :show alias_method :designs, :show
Loading
Loading
Loading
@@ -21,6 +21,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
Loading
@@ -21,6 +21,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:diffs_batch_load, @project) push_frontend_feature_flag(:diffs_batch_load, @project)
end 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] around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions]
   
def index def index
Loading
Loading
Loading
@@ -184,7 +184,7 @@ class Projects::PipelinesController < Projects::ApplicationController
Loading
@@ -184,7 +184,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end end
   
def show_represent_params def show_represent_params
{ grouped: true } { grouped: true, expanded: params[:expanded].to_a.map(&:to_i) }
end end
   
def create_params def create_params
Loading
Loading
Loading
@@ -42,6 +42,7 @@ module Ci
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_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 :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| 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 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