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
5caab361
Commit
5caab361
authored
Aug 22, 2020
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove now unused vulnerability component parts
parent
cd341b33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
108 deletions
+1
-108
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
...pts/pages/projects/security/vulnerabilities/show/index.js
+1
-104
ee/app/views/projects/security/vulnerabilities/show.html.haml
...pp/views/projects/security/vulnerabilities/show.html.haml
+0
-4
No files found.
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
View file @
5caab361
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
MainApp
from
'
ee/vulnerabilities/components/main.vue
'
;
import
MainApp
from
'
ee/vulnerabilities/components/main.vue
'
;
import
HeaderApp
from
'
ee/vulnerabilities/components/header.vue
'
;
import
DetailsApp
from
'
ee/vulnerabilities/components/details.vue
'
;
import
FooterApp
from
'
ee/vulnerabilities/components/footer.vue
'
;
import
{
VULNERABILITY_STATE_OBJECTS
}
from
'
ee/vulnerabilities/constants
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
function
createHeaderApp
()
{
const
el
=
document
.
getElementById
(
'
js-vulnerability-header
'
);
const
vulnerability
=
JSON
.
parse
(
el
.
dataset
.
vulnerability
);
return
new
Vue
({
el
,
render
:
h
=>
h
(
HeaderApp
,
{
props
:
{
initialVulnerability
:
vulnerability
,
},
}),
});
}
function
createDetailsApp
()
{
const
el
=
document
.
getElementById
(
'
js-vulnerability-details
'
);
const
vulnerability
=
JSON
.
parse
(
el
.
dataset
.
vulnerability
);
return
new
Vue
({
el
,
render
:
h
=>
h
(
DetailsApp
,
{
props
:
{
vulnerability
}
}),
});
}
function
createFooterApp
()
{
const
el
=
document
.
getElementById
(
'
js-vulnerability-footer
'
);
if
(
!
el
)
{
return
false
;
}
const
{
vulnerabilityFeedbackHelpPath
,
hasMr
,
discussionsUrl
,
createIssueUrl
,
state
,
issueFeedback
,
mergeRequestFeedback
,
notesUrl
,
project
,
projectFingerprint
,
remediations
,
reportType
,
solution
,
id
,
canModifyRelatedIssues
,
relatedIssuesHelpPath
,
}
=
convertObjectPropsToCamelCase
(
JSON
.
parse
(
el
.
dataset
.
vulnerability
));
const
remediation
=
remediations
?.
length
?
remediations
[
0
]
:
null
;
const
hasDownload
=
Boolean
(
state
!==
VULNERABILITY_STATE_OBJECTS
.
resolved
.
state
&&
remediation
?.
diff
?.
length
&&
!
hasMr
,
);
const
hasRemediation
=
Boolean
(
remediation
);
const
props
=
{
vulnerabilityId
:
id
,
discussionsUrl
,
notesUrl
,
solutionInfo
:
{
solution
,
remediation
,
hasDownload
,
hasMr
,
hasRemediation
,
vulnerabilityFeedbackHelpPath
,
isStandaloneVulnerability
:
true
,
},
issueFeedback
,
mergeRequestFeedback
,
canModifyRelatedIssues
,
project
:
{
url
:
project
.
full_path
,
value
:
project
.
full_name
,
},
relatedIssuesHelpPath
,
};
return
new
Vue
({
el
,
provide
:
{
reportType
,
createIssueUrl
,
projectFingerprint
,
vulnerabilityId
:
id
,
},
render
:
h
=>
h
(
FooterApp
,
{
props
,
}),
});
}
function
createMainApp
()
{
function
createMainApp
()
{
const
el
=
document
.
getElementById
(
'
js-vulnerability-main
'
);
const
el
=
document
.
getElementById
(
'
js-vulnerability-main
'
);
...
@@ -118,9 +17,7 @@ function createMainApp() {
...
@@ -118,9 +17,7 @@ function createMainApp() {
render
:
h
=>
render
:
h
=>
h
(
MainApp
,
{
h
(
MainApp
,
{
props
:
{
props
:
{
vulnerability
},
vulnerability
,
},
}),
}),
});
});
}
}
...
...
ee/app/views/projects/security/vulnerabilities/show.html.haml
View file @
5caab361
...
@@ -5,8 +5,4 @@
...
@@ -5,8 +5,4 @@
-
page_description
@vulnerability
.
description
-
page_description
@vulnerability
.
description
-
vulnerability_init_details
=
{
vulnerability:
vulnerability_details_json
(
@vulnerability
,
@pipeline
)}
-
vulnerability_init_details
=
{
vulnerability:
vulnerability_details_json
(
@vulnerability
,
@pipeline
)}
#js-vulnerability-header
{
data:
vulnerability_init_details
}
#js-vulnerability-details
{
data:
vulnerability_init_details
}
#js-vulnerability-footer
{
data:
vulnerability_init_details
}
#js-vulnerability-main
{
data:
vulnerability_init_details
}
#js-vulnerability-main
{
data:
vulnerability_init_details
}
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