Commit bf27639b authored by Kushal Pandya's avatar Kushal Pandya Committed by Gabriel Mazetto

Show full project name, show `Never` when values aren't available

parent 221715f1
......@@ -3,7 +3,7 @@
.card-header{ id: "project-#{project_registry.project.id}-header" }
.d-flex
%strong.header-text-primary.flex-fill
= project_registry.project.name
= project_registry.project.full_name
= link_to(recheck_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline btn-sm mr-2') do
= s_('Geo|Recheck')
= link_to(resync_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline-primary btn-sm') do
......@@ -15,17 +15,23 @@
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Status')
.project-status-content.status-type-failure
.project-status-content
= s_('Geo|In sync')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last successful sync')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.last_repository_successful_sync_at) if project_registry.last_repository_successful_sync_at
- if project_registry.last_repository_successful_sync_at
= distance_of_time_in_words(Time.now, project_registry.last_repository_successful_sync_at)
- else
= s_('Geo|Never')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last time verified')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.last_repository_check_at) if project_registry.last_repository_check_at
- if project_registry.last_repository_check_at
= distance_of_time_in_words(Time.now, project_registry.last_repository_check_at)
- else
= s_('Geo|Never')
= paginate @registries, theme: 'gitlab'
- @registries.each do |project_registry|
.card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project.id}-header" }
%h5.mb-0.mt-0.p-2.d-flex
%button.btn.btn-link.btn-card-header.d-flex.flex-fill{ type: 'button', data: { toggle: 'collapse', target: "#project-#{project_registry.project.id}" }, 'aria-expanded' => 'true', 'aria-controls' => "project-#{project_registry.project.id}" }
= sprite_icon('chevron-down', size: 18, css_class: 'card-expand-icon')
= sprite_icon('chevron-up', size: 18, css_class: 'card-collapse-icon')
%strong.header-text-primary
= project_registry.project.name
.d-flex
%strong.header-text-primary.flex-fill
= project_registry.project.full_name
- if project_registry.candidate_for_redownload?
= link_to(force_redownload_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline btn-sm mr-2') do
= s_('Geo|Redownload')
= link_to(resync_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline-primary btn-sm') do
= s_('Geo|Resync')
.collapse.show{ id: "project-#{project_registry.project.id}", 'aria-labelledby' => "project-#{project_registry.project.id}-header" }
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Status')
.project-status-content.status-type-failure
= s_('Geo|Failed')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Next sync scheduled at')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) if project_registry.repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last sync attempt')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.last_repository_synced_at) if project_registry.last_repository_synced_at
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Retry counts')
.project-status-content
= project_registry.repository_retry_count
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Status')
.project-status-content.status-type-failure
= s_('Geo|Failed')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Next sync scheduled at')
.project-status-content
- if project_registry.repository_retry_at
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at)
- else
= s_('Geo|Never')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last sync attempt')
.project-status-content
- if project_registry.last_repository_synced_at
= distance_of_time_in_words(Time.now, project_registry.last_repository_synced_at)
- else
= s_('Geo|Never')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Retry counts')
.project-status-content
= project_registry.repository_retry_count
.project-card-errors
.card-header.bg-transparent.border-bottom-0.border-top
%button.btn.btn-link.btn-card-header.collapsed.d-flex{ type: 'button',
data: { toggle: 'collapse', target: "#project-errors-#{project_registry.project.id}" },
'aria-expanded' => 'false',
'aria-controls' => "project-errors-#{project_registry.project.id}" }
= sprite_icon('chevron-down', size: 18, css_class: 'append-right-5 card-expand-icon')
= sprite_icon('chevron-up', size: 18, css_class: 'append-right-5 card-collapse-icon')
.header-text-secondary
More
.collapse{ id: "project-errors-#{project_registry.project.id}",
'aria-labelledby' => "project-#{project_registry.project.id}-header" }
.card-body
.container
%ul.unstyled-list.errors-list
- if project_registry.last_repository_sync_failure
%li.p-0.d-flex
= sprite_icon('warning', size: 18, css_class: 'error-icon')
%span.error-text.prepend-left-5
= s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure }
- if project_registry.last_repository_verification_failure
%li.p-0.d-flex
= sprite_icon('warning', size: 18, css_class: 'error-icon')
%span.error-text.prepend-left-5
= s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure }
.project-card-errors
.card-header.bg-transparent.border-bottom-0.border-top
%button.btn.btn-link.btn-card-header.collapsed.d-flex{ type: 'button',
data: { toggle: 'collapse', target: "#project-errors-#{project_registry.project.id}" },
'aria-expanded' => 'false',
'aria-controls' => "project-errors-#{project_registry.project.id}" }
= sprite_icon('chevron-down', size: 18, css_class: 'append-right-5 card-expand-icon')
= sprite_icon('chevron-up', size: 18, css_class: 'append-right-5 card-collapse-icon')
.header-text-secondary
More
.collapse{ id: "project-errors-#{project_registry.project.id}",
'aria-labelledby' => "project-#{project_registry.project.id}-header" }
.card-body
.container
%ul.unstyled-list.errors-list
- if project_registry.last_repository_sync_failure
%li.p-0.d-flex
= sprite_icon('warning', size: 18, css_class: 'error-icon')
%span.error-text.prepend-left-5
= s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure }
- if project_registry.last_repository_verification_failure
%li.p-0.d-flex
= sprite_icon('warning', size: 18, css_class: 'error-icon')
%span.error-text.prepend-left-5
= s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure }
= paginate @registries, theme: 'gitlab'
- @projects.each do |project|
.card.project-card.prepend-top-15
.card-header{ id: "project-#{project.id}-header" }
%h5.mb-0.mt-0.p-2.d-flex
%button.btn.btn-link.btn-card-header.d-flex.flex-fill{ type: 'button', data: { toggle: 'collapse', target: "#project-#{project.id}" }, 'aria-expanded' => 'true', 'aria-controls' => "project-#{project.id}" }
= sprite_icon('chevron-down', size: 18, css_class: 'card-expand-icon')
= sprite_icon('chevron-up', size: 18, css_class: 'card-collapse-icon')
%strong.header-text-primary
= project.name
.d-flex
%strong.header-text-primary.flex-fill
= project.full_name
.collapse.show{ id: "project-#{project.id}", 'aria-labelledby' => "project-#{project.id}-header" }
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Next sync scheduled at')
.project-status-content
= distance_of_time_in_words(Time.now, project.project_registry.repository_retry_at) if project.project_registry&.repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last sync attempt')
.project-status-content
= distance_of_time_in_words(Time.now, project.project_registry.last_repository_synced_at) if project.project_registry&.last_repository_synced_at
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Retry counts')
.project-status-content
= project.project_registry.repository_retry_count if project.project_registry
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Error message')
.project-status-content.font-weight-bold
= project.project_registry.last_repository_sync_failure if project.project_registry
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Next sync scheduled at')
.project-status-content
- if project.project_registry&.repository_retry_at
= distance_of_time_in_words(Time.now, project.project_registry.repository_retry_at)
- else
= s_('Geo|Never')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last sync attempt')
.project-status-content
- if project.project_registry&.last_repository_synced_at
= distance_of_time_in_words(Time.now, project.project_registry.last_repository_synced_at)
- else
= s_('Geo|Never')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Retry counts')
.project-status-content
= project.project_registry.repository_retry_count if project.project_registry
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Error message')
.project-status-content.font-weight-bold
- if project.project_registry
= project.project_registry.last_repository_sync_failure
- else
= s_('Geo|No errors')
= paginate @projects, theme: 'gitlab'
- @registries.each do |project_registry|
.card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project.id}-header" }
%h5.mb-0.mt-0.p-2.d-flex
%button.btn.btn-link.btn-card-header.d-flex.flex-fill{ type: 'button', data: { toggle: 'collapse', target: "#project-#{project_registry.project.id}" }, 'aria-expanded' => 'true', 'aria-controls' => "project-#{project_registry.project.id}" }
= sprite_icon('chevron-down', size: 18, css_class: 'card-expand-icon')
= sprite_icon('chevron-up', size: 18, css_class: 'card-collapse-icon')
%strong.header-text-primary
= project_registry.project.name
.d-flex
%strong.header-text-primary.flex-fill
= project_registry.project.full_name
= link_to(recheck_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline btn-sm mr-2') do
= s_('Geo|Recheck')
= link_to(resync_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline-primary btn-sm') do
= s_('Geo|Resync')
.collapse.show{ id: "project-#{project_registry.project.id}", 'aria-labelledby' => "project-#{project_registry.project.id}-header" }
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Status')
.project-status-content.status-type-failure
= s_('Geo|Pending')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Next sync scheduled at')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) if project_registry.repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last sync attempt')
.project-status-content
- if project_registry.last_repository_synced_at
= distance_of_time_in_words(Time.now, project_registry.last_repository_synced_at)
- else
= s_('Geo|Never')
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Status')
.project-status-content
= s_('Geo|Pending')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Next sync scheduled at')
.project-status-content
- if project_registry.repository_retry_at
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at)
- else
= s_('Geo|Never')
.col-sm.project-status-container
.project-status-title.text-muted
= s_('Geo|Last sync attempt')
.project-status-content
- if project_registry.last_repository_synced_at
= distance_of_time_in_words(Time.now, project_registry.last_repository_synced_at)
- else
= s_('Geo|Never')
= paginate @registries, theme: 'gitlab'
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