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

Fix styling of mirror status

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