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
da20731f
Commit
da20731f
authored
Jul 26, 2018
by
Sam Beckham
Committed by
Phil Hughes
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Full list of vulnerabilities
parent
ef455b5d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
57 deletions
+46
-57
app/assets/javascripts/vue_shared/components/reports/issues_list.vue
...javascripts/vue_shared/components/reports/issues_list.vue
+0
-32
app/assets/javascripts/vue_shared/components/reports/report_section.vue
...ascripts/vue_shared/components/reports/report_section.vue
+7
-19
changelogs/unreleased/full-list-of-vulnerabilities-5239.yml
changelogs/unreleased/full-list-of-vulnerabilities-5239.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+0
-5
spec/javascripts/helpers/vue_mount_component_helper.js
spec/javascripts/helpers/vue_mount_component_helper.js
+10
-0
spec/javascripts/vue_shared/components/reports/report_section_spec.js
...ipts/vue_shared/components/reports/report_section_spec.js
+24
-1
No files found.
app/assets/javascripts/vue_shared/components/reports/issues_list.vue
View file @
da20731f
...
@@ -33,27 +33,12 @@ export default {
...
@@ -33,27 +33,12 @@ export default {
required
:
false
,
required
:
false
,
default
:
()
=>
[],
default
:
()
=>
[],
},
},
allIssues
:
{
type
:
Array
,
required
:
false
,
default
:
()
=>
[],
},
component
:
{
component
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
},
},
data
()
{
return
{
isFullReportVisible
:
false
,
};
},
methods
:
{
openFullReport
()
{
this
.
isFullReportVisible
=
true
;
},
},
};
};
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -67,14 +52,6 @@ export default {
...
@@ -67,14 +52,6 @@ export default {
class=
"js-mr-code-new-issues"
class=
"js-mr-code-new-issues"
/>
/>
<issues-block
v-if=
"isFullReportVisible"
:component=
"component"
:issues=
"allIssues"
:status=
"$options.failed"
class=
"js-mr-code-all-issues"
/>
<issues-block
<issues-block
v-if=
"neutralIssues.length"
v-if=
"neutralIssues.length"
:component=
"component"
:component=
"component"
...
@@ -90,14 +67,5 @@ export default {
...
@@ -90,14 +67,5 @@ export default {
:status=
"$options.success"
:status=
"$options.success"
class=
"js-mr-code-resolved-issues"
class=
"js-mr-code-resolved-issues"
/>
/>
<button
v-if=
"allIssues.length && !isFullReportVisible"
type=
"button"
class=
"btn-link btn-blank prepend-left-10 js-expand-full-list break-link"
@
click=
"openFullReport"
>
{{
s__
(
"
ciReport|Show complete code vulnerabilities report
"
)
}}
</button>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/vue_shared/components/reports/report_section.vue
View file @
da20731f
...
@@ -59,11 +59,6 @@ export default {
...
@@ -59,11 +59,6 @@ export default {
required
:
false
,
required
:
false
,
default
:
()
=>
[],
default
:
()
=>
[],
},
},
allIssues
:
{
type
:
Array
,
required
:
false
,
default
:
()
=>
[],
},
infoText
:
{
infoText
:
{
type
:
[
String
,
Boolean
],
type
:
[
String
,
Boolean
],
required
:
false
,
required
:
false
,
...
@@ -142,18 +137,10 @@ export default {
...
@@ -142,18 +137,10 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<section
class=
"media-section"
>
<section
class=
"media-section"
>
<div
<div
class=
"media"
>
class=
"media"
<status-icon
:status=
"statusIconName"
/>
>
<div
class=
"media-body space-children d-flex flex-align-self-center"
>
<status-icon
<span
class=
"js-code-text code-text"
>
:status=
"statusIconName"
/>
<div
class=
"media-body space-children d-flex flex-align-self-center"
>
<span
class=
"js-code-text code-text"
>
{{
headerText
}}
{{
headerText
}}
<popover
<popover
...
@@ -163,10 +150,12 @@ export default {
...
@@ -163,10 +150,12 @@ export default {
/>
/>
</span>
</span>
<slot
name=
"actionButtons"
></slot>
<button
<button
v-if=
"isCollapsible"
v-if=
"isCollapsible"
type=
"button"
type=
"button"
class=
"js-collapse-btn btn
bt-default
float-right btn-sm"
class=
"js-collapse-btn btn float-right btn-sm"
@
click=
"toggleCollapsed"
@
click=
"toggleCollapsed"
>
>
{{
collapseText
}}
{{
collapseText
}}
...
@@ -184,7 +173,6 @@ export default {
...
@@ -184,7 +173,6 @@ export default {
:unresolved-issues=
"unresolvedIssues"
:unresolved-issues=
"unresolvedIssues"
:resolved-issues=
"resolvedIssues"
:resolved-issues=
"resolvedIssues"
:neutral-issues=
"neutralIssues"
:neutral-issues=
"neutralIssues"
:all-issues=
"allIssues"
:component=
"component"
:component=
"component"
/>
/>
</slot>
</slot>
...
...
changelogs/unreleased/full-list-of-vulnerabilities-5239.yml
0 → 100644
View file @
da20731f
---
title
:
Removes "show all" on reports and adds an actionButtons slot
merge_request
:
20855
author
:
type
:
changed
locale/gitlab.pot
View file @
da20731f
...
@@ -8,8 +8,6 @@ msgid ""
...
@@ -8,8 +8,6 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-10 16:02-0700\n"
"PO-Revision-Date: 2018-07-10 16:02-0700\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"Language: \n"
...
@@ -6007,9 +6005,6 @@ msgstr ""
...
@@ -6007,9 +6005,6 @@ msgstr ""
msgid "branch name"
msgid "branch name"
msgstr ""
msgstr ""
msgid "ciReport|Show complete code vulnerabilities report"
msgstr ""
msgid "command line instructions"
msgid "command line instructions"
msgstr ""
msgstr ""
...
...
spec/javascripts/helpers/vue_mount_component_helper.js
View file @
da20731f
...
@@ -15,4 +15,14 @@ export const mountComponentWithStore = (Component, { el, props, store }) =>
...
@@ -15,4 +15,14 @@ export const mountComponentWithStore = (Component, { el, props, store }) =>
propsData
:
props
||
{},
propsData
:
props
||
{},
}).
$mount
(
el
);
}).
$mount
(
el
);
export
const
mountComponentWithSlots
=
(
Component
,
{
props
,
slots
})
=>
{
const
component
=
new
Component
({
propsData
:
props
||
{},
});
component
.
$slots
=
slots
;
return
component
.
$mount
();
};
export
default
mountComponent
;
export
default
mountComponent
;
spec/javascripts/vue_shared/components/reports/report_section_spec.js
View file @
da20731f
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
reportSection
from
'
~/vue_shared/components/reports/report_section.vue
'
;
import
reportSection
from
'
~/vue_shared/components/reports/report_section.vue
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
mountComponent
,
{
mountComponentWithSlots
}
from
'
spec/helpers/vue_mount_component_helper
'
;
describe
(
'
Report section
'
,
()
=>
{
describe
(
'
Report section
'
,
()
=>
{
let
vm
;
let
vm
;
...
@@ -171,4 +171,27 @@ describe('Report section', () => {
...
@@ -171,4 +171,27 @@ describe('Report section', () => {
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
Failed to load codeclimate report
'
);
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
Failed to load codeclimate report
'
);
});
});
});
});
describe
(
'
with action buttons passed to the slot
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponentWithSlots
(
ReportSection
,
{
props
:
{
status
:
'
SUCCESS
'
,
successText
:
'
success
'
,
hasIssues
:
true
,
},
slots
:
{
actionButtons
:
[
'
Action!
'
],
},
});
});
it
(
'
should render the passed button
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
'
Action!
'
);
});
it
(
'
should still render the expand/collapse button
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-collapse-btn
'
).
textContent
.
trim
()).
toEqual
(
'
Expand
'
);
});
});
});
});
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