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
8bfb21ac
Commit
8bfb21ac
authored
Sep 16, 2020
by
Tristan Read
Committed by
Natalia Tepluhina
Sep 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove custom alert table formatting
parent
3c20647e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
50 deletions
+29
-50
app/assets/javascripts/vue_shared/components/alert_details_table.vue
...javascripts/vue_shared/components/alert_details_table.vue
+29
-6
app/assets/stylesheets/pages/alert_management/details.scss
app/assets/stylesheets/pages/alert_management/details.scss
+0
-44
No files found.
app/assets/javascripts/vue_shared/components/alert_details_table.vue
View file @
8bfb21ac
<
script
>
import
{
GlLoadingIcon
,
GlTable
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
capitalizeFirstCharacter
,
convertToSentenceCase
,
splitCamelCase
,
}
from
'
~/lib/utils/text_utility
'
;
const
thClass
=
'
gl-bg-transparent! gl-border-1! gl-border-b-solid! gl-border-gray-200!
'
;
const
tdClass
=
'
gl-border-gray-100! gl-p-5!
'
;
export
default
{
components
:
{
...
...
@@ -18,27 +26,42 @@ export default {
required
:
true
,
},
},
tableHeader
:
{
[
s__
(
'
AlertManagement|Key
'
)]:
s__
(
'
AlertManagement|Value
'
),
},
fields
:
[
{
key
:
'
fieldName
'
,
label
:
s__
(
'
AlertManagement|Key
'
),
thClass
,
tdClass
,
formatter
:
string
=>
capitalizeFirstCharacter
(
convertToSentenceCase
(
splitCamelCase
(
string
))),
},
{
key
:
'
value
'
,
thClass
:
`
${
thClass
}
w-60p`
,
tdClass
,
label
:
s__
(
'
AlertManagement|Value
'
),
},
],
computed
:
{
items
()
{
if
(
!
this
.
alert
)
{
return
[];
}
return
[{
...
this
.
$options
.
tableHeader
,
...
this
.
alert
}];
return
Object
.
entries
(
this
.
alert
).
map
(([
fieldName
,
value
])
=>
({
fieldName
,
value
,
}));
},
},
};
</
script
>
<
template
>
<gl-table
class=
"alert-management-details-table
gl-mb-0!
"
class=
"alert-management-details-table"
:busy=
"loading"
:empty-text=
"s__('AlertManagement|No alert data to display.')"
:items=
"items"
:fields=
"$options.fields"
show-empty
stacked
>
<template
#table-busy
>
<gl-loading-icon
size=
"lg"
color=
"dark"
class=
"gl-mt-5"
/>
...
...
app/assets/stylesheets/pages/alert_management/details.scss
View file @
8bfb21ac
.alert-management-details
{
// these styles need to be deleted once GlTable component looks in GitLab same as in @gitlab/ui
table
{
tr
{
td
{
@include
gl-border-0
;
@include
gl-p-5
;
border-color
:
transparent
;
&
:not
(
:last-child
)
{
border-bottom
:
1px
solid
$table-border-color
;
}
&
:first-child
{
div
{
font-weight
:
bold
;
}
}
&
:not
(
:first-child
)
{
&
:
:
before
{
color
:
$gray-500
;
font-weight
:
normal
!
important
;
}
div
{
color
:
$gray-500
;
}
}
@include
media-breakpoint-up
(
sm
)
{
div
{
text-align
:
left
!
important
;
}
}
}
&
:last-child
{
&
:
:
after
{
content
:
none
!
important
;
}
}
}
}
@include
media-breakpoint-down
(
xs
)
{
.alert-details-incident-button
{
width
:
100%
;
...
...
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