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
7e972b77
Commit
7e972b77
authored
Aug 22, 2020
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change event structure in vulnerability component
parent
5caab361
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
23 deletions
+17
-23
ee/app/assets/javascripts/vulnerabilities/components/header.vue
.../assets/javascripts/vulnerabilities/components/header.vue
+0
-9
ee/app/assets/javascripts/vulnerabilities/components/main.vue
...pp/assets/javascripts/vulnerabilities/components/main.vue
+17
-14
No files found.
ee/app/assets/javascripts/vulnerabilities/components/header.vue
View file @
7e972b77
...
...
@@ -209,15 +209,6 @@ export default {
});
},
},
created
()
{
this
.
$on
(
'
vulnerability-state-change
'
,
newState
=>
{
// Indicates that the event emitter does not know the new state
if
(
!
newState
)
{
this
.
refreshVulnerability
();
}
});
},
};
</
script
>
...
...
ee/app/assets/javascripts/vulnerabilities/components/main.vue
View file @
7e972b77
<
script
>
import
Vue
from
'
vue
'
;
import
{
VULNERABILITY_STATE_OBJECTS
}
from
'
ee/vulnerabilities/constants
'
;
import
VulnerabilityHeader
from
'
./header.vue
'
;
import
VulnerabilityDetails
from
'
./details.vue
'
;
import
VulnerabilityFooter
from
'
./footer.vue
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
VULNERABILITY_STATE_OBJECTS
}
from
'
ee/vulnerabilities/constants
'
;
export
default
{
// eslint-disable-next-line @gitlab/require-i18n-strings
name
:
'
Vulnerability
'
,
components
:
{
VulnerabilityHeader
,
VulnerabilityDetails
,
VulnerabilityFooter
},
...
...
@@ -19,7 +19,7 @@ export default {
},
computed
:
{
footerInfo
:
function
()
{
footerInfo
()
{
const
{
vulnerabilityFeedbackHelpPath
,
hasMr
,
...
...
@@ -29,7 +29,6 @@ export default {
issueFeedback
,
mergeRequestFeedback
,
notesUrl
,
project
,
projectFingerprint
,
remediations
,
reportType
,
...
...
@@ -76,9 +75,12 @@ export default {
},
methods
:
{
handleVulnerabilityStateChange
(
a
)
{
console
.
error
(
'
state-change
'
,
this
.
footerInfo
);
this
.
$refs
.
footer
.
fetchDiscussions
();
handleVulnerabilityStateChange
(
newState
)
{
if
(
newState
)
{
this
.
$refs
.
footer
.
fetchDiscussions
();
}
else
{
this
.
$refs
.
header
.
refreshVulnerability
();
}
},
},
};
...
...
@@ -87,14 +89,15 @@ export default {
<
template
>
<div>
<vulnerability-header
:initialVulnerability=
"vulnerability"
v-on:vulnerability-state-change=
"handleVulnerabilityStateChange"
></vulnerability-header>
<vulnerability-details
:vulnerability=
"vulnerability"
></vulnerability-details>
ref=
"header"
:initial-vulnerability=
"vulnerability"
@
vulnerability-state-change=
"handleVulnerabilityStateChange"
/>
<vulnerability-details
:vulnerability=
"vulnerability"
/>
<vulnerability-footer
v-bind=
"footerInfo"
v-on:vulnerability-state-change=
"handleVulnerabilityStateChange"
ref=
"footer"
></vulnerability-footer>
v-bind=
"footerInfo"
@
vulnerability-state-change=
"handleVulnerabilityStateChange"
/>
</div>
</
template
>
\ No newline at end of file
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