提交 a73e3295 编写于 作者: P Phil Hughes

Merge branch '27654-retry-button' into 'master'

Move retry button to sidebar

Closes #27654

See merge request gitlab-org/gitlab-ce!14873
......@@ -43,16 +43,6 @@
type: 'link',
});
}
if (this.job.retry_path) {
actions.push({
label: 'Retry',
path: this.job.retry_path,
cssClass: 'js-retry-button btn btn-inverted-secondary visible-md-block visible-lg-block',
type: 'ujs-link',
});
}
return actions;
},
},
......
......@@ -117,7 +117,7 @@
}
.right-sidebar {
a,
a:not(.btn-retry),
.btn-link {
color: inherit;
}
......@@ -459,7 +459,7 @@
}
}
a {
a:not(.btn-retry) {
&:hover {
color: $md-link-color;
text-decoration: none;
......
......@@ -4,8 +4,10 @@
.sidebar-container
.blocks-container
.block
%strong
%strong.prepend-top-10
= @build.name
- if can?(current_user, :update_build, @build) && @build.retryable?
= link_to "Retry", retry_namespace_project_job_path(@project.namespace, @project, @build), class: 'js-retry-button pull-right btn btn-inverted-secondary btn-retry visible-md-block visible-lg-block', method: :post
%a.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-build-toggle{ href: "#", 'aria-label': 'Toggle Sidebar', role: 'button' }
= icon('angle-double-right')
......
---
title: Move retry button in job page to sidebar
merge_request:
author:
type: fixed
......@@ -30,7 +30,6 @@ describe('Job details header', () => {
email: 'foo@bar.com',
avatar_url: 'link',
},
retry_path: 'path',
new_issue_path: 'path',
},
isLoading: false,
......@@ -49,12 +48,6 @@ describe('Job details header', () => {
).toEqual('failed Job #123 triggered 3 weeks ago by Foo');
});
it('should render retry link', () => {
expect(
vm.$el.querySelector('.js-retry-button').getAttribute('href'),
).toEqual(props.job.retry_path);
});
it('should render new issue link', () => {
expect(
vm.$el.querySelector('.js-new-issue').getAttribute('href'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册