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
318e1d75
Commit
318e1d75
authored
Aug 06, 2018
by
🌴🇿🇦 Lukas Eipert (OOO until Summit)
Committed by
Filipa Lacerda
Aug 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link the License Management report in the MR widget with the pipeline level one
parent
06baa844
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
5 deletions
+46
-5
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+1
-0
ee/app/assets/javascripts/vue_shared/license_management/mr_widget_license_report.vue
...ue_shared/license_management/mr_widget_license_report.vue
+22
-5
ee/changelogs/unreleased/6727-link-pipeline-and-MR-LM-widget-ee.yml
...ogs/unreleased/6727-link-pipeline-and-MR-LM-widget-ee.yml
+6
-0
ee/spec/javascripts/license_management/mr_widget_license_report_spec.js
...ripts/license_management/mr_widget_license_report_spec.js
+17
-0
No files found.
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
318e1d75
...
@@ -260,6 +260,7 @@ export default {
...
@@ -260,6 +260,7 @@ export default {
<mr-widget-licenses
<mr-widget-licenses
v-if=
"shouldRenderLicenseReport"
v-if=
"shouldRenderLicenseReport"
:api-url=
"mr.licenseManagement.managed_licenses_path"
:api-url=
"mr.licenseManagement.managed_licenses_path"
:pipeline-path=
"mr.pipeline.path"
:can-manage-licenses=
"mr.licenseManagement.can_manage_licenses"
:can-manage-licenses=
"mr.licenseManagement.can_manage_licenses"
:base-path=
"mr.licenseManagement.base_path"
:base-path=
"mr.licenseManagement.base_path"
:head-path=
"mr.licenseManagement.head_path"
:head-path=
"mr.licenseManagement.head_path"
...
...
ee/app/assets/javascripts/vue_shared/license_management/mr_widget_license_report.vue
View file @
318e1d75
...
@@ -28,6 +28,11 @@ export default {
...
@@ -28,6 +28,11 @@ export default {
required
:
false
,
required
:
false
,
default
:
null
,
default
:
null
,
},
},
pipelinePath
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
apiUrl
:
{
apiUrl
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
...
@@ -57,13 +62,13 @@ export default {
...
@@ -57,13 +62,13 @@ export default {
licenseReportStatus
()
{
licenseReportStatus
()
{
return
this
.
checkReportStatus
(
this
.
isLoading
,
this
.
loadLicenseReportError
);
return
this
.
checkReportStatus
(
this
.
isLoading
,
this
.
loadLicenseReportError
);
},
},
licensesTab
()
{
return
this
.
pipelinePath
?
`
${
this
.
pipelinePath
}
/licenses`
:
null
;
},
},
},
watch
:
{
watch
:
{
licenseReport
()
{
licenseReport
()
{
this
.
$emit
(
this
.
$emit
(
'
updateBadgeCount
'
,
this
.
licenseReport
.
length
);
'
updateBadgeCount
'
,
this
.
licenseReport
.
length
,
);
},
},
},
},
mounted
()
{
mounted
()
{
...
@@ -98,6 +103,18 @@ export default {
...
@@ -98,6 +103,18 @@ export default {
:class=
"reportSectionClass"
:class=
"reportSectionClass"
:always-open=
"alwaysOpen"
:always-open=
"alwaysOpen"
class=
"license-report-widget"
class=
"license-report-widget"
/>
>
<div
v-if=
"licensesTab"
slot=
"actionButtons"
>
<a
:href=
"licensesTab"
class=
"btn btn-default float-right btn-sm"
>
{{
s__
(
"
ciReport|View full report
"
)
}}
</a>
</div>
</report-section>
</div>
</div>
</
template
>
</
template
>
ee/changelogs/unreleased/6727-link-pipeline-and-MR-LM-widget-ee.yml
0 → 100644
View file @
318e1d75
---
title
:
Link the License Management report in the MR widget with the pipeline level
one
merge_request
:
6800
author
:
type
:
added
ee/spec/javascripts/license_management/mr_widget_license_report_spec.js
View file @
318e1d75
...
@@ -84,6 +84,23 @@ describe('License Report MR Widget', () => {
...
@@ -84,6 +84,23 @@ describe('License Report MR Widget', () => {
}));
}));
});
});
describe
(
'
licensesTab
'
,
()
=>
{
it
(
'
with the pipelinePath prop
'
,
done
=>
{
const
pipelinePath
=
`
${
TEST_HOST
}
/path/to/the/pipeline`
;
vm
.
pipelinePath
=
pipelinePath
;
return
Vue
.
nextTick
().
then
(()
=>
{
expect
(
vm
.
licensesTab
).
toEqual
(
`
${
pipelinePath
}
/licenses`
);
done
();
});
});
it
(
'
without the pipelinePath prop
'
,
()
=>
{
expect
(
vm
.
licensesTab
).
toEqual
(
null
);
});
});
describe
(
'
licenseReportStatus
'
,
()
=>
{
describe
(
'
licenseReportStatus
'
,
()
=>
{
it
(
'
should be `LOADING`, if the report is loading
'
,
done
=>
{
it
(
'
should be `LOADING`, if the report is loading
'
,
done
=>
{
store
.
hotUpdate
({
store
.
hotUpdate
({
...
...
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