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
ce662f18
Commit
ce662f18
authored
Mar 02, 2021
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docs link for license compliance mr widget
* Update link to point to docs
parent
b9662918
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
11 deletions
+13
-11
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+1
-0
app/views/projects/merge_requests/_widget.html.haml
app/views/projects/merge_requests/_widget.html.haml
+1
-0
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+1
-1
ee/app/assets/javascripts/vue_shared/license_compliance/mr_widget_license_report.vue
...ue_shared/license_compliance/mr_widget_license_report.vue
+3
-3
ee/spec/frontend/vue_shared/license_compliance/mr_widget_license_report_spec.js
...hared/license_compliance/mr_widget_license_report_spec.js
+7
-7
No files found.
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
ce662f18
...
...
@@ -241,6 +241,7 @@ export default class MergeRequestStore {
this
.
reviewingDocsPath
=
data
.
reviewing_and_managing_merge_requests_docs_path
;
this
.
ciEnvironmentsStatusPath
=
data
.
ci_environments_status_path
;
this
.
securityApprovalsHelpPagePath
=
data
.
security_approvals_help_page_path
;
this
.
licenseCompliaceDocsPath
=
data
.
license_compliance_docs_path
;
this
.
eligibleApproversDocsPath
=
data
.
eligible_approvers_docs_path
;
this
.
mergeImmediatelyDocsPath
=
data
.
merge_immediately_docs_path
;
this
.
approvalsHelpPath
=
data
.
approvals_help_path
;
...
...
app/views/projects/merge_requests/_widget.html.haml
View file @
ce662f18
...
...
@@ -8,6 +8,7 @@
window.gl.mrWidgetData.mr_troubleshooting_docs_path = '
#{
help_page_path
(
'user/project/merge_requests/reviewing_and_managing_merge_requests.md'
,
anchor:
'troubleshooting'
)
}
';
window.gl.mrWidgetData.pipeline_must_succeed_docs_path = '
#{
help_page_path
(
'user/project/merge_requests/merge_when_pipeline_succeeds.md'
,
anchor:
'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'
)
}
';
window.gl.mrWidgetData.security_approvals_help_page_path = '
#{
help_page_path
(
'user/application_security/index.md'
,
anchor:
'security-approvals-in-merge-requests'
)
}
';
window.gl.mrWidgetData.license_compliance_docs_path = '
#{
help_page_path
(
'user/compliance/license_compliance/index.md'
,
anchor:
'policies'
)
}
';
window.gl.mrWidgetData.eligible_approvers_docs_path = '
#{
help_page_path
(
'user/project/merge_requests/merge_request_approvals'
,
anchor:
'eligible-approvers'
)
}
';
window.gl.mrWidgetData.approvals_help_path = '
#{
help_page_path
(
"user/project/merge_requests/merge_request_approvals"
)
}
';
window.gl.mrWidgetData.pipelines_empty_svg_path = '
#{
image_path
(
'illustrations/pipelines_empty.svg'
)
}
';
...
...
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
ce662f18
...
...
@@ -372,7 +372,7 @@ export default {
:can-manage-licenses=
"mr.licenseScanning.can_manage_licenses"
:full-report-path=
"mr.licenseScanning.full_report_path"
:license-management-settings-path=
"mr.licenseScanning.settings_path"
:
security-approvals-help-page-path=
"mr.securityApprovalsHelpPage
Path"
:
license-compliance-docs-path=
"mr.licenseComplianceDocs
Path"
report-section-class=
"mr-widget-border-top"
/>
...
...
ee/app/assets/javascripts/vue_shared/license_compliance/mr_widget_license_report.vue
View file @
ce662f18
...
...
@@ -62,7 +62,7 @@ export default {
required
:
false
,
default
:
false
,
},
securityApprovalsHelpPage
Path
:
{
licenseComplianceDocs
Path
:
{
type
:
String
,
required
:
false
,
default
:
''
,
...
...
@@ -167,8 +167,8 @@ export default {
<div
class=
"pr-3"
>
{{
licenseSummaryText
}}
<gl-link
v-if=
"reportContainsBlacklistedLicense &&
securityApprovalsHelpPage
Path"
:href=
"
securityApprovalsHelpPage
Path"
v-if=
"reportContainsBlacklistedLicense &&
licenseComplianceDocs
Path"
:href=
"
licenseComplianceDocs
Path"
class=
"js-security-approval-help-link"
target=
"_blank"
>
...
...
ee/spec/frontend/vue_shared/license_compliance/mr_widget_license_report_spec.js
View file @
ce662f18
...
...
@@ -17,7 +17,7 @@ localVue.use(Vuex);
describe
(
'
License Report MR Widget
'
,
()
=>
{
const
apiUrl
=
`
${
TEST_HOST
}
/license_management`
;
const
securityApprovalsHelpPage
Path
=
`
${
TEST_HOST
}
/path/to/security/approvals/help`
;
const
licenseComplianceDocs
Path
=
`
${
TEST_HOST
}
/path/to/security/approvals/help`
;
let
wrapper
;
const
defaultState
=
{
...
...
@@ -53,7 +53,7 @@ describe('License Report MR Widget', () => {
licenseManagementSettingsPath
:
`
${
TEST_HOST
}
/lm_settings`
,
fullReportPath
:
`
${
TEST_HOST
}
/path/to/the/full/report`
,
apiUrl
,
securityApprovalsHelpPage
Path
,
licenseComplianceDocs
Path
,
};
const
defaultActions
=
{
...
...
@@ -338,12 +338,12 @@ describe('License Report MR Widget', () => {
});
describe
(
'
approval status
'
,
()
=>
{
const
find
SecurityApproval
HelpLink
=
()
=>
wrapper
.
find
(
'
.js-security-approval-help-link
'
);
const
find
LicenseCompliance
HelpLink
=
()
=>
wrapper
.
find
(
'
.js-security-approval-help-link
'
);
it
(
'
does not show a link to security approval help page if report does not contain blacklisted licenses
'
,
()
=>
{
mountComponent
();
expect
(
find
SecurityApproval
HelpLink
().
exists
()).
toBe
(
false
);
expect
(
find
LicenseCompliance
HelpLink
().
exists
()).
toBe
(
false
);
});
it
(
'
shows a link to security approval help page if report contains blacklisted licenses
'
,
()
=>
{
...
...
@@ -357,10 +357,10 @@ describe('License Report MR Widget', () => {
getters
,
});
const
securityApprovalHelpLink
=
findSecurityApproval
HelpLink
();
const
licenseComplianceHelpLink
=
findLicenseCompliance
HelpLink
();
expect
(
find
SecurityApproval
HelpLink
().
exists
()).
toBe
(
true
);
expect
(
securityApprovalHelpLink
.
attributes
(
'
href
'
)).
toBe
(
securityApprovalsHelpPage
Path
);
expect
(
find
LicenseCompliance
HelpLink
().
exists
()).
toBe
(
true
);
expect
(
licenseComplianceHelpLink
.
attributes
(
'
href
'
)).
toBe
(
licenseComplianceDocs
Path
);
});
});
});
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