Commit a4c72601 authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Phil Hughes

Move retry button to sidebar

parent 2087f121
...@@ -43,16 +43,6 @@ ...@@ -43,16 +43,6 @@
type: 'link', 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; return actions;
}, },
}, },
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
} }
.right-sidebar { .right-sidebar {
a, a:not(.btn-retry),
.btn-link { .btn-link {
color: inherit; color: inherit;
} }
...@@ -459,7 +459,7 @@ ...@@ -459,7 +459,7 @@
} }
} }
a { a:not(.btn-retry) {
&:hover { &:hover {
color: $md-link-color; color: $md-link-color;
text-decoration: none; text-decoration: none;
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
.sidebar-container .sidebar-container
.blocks-container .blocks-container
.block .block
%strong %strong.prepend-top-10
= @build.name = @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' } %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') = 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', () => { ...@@ -30,7 +30,6 @@ describe('Job details header', () => {
email: 'foo@bar.com', email: 'foo@bar.com',
avatar_url: 'link', avatar_url: 'link',
}, },
retry_path: 'path',
new_issue_path: 'path', new_issue_path: 'path',
}, },
isLoading: false, isLoading: false,
...@@ -49,12 +48,6 @@ describe('Job details header', () => { ...@@ -49,12 +48,6 @@ describe('Job details header', () => {
).toEqual('failed Job #123 triggered 3 weeks ago by Foo'); ).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', () => { it('should render new issue link', () => {
expect( expect(
vm.$el.querySelector('.js-new-issue').getAttribute('href'), vm.$el.querySelector('.js-new-issue').getAttribute('href'),
......
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