CI: Pipelines on MR page have `Retry` and `Cancel` buttons in the same time

Summary

CI: Pipelines on MR page have Retry and Cancel buttons in the same time for failed jobs

Steps to reproduce

For example go to: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11027/pipelines

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

Possible fixes

I think Cancel button should not be present for failed jobs.