Commit 8ab6c621 authored by Zack Cuddy's avatar Zack Cuddy Committed by Paul Slaughter

Remove Geo Project/Upload css

This removes the container classes
Instead adding utility classes

https://gitlab.com/gitlab-org/gitlab/merge_requests/21284
parent 9bc4dfeb
...@@ -10,74 +10,16 @@ ...@@ -10,74 +10,16 @@
} }
} }
.geo-admin-projects, .project-card-errors {
.geo-admin-uploads,
.admin-projects {
.card-header {
.header-text-primary {
line-height: 28px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
.btn-card-header { .btn-card-header {
&:hover,
&:focus {
text-decoration: none;
}
&.collapsed { &.collapsed {
.card-collapse-icon { .card-collapse-icon {
display: none; display: none;
} }
}
&:not(.collapsed) {
.card-expand-icon { .card-expand-icon {
display: none; display: block;
}
}
}
.card-body {
.project-container,
.upload-container {
margin-left: 0;
padding-left: 0;
}
.geo-status-content {
&.status-type-success {
color: $green-600;
} }
&.status-type-failure {
color: $red-500;
}
}
@include media-breakpoint-down(xs) {
.project-status-container + .project-status-container,
.upload-status-container + .upload-status-container {
margin-top: 15px;
}
}
}
.errors-list {
li + li {
margin-top: 5px;
}
.error-icon,
.error-text {
color: $red-500;
}
.error-text {
line-height: 18px;
} }
} }
} }
...@@ -95,12 +95,12 @@ module EE ...@@ -95,12 +95,12 @@ module EE
def geo_registry_status(registry) def geo_registry_status(registry)
status_type = case registry.synchronization_state status_type = case registry.synchronization_state
when :failed then when :failed then
'status-type-failure' 'text-danger-500'
when :synced then when :synced then
'status-type-success' 'text-success-600'
end end
content_tag(:div, class: "geo-status-content #{status_type}") do content_tag(:div, class: "#{status_type}") do
icon = geo_registry_status_icon(registry) icon = geo_registry_status_icon(registry)
text = geo_registry_status_text(registry) text = geo_registry_status_text(registry)
......
- @registries.each do |project_registry| - @registries.each do |project_registry|
.card.project-card.prepend-top-15 .card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project_id}-header" } .card-header{ id: "project-#{project_registry.project_id}-header" }
.d-flex .d-flex.align-items-center
- if project_registry.project.nil? - if project_registry.project.nil?
= render partial: 'removed', locals: { project_registry: project_registry } = render partial: 'removed', locals: { project_registry: project_registry }
- else - else
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project) = link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project)
- unless project_registry.pending_verification? - unless project_registry.pending_verification?
= link_to(reverify_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do = link_to(reverify_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do
......
- @registries.each do |project_registry| - @registries.each do |project_registry|
.card.project-card.prepend-top-15 .card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project_id}-header" } .card-header{ id: "project-#{project_registry.project_id}-header" }
.d-flex .d-flex.align-items-center
- if project_registry.project.nil? - if project_registry.project.nil?
= render partial: 'removed', locals: { project_registry: project_registry } = render partial: 'removed', locals: { project_registry: project_registry }
- else - else
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project) = link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project)
- if project_registry.candidate_for_redownload? - if project_registry.candidate_for_redownload?
= link_to(force_redownload_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do = link_to(force_redownload_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do
......
- @registries.each do |project_registry| - @registries.each do |project_registry|
.card.project-card.prepend-top-15 .card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project_id}-header" } .card-header{ id: "project-#{project_registry.project_id}-header" }
.d-flex .d-flex.align-items-center
- if project_registry.project.nil? - if project_registry.project.nil?
= render partial: 'removed', locals: { project_registry: project_registry } = render partial: 'removed', locals: { project_registry: project_registry }
- else - else
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project) = link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project)
= render partial: 'registry_never', locals: { project_registry: project_registry } = render partial: 'registry_never', locals: { project_registry: project_registry }
......
- @registries.each do |project_registry| - @registries.each do |project_registry|
.card.project-card.prepend-top-15 .card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project_id}-header" } .card-header{ id: "project-#{project_registry.project_id}-header" }
.d-flex .d-flex.align-items-center
- if project_registry.project.nil? - if project_registry.project.nil?
= render partial: 'removed', locals: { project_registry: project_registry } = render partial: 'removed', locals: { project_registry: project_registry }
- else - else
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project) = link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project)
- unless project_registry.pending_verification? - unless project_registry.pending_verification?
= link_to(reverify_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do = link_to(reverify_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do
......
.card-body .card-body
.container.project-container .container.m-0.p-0
.row .row
.col-sm.project-status-container .col-sm
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Status') = s_('Geo|Status')
= geo_registry_status(project_registry) = geo_registry_status(project_registry)
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Next sync scheduled at') = s_('Geo|Next sync scheduled at')
.project-status-content .project-status-content
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) = distance_of_time_in_words(Time.now, project_registry.repository_retry_at)
- else - else
= s_('Geo|Waiting for scheduler') = s_('Geo|Waiting for scheduler')
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Last sync attempt') = s_('Geo|Last sync attempt')
.project-status-content .project-status-content
...@@ -28,28 +28,28 @@ ...@@ -28,28 +28,28 @@
data: { toggle: 'collapse', target: "#project-errors-#{project_registry.project_id}" }, data: { toggle: 'collapse', target: "#project-errors-#{project_registry.project_id}" },
'aria-expanded' => 'false', 'aria-expanded' => 'false',
'aria-controls' => "project-errors-#{project_registry.project_id}" } '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-down', size: 18, css_class: 'mr-2 card-expand-icon hide')
= sprite_icon('chevron-up', size: 18, css_class: 'append-right-5 card-collapse-icon') = sprite_icon('chevron-up', size: 18, css_class: 'mr-2 card-collapse-icon')
.header-text-secondary .header-text-secondary
More More
.collapse{ id: "project-errors-#{project_registry.project_id}", .collapse{ id: "project-errors-#{project_registry.project_id}",
'aria-labelledby' => "project-#{project_registry.project_id}-header" } 'aria-labelledby' => "project-#{project_registry.project_id}-header" }
.card-body .card-body
.container.project-container .container.m-0.p-0
.row .row
.col-sm-8.project-status-container .col-sm-8
%ul.unstyled-list.errors-list %ul.unstyled-list
- if project_registry.last_repository_sync_failure - if project_registry.last_repository_sync_failure
%li.p-0.d-flex %li.d-flex.text-danger-500
= sprite_icon('warning', size: 18, css_class: 'error-icon') = sprite_icon('warning', size: 18)
%span.error-text.prepend-left-5 %span.prepend-left-5
= s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure } = s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure }
- if project_registry.last_repository_verification_failure - if project_registry.last_repository_verification_failure
%li.p-0.d-flex %li.d-flex.text-danger-500
= sprite_icon('warning', size: 18, css_class: 'error-icon') = sprite_icon('warning', size: 18)
%span.error-text.prepend-left-5 %span.prepend-left-5
= s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure } = s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure }
.col-sm-4.project-status-container .col-sm-4.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Retry count') = s_('Geo|Retry count')
.project-status-content .project-status-content
......
.card-body .card-body
.container.project-container .container.m-0.p-0
.row .row
.col-sm.project-status-container .col-sm
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Status') = s_('Geo|Status')
= geo_registry_status(project_registry) = geo_registry_status(project_registry)
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Next sync scheduled at') = s_('Geo|Next sync scheduled at')
.project-status-content .project-status-content
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) = distance_of_time_in_words(Time.now, project_registry.repository_retry_at)
- else - else
= s_('Geo|Waiting for scheduler') = s_('Geo|Waiting for scheduler')
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Last sync attempt') = s_('Geo|Last sync attempt')
.project-status-content .project-status-content
...@@ -29,28 +29,28 @@ ...@@ -29,28 +29,28 @@
data: { toggle: 'collapse', target: "#project-errors-#{project_registry.project_id}" }, data: { toggle: 'collapse', target: "#project-errors-#{project_registry.project_id}" },
'aria-expanded' => 'false', 'aria-expanded' => 'false',
'aria-controls' => "project-errors-#{project_registry.project_id}" } '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-down', size: 18, css_class: 'mr-2 card-expand-icon hide')
= sprite_icon('chevron-up', size: 18, css_class: 'append-right-5 card-collapse-icon') = sprite_icon('chevron-up', size: 18, css_class: 'mr-2 card-collapse-icon')
.header-text-secondary .header-text-secondary
More More
.collapse{ id: "project-errors-#{project_registry.project_id}", .collapse{ id: "project-errors-#{project_registry.project_id}",
'aria-labelledby' => "project-#{project_registry.project_id}-header" } 'aria-labelledby' => "project-#{project_registry.project_id}-header" }
.card-body .card-body
.container.project-container .container.m-0.p-0
.row .row
.col-sm-8.project-status-container .col-sm-8
%ul.unstyled-list.errors-list %ul.unstyled-list
- if project_registry.last_repository_sync_failure - if project_registry.last_repository_sync_failure
%li.p-0.d-flex %li.d-flex.text-danger-500
= sprite_icon('warning', size: 18, css_class: 'error-icon') = sprite_icon('warning', size: 18)
%span.error-text.prepend-left-5 %span.prepend-left-5
= s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure } = s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure }
- if project_registry.last_repository_verification_failure - if project_registry.last_repository_verification_failure
%li.p-0.d-flex %li.d-flex.text-danger-500
= sprite_icon('warning', size: 18, css_class: 'error-icon') = sprite_icon('warning', size: 18)
%span.error-text.prepend-left-5 %span.prepend-left-5
= s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure } = s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure }
.col-sm-4.project-status-container .col-sm-4.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Retry count') = s_('Geo|Retry count')
.project-status-content .project-status-content
......
.card-body .card-body
.container.project-container .container.m-0.p-0
.row .row
.col-sm.project-status-container .col-sm
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Status') = s_('Geo|Status')
= geo_registry_status(project_registry) = geo_registry_status(project_registry)
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Next sync scheduled at') = s_('Geo|Next sync scheduled at')
.project-status-content .project-status-content
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) = distance_of_time_in_words(Time.now, project_registry.repository_retry_at)
- else - else
= s_('Geo|Waiting for scheduler') = s_('Geo|Waiting for scheduler')
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Last sync attempt') = s_('Geo|Last sync attempt')
.project-status-content .project-status-content
......
.card-body .card-body
.container.project-container .container.m-0.p-0
.row .row
.col-sm.project-status-container .col-sm
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Status') = s_('Geo|Status')
= geo_registry_status(project_registry) = geo_registry_status(project_registry)
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Last successful sync') = s_('Geo|Last successful sync')
.project-status-content .project-status-content
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= time_ago_with_tooltip(project_registry.last_repository_successful_sync_at, placement: 'bottom') = time_ago_with_tooltip(project_registry.last_repository_successful_sync_at, placement: 'bottom')
- else - else
= s_('Geo|Never') = s_('Geo|Never')
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Last time verified') = s_('Geo|Last time verified')
.project-status-content .project-status-content
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
= time_ago_with_tooltip(project_registry.last_repository_verification_ran_at, placement: 'bottom') = time_ago_with_tooltip(project_registry.last_repository_verification_ran_at, placement: 'bottom')
- else - else
= s_('Geo|Never') = s_('Geo|Never')
.col-sm.project-status-container .col-sm.mt-3.mt-sm-0
.project-status-title.text-muted .project-status-title.text-muted
= s_('Geo|Last repository check run') = s_('Geo|Last repository check run')
.project-status-content .project-status-content
......
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= s_('Geo|Project (ID: %{project_id}) no longer exists on the primary. It is safe to remove this entry, as this will not remove any data on disk.') % { project_id: project_registry.project_id } = s_('Geo|Project (ID: %{project_id}) no longer exists on the primary. It is safe to remove this entry, as this will not remove any data on disk.') % { project_id: project_registry.project_id }
= link_to(admin_geo_project_path(project_registry), data: { confirm: s_('Geo|Tracking entry will be removed. Are you sure?')}, method: :delete, class: 'btn btn-inverted btn-remove btn-sm') do = link_to(admin_geo_project_path(project_registry), data: { confirm: s_('Geo|Tracking entry will be removed. Are you sure?')}, method: :delete, class: 'btn btn-inverted btn-remove btn-sm') do
= s_('Geo|Remove') = s_('Geo|Remove')
- @registries.each do |project_registry| - @registries.each do |project_registry|
.card.project-card.prepend-top-15 .card.project-card.prepend-top-15
.card-header{ id: "project-#{project_registry.project_id}-header" } .card-header{ id: "project-#{project_registry.project_id}-header" }
.d-flex .d-flex.align-items-center
- if project_registry.project.nil? - if project_registry.project.nil?
= render partial: 'removed', locals: { project_registry: project_registry } = render partial: 'removed', locals: { project_registry: project_registry }
- else - else
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project) = link_to project_registry.project.full_name, admin_namespace_project_path(project_registry.project.namespace, project_registry.project)
= link_to(reverify_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do = link_to(reverify_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-default btn-sm mr-2') do
= s_('Geo|Reverify') = s_('Geo|Reverify')
......
- page_title 'Geo Projects' - page_title 'Geo Projects'
- @content_class = "geo-admin-projects"
- params[:sync_status] ||= [] - params[:sync_status] ||= []
.top-area.scrolling-tabs-container.inner-page-scroll-tabs .top-area.scrolling-tabs-container.inner-page-scroll-tabs
......
.card.upload-card.prepend-top-15 .card.upload-card.prepend-top-15
.card-header{ id: "upload-#{upload_registry.id}-header" } .card-header{ id: "upload-#{upload_registry.id}-header" }
.d-flex .d-flex
%strong.header-text-primary.flex-fill %strong.text-truncate.flex-fill
= upload_registry.file = upload_registry.file
- unless upload_registry.success? - unless upload_registry.success?
= link_to('sync_admin_geo_upload_path(upload_registry)', method: :post, class: 'btn btn-default btn-sm mr-2') do = link_to('sync_admin_geo_upload_path(upload_registry)', method: :post, class: 'btn btn-default btn-sm mr-2') do
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
= link_to(admin_geo_upload_path(upload_registry), data: { confirm: s_('Geo|Tracking entry will be removed. Are you sure?')}, method: :delete, class: 'btn btn-inverted btn-remove btn-sm') do = link_to(admin_geo_upload_path(upload_registry), data: { confirm: s_('Geo|Tracking entry will be removed. Are you sure?')}, method: :delete, class: 'btn btn-inverted btn-remove btn-sm') do
= s_('Geo|Remove') = s_('Geo|Remove')
.card-body .card-body
.container.upload-container .container.m-0.p-0
.row .row
.col-sm.upload-status-container .col-sm
.upload-status-title.text-muted .upload-status-title.text-muted
= s_('Geo|Status') = s_('Geo|Status')
= geo_registry_status(upload_registry) = geo_registry_status(upload_registry)
.col-sm.upload-status-container .col-sm.mt-3.mt-sm-0
.upload-status-title.text-muted .upload-status-title.text-muted
= s_('Geo|Synced at') = s_('Geo|Synced at')
.upload-status-content .upload-status-content
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- else - else
= s_('Geo|Never') = s_('Geo|Never')
- if upload_registry.project - if upload_registry.project
.col-sm.upload-status-container .col-sm.mt-3.mt-sm-0
.upload-status-title.text-muted .upload-status-title.text-muted
= s_('Geo|Project') = s_('Geo|Project')
.upload-status-content .upload-status-content
......
- page_title 'Geo Uploads' - page_title 'Geo Uploads'
- @content_class = "geo-admin-uploads"
- params[:sync_status] ||= [] - params[:sync_status] ||= []
%div{ class: container_class } .top-area.scrolling-tabs-container.inner-page-scroll-tabs
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
%ul.nav-links.nav.nav-tabs %ul.nav-links.nav.nav-tabs
- opts = params[:sync_status].present? ? {} : { page: admin_geo_uploads_path } - opts = params[:sync_status].present? ? {} : { page: admin_geo_uploads_path }
= nav_link(opts) do = nav_link(opts) do
...@@ -21,7 +19,7 @@ ...@@ -21,7 +19,7 @@
.nav-controls .nav-controls
= render(partial: 'shared/projects/search_form', autofocus: true) = render(partial: 'shared/projects/search_form', autofocus: true)
- @registries.each do |upload_registry| - @registries.each do |upload_registry|
= render partial: 'registry', locals: { upload_registry: upload_registry } = render partial: 'registry', locals: { upload_registry: upload_registry }
= paginate @registries, theme: 'gitlab' = 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