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
c0a081a5
Commit
c0a081a5
authored
May 20, 2020
by
Olena Horal-Koretska
Committed by
Denys Mishunov
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix alerts table empty and loading row styling
parent
4c9d2e3a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
app/assets/javascripts/alert_management/components/alert_management_list.vue
...pts/alert_management/components/alert_management_list.vue
+7
-3
changelogs/unreleased/Remove-clickable-styling-from-loading-row.yml
.../unreleased/Remove-clickable-styling-from-loading-row.yml
+5
-0
spec/frontend/alert_management/components/alert_management_list_spec.js
...alert_management/components/alert_management_list_spec.js
+20
-0
No files found.
app/assets/javascripts/alert_management/components/alert_management_list.vue
View file @
c0a081a5
...
@@ -26,7 +26,6 @@ const bodyTrClass =
...
@@ -26,7 +26,6 @@ const bodyTrClass =
'
gl-border-1 gl-border-t-solid gl-border-gray-100 hover-bg-blue-50 hover-gl-cursor-pointer hover-gl-border-b-solid hover-gl-border-blue-200
'
;
'
gl-border-1 gl-border-t-solid gl-border-gray-100 hover-bg-blue-50 hover-gl-cursor-pointer hover-gl-border-b-solid hover-gl-border-blue-200
'
;
export
default
{
export
default
{
bodyTrClass
,
i18n
:
{
i18n
:
{
noAlertsMsg
:
s__
(
noAlertsMsg
:
s__
(
"
AlertManagement|No alerts available to display. If you think you're seeing this message in error, refresh the page.
"
,
"
AlertManagement|No alerts available to display. If you think you're seeing this message in error, refresh the page.
"
,
...
@@ -132,7 +131,6 @@ export default {
...
@@ -132,7 +131,6 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
alerts
:
null
,
errored
:
false
,
errored
:
false
,
isAlertDismissed
:
false
,
isAlertDismissed
:
false
,
isErrorAlertDismissed
:
false
,
isErrorAlertDismissed
:
false
,
...
@@ -149,6 +147,12 @@ export default {
...
@@ -149,6 +147,12 @@ export default {
loading
()
{
loading
()
{
return
this
.
$apollo
.
queries
.
alerts
.
loading
;
return
this
.
$apollo
.
queries
.
alerts
.
loading
;
},
},
hasAlerts
()
{
return
this
.
alerts
?.
length
;
},
tbodyTrClass
()
{
return
!
this
.
loading
&&
this
.
hasAlerts
?
bodyTrClass
:
''
;
},
},
},
methods
:
{
methods
:
{
filterAlertsByStatus
(
tabIndex
)
{
filterAlertsByStatus
(
tabIndex
)
{
...
@@ -210,7 +214,7 @@ export default {
...
@@ -210,7 +214,7 @@ export default {
:show-empty=
"true"
:show-empty=
"true"
:busy=
"loading"
:busy=
"loading"
stacked=
"md"
stacked=
"md"
:tbody-tr-class=
"
$options.
bodyTrClass"
:tbody-tr-class=
"
t
bodyTrClass"
@
row-clicked=
"navigateToAlertDetails"
@
row-clicked=
"navigateToAlertDetails"
>
>
<
template
#cell(severity)=
"{ item }"
>
<
template
#cell(severity)=
"{ item }"
>
...
...
changelogs/unreleased/Remove-clickable-styling-from-loading-row.yml
0 → 100644
View file @
c0a081a5
---
title
:
Fix loading and empty state styling for alerts list
merge_request
:
32531
author
:
type
:
fixed
spec/frontend/alert_management/components/alert_management_list_spec.js
View file @
c0a081a5
...
@@ -142,6 +142,11 @@ describe('AlertManagementList', () => {
...
@@ -142,6 +142,11 @@ describe('AlertManagementList', () => {
});
});
expect
(
findAlertsTable
().
exists
()).
toBe
(
true
);
expect
(
findAlertsTable
().
exists
()).
toBe
(
true
);
expect
(
findLoader
().
exists
()).
toBe
(
true
);
expect
(
findLoader
().
exists
()).
toBe
(
true
);
expect
(
findAlerts
()
.
at
(
0
)
.
classes
(),
).
not
.
toContain
(
'
hover-bg-blue-50
'
);
});
});
it
(
'
error state
'
,
()
=>
{
it
(
'
error state
'
,
()
=>
{
...
@@ -154,6 +159,11 @@ describe('AlertManagementList', () => {
...
@@ -154,6 +159,11 @@ describe('AlertManagementList', () => {
expect
(
findAlertsTable
().
text
()).
toContain
(
'
No alerts to display
'
);
expect
(
findAlertsTable
().
text
()).
toContain
(
'
No alerts to display
'
);
expect
(
findLoader
().
exists
()).
toBe
(
false
);
expect
(
findLoader
().
exists
()).
toBe
(
false
);
expect
(
findAlert
().
props
().
variant
).
toBe
(
'
danger
'
);
expect
(
findAlert
().
props
().
variant
).
toBe
(
'
danger
'
);
expect
(
findAlerts
()
.
at
(
0
)
.
classes
(),
).
not
.
toContain
(
'
hover-bg-blue-50
'
);
});
});
it
(
'
empty state
'
,
()
=>
{
it
(
'
empty state
'
,
()
=>
{
...
@@ -166,6 +176,11 @@ describe('AlertManagementList', () => {
...
@@ -166,6 +176,11 @@ describe('AlertManagementList', () => {
expect
(
findAlertsTable
().
text
()).
toContain
(
'
No alerts to display
'
);
expect
(
findAlertsTable
().
text
()).
toContain
(
'
No alerts to display
'
);
expect
(
findLoader
().
exists
()).
toBe
(
false
);
expect
(
findLoader
().
exists
()).
toBe
(
false
);
expect
(
findAlert
().
props
().
variant
).
toBe
(
'
info
'
);
expect
(
findAlert
().
props
().
variant
).
toBe
(
'
info
'
);
expect
(
findAlerts
()
.
at
(
0
)
.
classes
(),
).
not
.
toContain
(
'
hover-bg-blue-50
'
);
});
});
it
(
'
has data state
'
,
()
=>
{
it
(
'
has data state
'
,
()
=>
{
...
@@ -177,6 +192,11 @@ describe('AlertManagementList', () => {
...
@@ -177,6 +192,11 @@ describe('AlertManagementList', () => {
expect
(
findLoader
().
exists
()).
toBe
(
false
);
expect
(
findLoader
().
exists
()).
toBe
(
false
);
expect
(
findAlertsTable
().
exists
()).
toBe
(
true
);
expect
(
findAlertsTable
().
exists
()).
toBe
(
true
);
expect
(
findAlerts
()).
toHaveLength
(
mockAlerts
.
length
);
expect
(
findAlerts
()).
toHaveLength
(
mockAlerts
.
length
);
expect
(
findAlerts
()
.
at
(
0
)
.
classes
(),
).
toContain
(
'
hover-bg-blue-50
'
);
});
});
it
(
'
displays status dropdown
'
,
()
=>
{
it
(
'
displays status dropdown
'
,
()
=>
{
...
...
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