Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b4f94d87
Commit
b4f94d87
authored
Jul 25, 2018
by
Kushal Pandya
Committed by
Gabriel Mazetto
Aug 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project card layout to support collapsible errors list
parent
754a8502
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
47 deletions
+96
-47
ee/app/assets/stylesheets/pages/geo_nodes.scss
ee/app/assets/stylesheets/pages/geo_nodes.scss
+34
-13
ee/app/views/admin/geo_nodes/_all.html.haml
ee/app/views/admin/geo_nodes/_all.html.haml
+59
-34
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/stylesheets/pages/geo_nodes.scss
View file @
b4f94d87
...
...
@@ -178,18 +178,23 @@
}
.geo-admin-projects
{
.card-header
{
.header-text-primary
,
.header-text-secondary
{
color
:
$gl-link-color
;
}
.header-text-primary
{
line-height
:
28px
;
}
}
.btn-card-header
{
&
:hover
,
&
:focus
{
text-decoration
:
none
;
}
.card-collapse-icon
,
.card-expand-icon
{
color
:
$gl-text-color
;
margin-right
:
5px
;
}
&
.collapsed
{
.card-collapse-icon
{
display
:
none
;
...
...
@@ -201,21 +206,37 @@
display
:
none
;
}
}
}
.header-text
{
color
:
$gl-link-color
;
.card-body
{
.project-status-content
{
&
.status-type-success
{
color
:
$gl-text-green
;
}
&
:hover
{
color
:
$gl-
link-hover-color
;
&
.status-type-failure
{
color
:
$gl-
text-red
;
}
}
}
.card-body
{
@include
media-breakpoint-down
(
xs
)
{
.project-status-container
+
.project-status-container
{
margin-top
:
10px
;
}
}
}
.errors-list
{
li
+
li
{
margin-top
:
5px
;
}
.error-icon
,
.error-text
{
color
:
$gl-text-red
;
}
.error-text
{
line-height
:
18px
;
}
}
}
ee/app/views/admin/geo_nodes/_all.html.haml
View file @
b4f94d87
-
@registries
.
each
do
|
project_registry
|
-
@registries
.
each
_with_index
do
|
project_registry
,
index
|
.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
=
project_registry
.
project
.
name
=
link_to
(
resync_project_admin_geo_nodes_path
(
project_registry
),
method: :post
)
do
%button
.btn.btn-outline-primary.btn-sm
{
type:
'button'
}
Resync
.d-flex
%strong
.header-text-primary.flex-fill
=
project_registry
.
project
.
name
=
link_to
(
resync_project_admin_geo_nodes_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline-primary btn-sm'
)
do
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
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
Last sync attempt
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_synced_at
)
.col-sm.project-status-container
.project-status-title.text-muted
Retry counts
.project-status-content
=
project_registry
.
repository_retry_count
.col-sm.project-status-container
.project-status-title.text-muted
Error message
.project-status-content.font-weight-bold
=
project_registry
.
last_repository_sync_failure
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
.project-status-content.status-type-failure
Failed
.col-sm.project-status-container
.project-status-title.text-muted
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
Last sync attempt
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_synced_at
)
.col-sm.project-status-container
.project-status-title.text-muted
Retry counts
.project-status-content
=
project_registry
.
repository_retry_count
.col-sm.project-status-container
.project-status-title.text-muted
Error message
.project-status-content.font-weight-bold
=
project_registry
.
last_repository_sync_failure
-
if
index
==
0
# change it to actual condition check so that this section shows up only when there are errors to show
.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
%li
.p-0.d-flex
=
sprite_icon
(
'warning'
,
size:
18
,
css_class:
'error-icon'
)
%span
.error-text.prepend-left-5
Synchronization failed - showing error message here
%li
.p-0.d-flex
=
sprite_icon
(
'warning'
,
size:
18
,
css_class:
'error-icon'
)
%span
.error-text.prepend-left-5
Verification failed - showing error message here
locale/gitlab.pot
View file @
b4f94d87
...
...
@@ -4342,6 +4342,9 @@ msgstr ""
msgid "Nav|Sign out and sign in with a different account"
msgstr ""
msgid "Never"
msgstr ""
msgid "Network"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment