Commit 556a026c authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-11-09

# Conflicts:
#	app/views/clusters/clusters/_sidebar.html.haml
#	lib/gitlab/background_migration/redact_links.rb
#	locale/gitlab.pot

[ci skip]
parents 7cf18825 4aa41d07
...@@ -1135,7 +1135,6 @@ review: ...@@ -1135,7 +1135,6 @@ review:
- download_gitlab_chart - download_gitlab_chart
- ensure_namespace - ensure_namespace
- install_tiller - install_tiller
- create_secret
- install_external_dns - install_external_dns
- deploy - deploy
environment: environment:
......
<script> <script>
import _ from 'underscore'; import _ from 'underscore';
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { GlLink, GlButton } from '@gitlab-org/gitlab-ui';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import { timeIntervalInWords } from '~/lib/utils/datetime_utility'; import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
...@@ -21,6 +22,8 @@ export default { ...@@ -21,6 +22,8 @@ export default {
TriggerBlock, TriggerBlock,
StagesDropdown, StagesDropdown,
JobsContainer, JobsContainer,
GlLink,
GlButton,
}, },
mixins: [timeagoMixin], mixins: [timeagoMixin],
props: { props: {
...@@ -115,7 +118,7 @@ export default { ...@@ -115,7 +118,7 @@ export default {
<strong class="inline prepend-top-8"> <strong class="inline prepend-top-8">
{{ job.name }} {{ job.name }}
</strong> </strong>
<a <gl-link
v-if="job.retry_path" v-if="job.retry_path"
:class="retryButtonClass" :class="retryButtonClass"
:href="job.retry_path" :href="job.retry_path"
...@@ -123,8 +126,8 @@ export default { ...@@ -123,8 +126,8 @@ export default {
rel="nofollow" rel="nofollow"
> >
{{ __('Retry') }} {{ __('Retry') }}
</a> </gl-link>
<a <gl-link
v-if="job.terminal_path" v-if="job.terminal_path"
:href="job.terminal_path" :href="job.terminal_path"
class="js-terminal-link pull-right btn btn-primary class="js-terminal-link pull-right btn btn-primary
...@@ -133,8 +136,8 @@ export default { ...@@ -133,8 +136,8 @@ export default {
> >
{{ __('Debug') }} {{ __('Debug') }}
<icon name="external-link" /> <icon name="external-link" />
</a> </gl-link>
<button <gl-button
:aria-label="__('Toggle Sidebar')" :aria-label="__('Toggle Sidebar')"
type="button" type="button"
class="btn btn-blank gutter-toggle class="btn btn-blank gutter-toggle
...@@ -146,20 +149,20 @@ export default { ...@@ -146,20 +149,20 @@ export default {
data-hidden="true" data-hidden="true"
class="fa fa-angle-double-right" class="fa fa-angle-double-right"
></i> ></i>
</button> </gl-button>
</div> </div>
<div <div
v-if="job.retry_path || job.new_issue_path" v-if="job.retry_path || job.new_issue_path"
class="block retry-link" class="block retry-link"
> >
<a <gl-link
v-if="job.new_issue_path" v-if="job.new_issue_path"
:href="job.new_issue_path" :href="job.new_issue_path"
class="js-new-issue btn btn-success btn-inverted" class="js-new-issue btn btn-success btn-inverted"
> >
{{ __('New issue') }} {{ __('New issue') }}
</a> </gl-link>
<a <gl-link
v-if="job.retry_path" v-if="job.retry_path"
:href="job.retry_path" :href="job.retry_path"
class="js-retry-job btn btn-inverted-secondary" class="js-retry-job btn btn-inverted-secondary"
...@@ -167,7 +170,7 @@ export default { ...@@ -167,7 +170,7 @@ export default {
rel="nofollow" rel="nofollow"
> >
{{ __('Retry') }} {{ __('Retry') }}
</a> </gl-link>
</div> </div>
<div :class="{ block : renderBlock }"> <div :class="{ block : renderBlock }">
<p <p
...@@ -177,9 +180,9 @@ export default { ...@@ -177,9 +180,9 @@ export default {
<span class="build-light-text"> <span class="build-light-text">
{{ __('Merge Request:') }} {{ __('Merge Request:') }}
</span> </span>
<a :href="job.merge_request.path"> <gl-link :href="job.merge_request.path">
!{{ job.merge_request.iid }} !{{ job.merge_request.iid }}
</a> </gl-link>
</p> </p>
<detail-row <detail-row
...@@ -244,14 +247,14 @@ export default { ...@@ -244,14 +247,14 @@ export default {
v-if="job.cancel_path" v-if="job.cancel_path"
class="btn-group prepend-top-5" class="btn-group prepend-top-5"
role="group"> role="group">
<a <gl-link
:href="job.cancel_path" :href="job.cancel_path"
class="js-cancel-job btn btn-sm btn-default" class="js-cancel-job btn btn-sm btn-default"
data-method="post" data-method="post"
rel="nofollow" rel="nofollow"
> >
{{ __('Cancel') }} {{ __('Cancel') }}
</a> </gl-link>
</div> </div>
</div> </div>
......
<script> <script>
import { GlButton } from '@gitlab-org/gitlab-ui';
export default { export default {
components: {
GlButton,
},
props: { props: {
trigger: { trigger: {
type: Object, type: Object,
...@@ -41,15 +46,14 @@ export default { ...@@ -41,15 +46,14 @@ export default {
</p> </p>
<p v-if="hasVariables"> <p v-if="hasVariables">
<button <gl-button
v-if="!areVariablesVisible" v-if="!areVariablesVisible"
type="button" type="button"
class="btn btn-default group js-reveal-variables" class="btn btn-default group js-reveal-variables"
@click="revealVariables" @click="revealVariables"
> >
{{ __('Reveal Variables') }} {{ __('Reveal Variables') }}
</button> </gl-button>
</p> </p>
<dl <dl
......
...@@ -448,7 +448,7 @@ Please check your network connection and try again.`; ...@@ -448,7 +448,7 @@ Please check your network connection and try again.`;
<div class="discussion-with-resolve-btn"> <div class="discussion-with-resolve-btn">
<button <button
type="button" type="button"
class="js-vue-discussion-reply btn btn-text-field mr-2 qa-discussion-reply" class="js-vue-discussion-reply btn btn-text-field mr-sm-2 qa-discussion-reply"
title="Add a reply" title="Add a reply"
@click="showReplyForm" @click="showReplyForm"
> >
...@@ -457,7 +457,7 @@ Please check your network connection and try again.`; ...@@ -457,7 +457,7 @@ Please check your network connection and try again.`;
<div v-if="discussion.resolvable"> <div v-if="discussion.resolvable">
<button <button
type="button" type="button"
class="btn btn-default mx-sm-2" class="btn btn-default mr-sm-2"
@click="resolveHandler()" @click="resolveHandler()"
> >
<i <i
...@@ -470,7 +470,7 @@ Please check your network connection and try again.`; ...@@ -470,7 +470,7 @@ Please check your network connection and try again.`;
</div> </div>
<div <div
v-if="discussion.resolvable" v-if="discussion.resolvable"
class="btn-group discussion-actions" class="btn-group discussion-actions ml-sm-2"
role="group" role="group"
> >
<div <div
......
<script> <script>
import { GlButton } from '@gitlab-org/gitlab-ui';
export default { export default {
name: 'PipelinesEmptyState', name: 'PipelinesEmptyState',
components: {
GlButton,
},
props: { props: {
helpPagePath: { helpPagePath: {
type: String, type: String,
...@@ -41,12 +46,13 @@ export default { ...@@ -41,12 +46,13 @@ export default {
</p> </p>
<div class="text-center"> <div class="text-center">
<a <gl-button
:href="helpPagePath" :href="helpPagePath"
class="btn btn-primary js-get-started-pipelines" variant="primary"
class="js-get-started-pipelines"
> >
{{ s__('Pipelines|Get started with Pipelines') }} {{ s__('Pipelines|Get started with Pipelines') }}
</a> </gl-button>
</div> </div>
</template> </template>
......
<script> <script>
import { GlLink, GlButton } from '@gitlab-org/gitlab-ui';
import LoadingButton from '../../vue_shared/components/loading_button.vue'; import LoadingButton from '../../vue_shared/components/loading_button.vue';
export default { export default {
name: 'PipelineNavControls', name: 'PipelineNavControls',
components: { components: {
LoadingButton, LoadingButton,
GlLink,
GlButton,
}, },
props: { props: {
newPipelinePath: { newPipelinePath: {
...@@ -40,28 +43,29 @@ export default { ...@@ -40,28 +43,29 @@ export default {
</script> </script>
<template> <template>
<div class="nav-controls"> <div class="nav-controls">
<a <gl-button
v-if="newPipelinePath" v-if="newPipelinePath"
:href="newPipelinePath" :href="newPipelinePath"
class="btn btn-success js-run-pipeline" variant="success"
class="js-run-pipeline"
> >
{{ s__('Pipelines|Run Pipeline') }} {{ s__('Pipelines|Run Pipeline') }}
</a> </gl-button>
<loading-button <loading-button
v-if="resetCachePath" v-if="resetCachePath"
:loading="isResetCacheButtonLoading" :loading="isResetCacheButtonLoading"
:label="s__('Pipelines|Clear Runner Caches')" :label="s__('Pipelines|Clear Runner Caches')"
class="btn btn-default js-clear-cache" class="js-clear-cache"
@click="onClickResetCache" @click="onClickResetCache"
/> />
<a <gl-button
v-if="ciLintPath" v-if="ciLintPath"
:href="ciLintPath" :href="ciLintPath"
class="btn btn-default js-ci-lint" class="js-ci-lint"
> >
{{ s__('Pipelines|CI Lint') }} {{ s__('Pipelines|CI Lint') }}
</a> </gl-button>
</div> </div>
</template> </template>
<script> <script>
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import { GlLink, GlTooltipDirective } from '@gitlab-org/gitlab-ui';
import tooltip from '../../vue_shared/directives/tooltip'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import popover from '../../vue_shared/directives/popover'; import popover from '~/vue_shared/directives/popover';
export default { export default {
components: { components: {
userAvatarLink, UserAvatarLink,
GlLink,
}, },
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
popover, popover,
}, },
props: { props: {
...@@ -47,11 +48,12 @@ export default { ...@@ -47,11 +48,12 @@ export default {
</script> </script>
<template> <template>
<div class="table-section section-15 d-none d-sm-none d-md-block pipeline-tags"> <div class="table-section section-15 d-none d-sm-none d-md-block pipeline-tags">
<a <gl-link
:href="pipeline.path" :href="pipeline.path"
class="js-pipeline-url-link"> class="js-pipeline-url-link"
>
<span class="pipeline-id">#{{ pipeline.id }}</span> <span class="pipeline-id">#{{ pipeline.id }}</span>
</a> </gl-link>
<span>by</span> <span>by</span>
<user-avatar-link <user-avatar-link
v-if="user" v-if="user"
...@@ -68,36 +70,41 @@ export default { ...@@ -68,36 +70,41 @@ export default {
<div class="label-container"> <div class="label-container">
<span <span
v-if="pipeline.flags.latest" v-if="pipeline.flags.latest"
v-tooltip v-gl-tooltip
class="js-pipeline-url-latest badge badge-success" class="js-pipeline-url-latest badge badge-success"
title="Latest pipeline for this branch"> title="Latest pipeline for this branch"
>
latest latest
</span> </span>
<span <span
v-if="pipeline.flags.yaml_errors" v-if="pipeline.flags.yaml_errors"
v-tooltip v-gl-tooltip
:title="pipeline.yaml_errors" :title="pipeline.yaml_errors"
class="js-pipeline-url-yaml badge badge-danger"> class="js-pipeline-url-yaml badge badge-danger"
>
yaml invalid yaml invalid
</span> </span>
<span <span
v-if="pipeline.flags.failure_reason" v-if="pipeline.flags.failure_reason"
v-tooltip v-gl-tooltip
:title="pipeline.failure_reason" :title="pipeline.failure_reason"
class="js-pipeline-url-failure badge badge-danger"> class="js-pipeline-url-failure badge badge-danger"
>
error error
</span> </span>
<a <gl-link
v-if="pipeline.flags.auto_devops" v-if="pipeline.flags.auto_devops"
v-popover="popoverOptions" v-popover="popoverOptions"
tabindex="0" tabindex="0"
class="js-pipeline-url-autodevops badge badge-info autodevops-badge" class="js-pipeline-url-autodevops badge badge-info autodevops-badge"
role="button"> role="button"
>
Auto DevOps Auto DevOps
</a> </gl-link>
<span <span
v-if="pipeline.flags.stuck" v-if="pipeline.flags.stuck"
class="js-pipeline-url-stuck badge badge-warning"> class="js-pipeline-url-stuck badge badge-warning"
>
stuck stuck
</span> </span>
</div> </div>
......
<script> <script>
import { GlButton, GlTooltipDirective, GlLoadingIcon } from '@gitlab-org/gitlab-ui';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import Icon from '../../vue_shared/components/icon.vue'; import Icon from '../../vue_shared/components/icon.vue';
import tooltip from '../../vue_shared/directives/tooltip';
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
import { GlLoadingIcon } from '@gitlab-org/gitlab-ui';
export default { export default {
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
Icon, Icon,
GlCountdown, GlCountdown,
GlButton,
GlLoadingIcon, GlLoadingIcon,
}, },
props: { props: {
...@@ -59,14 +59,12 @@ export default { ...@@ -59,14 +59,12 @@ export default {
</script> </script>
<template> <template>
<div class="btn-group"> <div class="btn-group">
<button <gl-button
v-tooltip v-gl-tooltip
:disabled="isLoading" :disabled="isLoading"
type="button"
class="dropdown-new btn btn-default js-pipeline-dropdown-manual-actions" class="dropdown-new btn btn-default js-pipeline-dropdown-manual-actions"
title="Manual job" title="Manual job"
data-toggle="dropdown" data-toggle="dropdown"
data-placement="top"
aria-label="Manual job" aria-label="Manual job"
> >
<icon <icon
...@@ -78,17 +76,16 @@ export default { ...@@ -78,17 +76,16 @@ export default {
aria-hidden="true"> aria-hidden="true">
</i> </i>
<gl-loading-icon v-if="isLoading" /> <gl-loading-icon v-if="isLoading" />
</button> </gl-button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li <li
v-for="action in actions" v-for="action in actions"
:key="action.path" :key="action.path"
> >
<button <gl-button
:class="{ disabled: isActionDisabled(action) }" :class="{ disabled: isActionDisabled(action) }"
:disabled="isActionDisabled(action)" :disabled="isActionDisabled(action)"
type="button"
class="js-pipeline-action-link no-btn btn" class="js-pipeline-action-link no-btn btn"
@click="onClickAction(action)" @click="onClickAction(action)"
> >
...@@ -100,7 +97,7 @@ export default { ...@@ -100,7 +97,7 @@ export default {
<icon name="clock" /> <icon name="clock" />
<gl-countdown :end-date-string="action.scheduled_at" /> <gl-countdown :end-date-string="action.scheduled_at" />
</span> </span>
</button> </gl-button>
</li> </li>
</ul> </ul>
</div> </div>
......
<script> <script>
import tooltip from '../../vue_shared/directives/tooltip'; import { GlLink, GlButton, GlTooltipDirective } from '@gitlab-org/gitlab-ui';
import Icon from '../../vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
Icon, Icon,
GlLink,
GlButton,
}, },
props: { props: {
artifacts: { artifacts: {
...@@ -22,11 +24,10 @@ export default { ...@@ -22,11 +24,10 @@ export default {
class="btn-group" class="btn-group"
role="group" role="group"
> >
<button <gl-button
v-tooltip v-gl-tooltip
class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download" class="dropdown-toggle build-artifacts js-pipeline-dropdown-download"
title="Artifacts" title="Artifacts"
data-placement="top"
data-toggle="dropdown" data-toggle="dropdown"
aria-label="Artifacts" aria-label="Artifacts"
> >
...@@ -36,18 +37,19 @@ export default { ...@@ -36,18 +37,19 @@ export default {
aria-hidden="true" aria-hidden="true"
> >
</i> </i>
</button> </gl-button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li <li
v-for="(artifact, i) in artifacts" v-for="(artifact, i) in artifacts"
:key="i"> :key="i"
<a >
<gl-link
:href="artifact.path" :href="artifact.path"
rel="nofollow" rel="nofollow"
download download
> >
Download {{ artifact.name }} artifacts Download {{ artifact.name }} artifacts
</a> </gl-link>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -12,20 +12,18 @@ ...@@ -12,20 +12,18 @@
* css-class="btn-transparent" * css-class="btn-transparent"
* /> * />
*/ */
import tooltip from '../directives/tooltip'; import { GlButton, GlTooltipDirective } from '@gitlab-org/gitlab-ui';
import Icon from '../components/icon.vue'; import Icon from '../components/icon.vue';
export default { export default {
name: 'ClipboardButton', name: 'ClipboardButton',
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
GlButton,
Icon, Icon,
}, },
props: { props: {
text: { text: {
type: String, type: String,
...@@ -68,16 +66,12 @@ export default { ...@@ -68,16 +66,12 @@ export default {
</script> </script>
<template> <template>
<button <gl-button
v-tooltip v-gl-tooltip="{ placement: tooltipPlacement, container: tooltipContainer }"
:class="cssClass" :class="cssClass"
:title="title" :title="title"
:data-clipboard-text="clipboardText" :data-clipboard-text="clipboardText"
:data-container="tooltipContainer"
:data-placement="tooltipPlacement"
type="button"
class="btn"
> >
<icon name="duplicate" /> <icon name="duplicate" />
</button> </gl-button>
</template> </template>
...@@ -595,7 +595,6 @@ $note-form-margin-left: 70px; ...@@ -595,7 +595,6 @@ $note-form-margin-left: 70px;
.discussion-actions { .discussion-actions {
float: right; float: right;
margin-left: 10px;
color: $gray-darkest; color: $gray-darkest;
@include media-breakpoint-down(xs) { @include media-breakpoint-down(xs) {
......
.pages-domain-list { .pages-domain-list {
&-item { &-item {
position: relative;
display: flex;
align-items: center; align-items: center;
.domain-status { .domain-status {
...@@ -44,8 +42,9 @@ ...@@ -44,8 +42,9 @@
} }
:first-child { :first-child {
border-bottom-left-radius: $border-radius-default; border-bottom-right-radius: 0;
border-top-left-radius: $border-radius-default; border-top-right-radius: 0;
line-height: $gl-line-height;
} }
:not(:first-child) { :not(:first-child) {
......
...@@ -44,7 +44,7 @@ module Clusters ...@@ -44,7 +44,7 @@ module Clusters
private private
def install_script def install_script
["/usr/bin/kubectl apply -f #{ISTIO_CRDS} >/dev/null"] ["/usr/bin/kubectl apply -f #{ISTIO_CRDS}"]
end end
end end
end end
......
...@@ -24,8 +24,12 @@ module Commits ...@@ -24,8 +24,12 @@ module Commits
start_project: @start_project, start_project: @start_project,
start_branch_name: @start_branch) start_branch_name: @start_branch)
rescue Gitlab::Git::Repository::CreateTreeError rescue Gitlab::Git::Repository::CreateTreeError
error_msg = "Sorry, we cannot #{action.to_s.dasherize} this #{@commit.change_type_title(current_user)} automatically. act = action.to_s.dasherize
This #{@commit.change_type_title(current_user)} may already have been #{action.to_s.dasherize}ed, or a more recent commit may have updated some of its content." type = @commit.change_type_title(current_user)
error_msg = "Sorry, we cannot #{act} this #{type} automatically. " \
"This #{type} may already have been #{act}ed, or a more recent " \
"commit may have updated some of its content."
raise ChangeError, error_msg raise ChangeError, error_msg
end end
end end
......
<<<<<<< HEAD
- autodevops_help_url = help_page_path('topics/autodevops/index.md', anchor: 'using-multiple-kubernetes-clusters-premium') - autodevops_help_url = help_page_path('topics/autodevops/index.md', anchor: 'using-multiple-kubernetes-clusters-premium')
- help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe
- help_link_end = '</a>'.html_safe - help_link_end = '</a>'.html_safe
=======
>>>>>>> upstream/master
%h4.prepend-top-0 %h4.prepend-top-0
= s_('ClusterIntegration|Add a Kubernetes cluster integration') = s_('ClusterIntegration|Add a Kubernetes cluster integration')
%p %p
= clusterable.sidebar_text = clusterable.sidebar_text
%p %p
= clusterable.learn_more_link = clusterable.learn_more_link
<<<<<<< HEAD
%p %p
= s_('ClusterIntegration|If you are setting up multiple clusters and are using Auto DevOps, %{help_link_start}read this first%{help_link_end}.').html_safe % { help_link_start: help_link_start % { url: autodevops_help_url }, help_link_end: help_link_end } = s_('ClusterIntegration|If you are setting up multiple clusters and are using Auto DevOps, %{help_link_start}read this first%{help_link_end}.').html_safe % { help_link_start: help_link_start % { url: autodevops_help_url }, help_link_end: help_link_end }
=======
>>>>>>> upstream/master
= form_for @project, url: namespace_project_pages_path(@project.namespace.becomes(Namespace), @project), html: { class: 'inline', title: pages_https_only_title } do |f| = form_for @project, url: namespace_project_pages_path(@project.namespace.becomes(Namespace), @project), html: { class: 'inline', title: pages_https_only_title } do |f|
= f.check_box :pages_https_only, class: 'float-left', disabled: pages_https_only_disabled? .form-group
.form-check
.prepend-left-20 = f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
= f.label :pages_https_only, class: pages_https_only_label_class do = f.label :pages_https_only, class: pages_https_only_label_class do
%strong Force domains with SSL certificates to use HTTPS %strong Force domains with SSL certificates to use HTTPS
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
.card .card
.card-header .card-header
Domains (#{@domains.count}) Domains (#{@domains.count})
%ul.content-list.pages-domain-list{ class: ("has-verification-status" if verification_enabled) } %ul.list-group.list-group-flush.pages-domain-list{ class: ("has-verification-status" if verification_enabled) }
- @domains.each do |domain| - @domains.each do |domain|
%li.pages-domain-list-item.unstyled %li.pages-domain-list-item.list-group-item.d-flex.justify-content-between
- if verification_enabled - if verification_enabled
- tooltip, status = domain.unverified? ? [_('Unverified'), 'failed'] : [_('Verified'), 'success'] - tooltip, status = domain.unverified? ? [_('Unverified'), 'failed'] : [_('Verified'), 'success']
.domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip } .domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= domain.url = domain.url
= icon('external-link') = icon('external-link')
- if domain.subject - if domain.subject
%p %div
%span.badge.badge-gray Certificate: #{domain.subject} %span.badge.badge-gray Certificate: #{domain.subject}
- if domain.expired? - if domain.expired?
%span.badge.badge-danger Expired %span.badge.badge-danger Expired
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
= link_to 'Details', project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped" = link_to 'Details', project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped"
= link_to 'Remove', project_pages_domain_path(@project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped" = link_to 'Remove', project_pages_domain_path(@project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
- if verification_enabled && domain.unverified? - if verification_enabled && domain.unverified?
%li.warning-row %li.list-group-item.bs-callout-warning
#{domain.domain} is not verified. To learn how to verify ownership, visit your #{domain.domain} is not verified. To learn how to verify ownership, visit your
#{link_to 'domain details', project_pages_domain_path(@project, domain)}. #{link_to 'domain details', project_pages_domain_path(@project, domain)}.
---
title: Fixing regression issues on pages settings and details
merge_request: 22821
author:
type: fixed
---
title: Uses new gitlab-ui components in Jobs and Pipelines components
merge_request:
author:
type: other
---
title: Enable even more frozen string in lib/gitlab/**/*.rb
merge_request:
author: gfyoung
type: performance
---
title: Resolve possible cherry pick API race condition
merge_request:
author:
type: fixed
---
title: Add revert to commits API
merge_request: 22919
author:
type: added
...@@ -62,7 +62,7 @@ installations, this can be set in `gitlab-shell/config.yml`. ...@@ -62,7 +62,7 @@ installations, this can be set in `gitlab-shell/config.yml`.
The hooks are searched and executed in this order: The hooks are searched and executed in this order:
1. `<project>.git/hooks/` - symlink to `gitlab-shell/hooks` global dir 1. `gitlab-shell/hooks` directory as known to Gitaly
1. `<project>.git/hooks/<hook_name>` - executed by `git` itself, this is `gitlab-shell/hooks/<hook_name>` 1. `<project>.git/hooks/<hook_name>` - executed by `git` itself, this is `gitlab-shell/hooks/<hook_name>`
1. `<project>.git/custom_hooks/<hook_name>` - per project hook (this is already existing behavior) 1. `<project>.git/custom_hooks/<hook_name>` - per project hook (this is already existing behavior)
1. `<project>.git/custom_hooks/<hook_name>.d/*` - per project hooks 1. `<project>.git/custom_hooks/<hook_name>.d/*` - per project hooks
......
...@@ -288,6 +288,47 @@ Example response: ...@@ -288,6 +288,47 @@ Example response:
} }
``` ```
## Revert a commit
> [Introduced][ce-22919] in GitLab 11.6.
Reverts a commit in a given branch.
```
POST /projects/:id/repository/commits/:sha/revert
```
Parameters:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
| `sha` | string | yes | Commit SHA to revert |
| `branch` | string | yes | Target branch name |
```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/a738f717824ff53aebad8b090c1b79a14f2bd9e8/revert"
```
Example response:
```json
{
"id":"8b090c1b79a14f2bd9e8a738f717824ff53aebad",
"short_id": "8b090c1b",
"title":"Revert \"Feature added\"",
"created_at":"2018-11-08T15:55:26.000Z",
"parent_ids":["a738f717824ff53aebad8b090c1b79a14f2bd9e8"],
"message":"Revert \"Feature added\"\n\nThis reverts commit a738f717824ff53aebad8b090c1b79a14f2bd9e8",
"author_name":"Administrator",
"author_email":"admin@example.com",
"authored_date":"2018-11-08T15:55:26.000Z",
"committer_name":"Administrator",
"committer_email":"admin@example.com",
"committed_date":"2018-11-08T15:55:26.000Z"
}
```
## Get the diff of a commit ## Get the diff of a commit
Get the diff of a commit in a project. Get the diff of a commit in a project.
...@@ -619,3 +660,4 @@ Example response: ...@@ -619,3 +660,4 @@ Example response:
[ce-8047]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8047 [ce-8047]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8047
[ce-15026]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15026 [ce-15026]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15026
[ce-18004]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18004 [ce-18004]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18004
[ce-22919]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22919
...@@ -194,11 +194,47 @@ module API ...@@ -194,11 +194,47 @@ module API
branch_name: params[:branch] branch_name: params[:branch]
} }
result = ::Commits::CherryPickService.new(user_project, current_user, commit_params).execute result = ::Commits::CherryPickService
.new(user_project, current_user, commit_params)
.execute
if result[:status] == :success if result[:status] == :success
branch = find_branch!(params[:branch]) present user_project.repository.commit(result[:result]),
present user_project.repository.commit(branch.dereferenced_target), with: Entities::Commit with: Entities::Commit
else
render_api_error!(result[:message], 400)
end
end
desc 'Revert a commit in a branch' do
detail 'This feature was introduced in GitLab 11.6'
success Entities::Commit
end
params do
requires :sha, type: String, desc: 'Commit SHA to revert'
requires :branch, type: String, desc: 'Target branch name', allow_blank: false
end
post ':id/repository/commits/:sha/revert', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do
authorize_push_to_branch!(params[:branch])
commit = user_project.commit(params[:sha])
not_found!('Commit') unless commit
find_branch!(params[:branch])
commit_params = {
commit: commit,
start_branch: params[:branch],
branch_name: params[:branch]
}
result = ::Commits::RevertService
.new(user_project, current_user, commit_params)
.execute
if result[:status] == :success
present user_project.repository.commit(result[:result]),
with: Entities::Commit
else else
render_api_error!(result[:message], 400) render_api_error!(result[:message], 400)
end end
......
...@@ -6,8 +6,11 @@ require_relative 'redact_links/redactable' ...@@ -6,8 +6,11 @@ require_relative 'redact_links/redactable'
module Gitlab module Gitlab
module BackgroundMigration module BackgroundMigration
class RedactLinks class RedactLinks
<<<<<<< HEAD
prepend EE::Gitlab::BackgroundMigration::RedactLinks prepend EE::Gitlab::BackgroundMigration::RedactLinks
=======
>>>>>>> upstream/master
class Note < ActiveRecord::Base class Note < ActiveRecord::Base
include EachBatch include EachBatch
include ::Gitlab::BackgroundMigration::RedactLinks::Redactable include ::Gitlab::BackgroundMigration::RedactLinks::Redactable
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Conflict module Conflict
class File class File
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Conflict module Conflict
class FileCollection class FileCollection
......
# frozen_string_literal: true
module Gitlab module Gitlab
class CrossProjectAccess class CrossProjectAccess
class CheckCollection class CheckCollection
......
# frozen_string_literal: true
module Gitlab module Gitlab
class CrossProjectAccess class CrossProjectAccess
class CheckInfo class CheckInfo
......
# frozen_string_literal: true
module Gitlab module Gitlab
class CrossProjectAccess class CrossProjectAccess
module ClassMethods module ClassMethods
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class BaseEventFetcher class BaseEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module BaseQuery module BaseQuery
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class BaseStage class BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class CodeEventFetcher < BaseEventFetcher class CodeEventFetcher < BaseEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class CodeStage < BaseStage class CodeStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module EventFetcher module EventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class IssueEventFetcher < BaseEventFetcher class IssueEventFetcher < BaseEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class IssueStage < BaseStage class IssueStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module MetricsTables module MetricsTables
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class Permissions class Permissions
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class PlanEventFetcher < BaseEventFetcher class PlanEventFetcher < BaseEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class PlanStage < BaseStage class PlanStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class ProductionEventFetcher < IssueEventFetcher class ProductionEventFetcher < IssueEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module ProductionHelper module ProductionHelper
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class ProductionStage < BaseStage class ProductionStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class ReviewEventFetcher < BaseEventFetcher class ReviewEventFetcher < BaseEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class ReviewStage < BaseStage class ReviewStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module Stage module Stage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class StageSummary class StageSummary
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class StagingEventFetcher < BaseEventFetcher class StagingEventFetcher < BaseEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class StagingStage < BaseStage class StagingStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module Summary module Summary
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module Summary module Summary
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module Summary module Summary
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module Summary module Summary
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class TestEventFetcher < StagingEventFetcher class TestEventFetcher < StagingEventFetcher
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class TestStage < BaseStage class TestStage < BaseStage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class Updater class Updater
......
# frozen_string_literal: true
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class UsageData class UsageData
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DataBuilder module DataBuilder
module Build module Build
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DataBuilder module DataBuilder
module Note module Note
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DataBuilder module DataBuilder
module Pipeline module Pipeline
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DataBuilder module DataBuilder
module Push module Push
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DataBuilder module DataBuilder
module Repository module Repository
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DataBuilder module DataBuilder
module WikiPage module WikiPage
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module ArelMethods module ArelMethods
......
# frozen_string_literal: true
# For large tables, PostgreSQL can take a long time to count rows due to MVCC. # For large tables, PostgreSQL can take a long time to count rows due to MVCC.
# We can optimize this by using the reltuples count as described in https://wiki.postgresql.org/wiki/Slow_Counting. # We can optimize this by using the reltuples count as described in https://wiki.postgresql.org/wiki/Slow_Counting.
module Gitlab module Gitlab
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module DateTime module DateTime
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
# Model that can be used for querying permissions of a SQL user. # Model that can be used for querying permissions of a SQL user.
......
# frozen_string_literal: true
# https://www.periscopedata.com/blog/medians-in-sql.html # https://www.periscopedata.com/blog/medians-in-sql.html
module Gitlab module Gitlab
module Database module Database
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module MigrationHelpers module MigrationHelpers
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module MultiThreadedMigration module MultiThreadedMigration
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
# Module that can be injected into a ActiveRecord::Relation to make it # Module that can be injected into a ActiveRecord::Relation to make it
......
# frozen_string_literal: true
# This module can be included in migrations to make it easier to rename paths # This module can be included in migrations to make it easier to rename paths
# of `Namespace` & `Project` models certain paths would become `reserved`. # of `Namespace` & `Project` models certain paths would become `reserved`.
# #
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module RenameReservedPathsMigration module RenameReservedPathsMigration
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module RenameReservedPathsMigration module RenameReservedPathsMigration
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module RenameReservedPathsMigration module RenameReservedPathsMigration
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module RenameReservedPathsMigration module RenameReservedPathsMigration
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
BINARY_TYPE = BINARY_TYPE =
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class BaseLinker class BaseLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class CartfileLinker < MethodLinker class CartfileLinker < MethodLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
module Cocoapods module Cocoapods
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class ComposerJsonLinker < PackageJsonLinker class ComposerJsonLinker < PackageJsonLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class GemfileLinker < MethodLinker class GemfileLinker < MethodLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class GemspecLinker < MethodLinker class GemspecLinker < MethodLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class GodepsJsonLinker < JsonLinker class GodepsJsonLinker < JsonLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class JsonLinker < BaseLinker class JsonLinker < BaseLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class MethodLinker < BaseLinker class MethodLinker < BaseLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class PackageJsonLinker < JsonLinker class PackageJsonLinker < JsonLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class PodfileLinker < GemfileLinker class PodfileLinker < GemfileLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class PodspecJsonLinker < JsonLinker class PodspecJsonLinker < JsonLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class PodspecLinker < MethodLinker class PodspecLinker < MethodLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module DependencyLinker module DependencyLinker
class RequirementsTxtLinker < BaseLinker class RequirementsTxtLinker < BaseLinker
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Diff module Diff
class DiffRefs class DiffRefs
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Diff module Diff
class File class File
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Diff module Diff
module FileCollection module FileCollection
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Diff module Diff
module FileCollection module FileCollection
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Diff module Diff
module FileCollection module FileCollection
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Diff module Diff
module FileCollection module FileCollection
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment