Move retry button to sidebar

This commit is contained in:
Filipa Lacerda 2017-10-16 08:07:28 +00:00 committed by Phil Hughes
parent 2087f121bf
commit a4c726012c
5 changed files with 10 additions and 20 deletions

View File

@ -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;
},
},

View File

@ -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;

View File

@ -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')

View File

@ -0,0 +1,5 @@
---
title: Move retry button in job page to sidebar
merge_request:
author:
type: fixed

View File

@ -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'),