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
875e9ff9
Commit
875e9ff9
authored
Nov 19, 2020
by
Mark Florian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract slot name constants from ReportSection
parent
f5bd4c28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
app/assets/javascripts/reports/components/report_section.vue
app/assets/javascripts/reports/components/report_section.vue
+4
-4
app/assets/javascripts/reports/constants.js
app/assets/javascripts/reports/constants.js
+8
-0
No files found.
app/assets/javascripts/reports/components/report_section.vue
View file @
875e9ff9
...
...
@@ -3,7 +3,7 @@ import { __ } from '~/locale';
import
StatusIcon
from
'
~/vue_merge_request_widget/components/mr_widget_status_icon.vue
'
;
import
Popover
from
'
~/vue_shared/components/help_popover.vue
'
;
import
IssuesList
from
'
./issues_list.vue
'
;
import
{
status
}
from
'
../constants
'
;
import
{
status
,
SLOT_SUCCESS
,
SLOT_LOADING
,
SLOT_ERROR
}
from
'
../constants
'
;
export
default
{
name
:
'
ReportSection
'
,
...
...
@@ -152,12 +152,12 @@ export default {
},
slotName
()
{
if
(
this
.
isSuccess
)
{
return
'
success
'
;
return
SLOT_SUCCESS
;
}
else
if
(
this
.
isLoading
)
{
return
'
loading
'
;
return
SLOT_LOADING
;
}
return
'
error
'
;
return
SLOT_ERROR
;
},
},
methods
:
{
...
...
app/assets/javascripts/reports/constants.js
View file @
875e9ff9
...
...
@@ -25,3 +25,11 @@ export const status = {
export
const
ACCESSIBILITY_ISSUE_ERROR
=
'
error
'
;
export
const
ACCESSIBILITY_ISSUE_WARNING
=
'
warning
'
;
/**
* Slot names for the ReportSection component, corresponding to the success,
* loading and error statuses.
*/
export
const
SLOT_SUCCESS
=
'
success
'
;
export
const
SLOT_LOADING
=
'
loading
'
;
export
const
SLOT_ERROR
=
'
error
'
;
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