Commit 5aeefc13 authored by Douwe Maan's avatar Douwe Maan

Fix styling of mirror status

parent 80651c5a
- page_title "Mirror Repository"
.pull-right
- if @project.mirror_last_update_success?
Successfully updated #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
%span.prepend-left-10
= render "shared/mirror_update_button"
%h3.page-title
Mirror Repository
.pull-right
= render "shared/mirror_update_button"
%p.light
Set up your project to automatically have its branches and tags updated from an upstream repository every hour.
%hr.clearfix
- if @project.mirror?
- if @project.updating_mirror?
.alert.alert-info
%p The repository is being updated...
- case @project.mirror_last_update_status
- when :success
.alert.alert-success
%p The repository was successfully updated #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
- when :failed
.alert.alert-danger
%p The repository failed to be updated #{time_ago_with_tooltip(@project.mirror_last_update_at)}.
%pre.prepend-top-10
- if @project.mirror_last_update_failed?
.panel.panel-danger
.panel-heading
The repository failed to update #{time_ago_with_tooltip(@project.mirror_last_update_at)}.
- if @project.mirror_ever_updated_successfully?
Last successful update #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
.panel-body
%pre
:preserve
#{@project.import_error.try(:strip)}
- if @project.mirror_ever_updated_successfully?
.alert.alert-success
%p The repository was last successfully updated #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
= form_for @project, url: namespace_project_mirror_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f|
- if @project.errors.any?
.alert.alert-danger
......
......@@ -2,9 +2,6 @@
- when :success
Updated #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
- when :failed
- if @project.mirror_ever_updated_successfully?
Last successful update #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
- if can?(current_user, :admin_project, @project)
= link_to namespace_project_mirror_path(@project.namespace, @project) do
= icon("exclamation-triangle")
......@@ -12,3 +9,6 @@
- else
= icon("exclamation-triangle")
Failed to update #{time_ago_with_tooltip(@project.mirror_last_update_at)}.
- if @project.mirror_ever_updated_successfully?
Last successful update #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
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