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
deb63d42
Commit
deb63d42
authored
Jun 07, 2020
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show Allow/Deny descriptions
* Include feature flag for related backend work
parent
06c42094
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
ee/app/assets/javascripts/vue_shared/license_compliance/components/add_license_form.vue
...shared/license_compliance/components/add_license_form.vue
+25
-4
No files found.
ee/app/assets/javascripts/vue_shared/license_compliance/components/add_license_form.vue
View file @
deb63d42
...
...
@@ -14,8 +14,18 @@ export default {
},
LICENSE_APPROVAL_STATUS
,
approvalStatusOptions
:
[
{
value
:
LICENSE_APPROVAL_STATUS
.
ALLOWED
,
label
:
s__
(
'
LicenseCompliance|Allow
'
)
},
{
value
:
LICENSE_APPROVAL_STATUS
.
DENIED
,
label
:
s__
(
'
LicenseCompliance|Deny
'
)
},
{
value
:
LICENSE_APPROVAL_STATUS
.
ALLOWED
,
label
:
s__
(
'
LicenseCompliance|Allow
'
),
description
:
s__
(
'
LicenseCompliance|Acceptable license to be used in the project
'
),
},
{
value
:
LICENSE_APPROVAL_STATUS
.
DENIED
,
label
:
s__
(
'
LicenseCompliance|Deny
'
),
description
:
s__
(
'
LicenseCompliance|Disallow merge request if detected and will instruct developer to remove
'
,
),
},
],
props
:
{
managedLicenses
:
{
...
...
@@ -42,6 +52,9 @@ export default {
submitDisabled
()
{
return
this
.
isInvalidLicense
||
this
.
licenseName
.
trim
()
===
''
||
this
.
approvalStatus
===
''
;
},
isDescriptionEnabled
()
{
return
gon
.
features
.
licenseComplianceDeniesMr
;
},
},
methods
:
{
addLicense
()
{
...
...
@@ -72,7 +85,12 @@ export default {
</div>
</div>
<div
class=
"form-group"
>
<div
v-for=
"option in $options.approvalStatusOptions"
:key=
"option.value"
class=
"form-check"
>
<div
v-for=
"option in $options.approvalStatusOptions"
:key=
"option.value"
class=
"form-check"
v-bind:class=
"
{ 'mb-3': isDescriptionEnabled }"
>
<input
:id=
"`js-$
{option.value}-license-radio`"
v-model="approvalStatus"
...
...
@@ -81,9 +99,12 @@ export default {
:data-qa-selector="`${option.value}_license_radio`"
:value="option.value"
/>
<label
:for=
"`js-$
{option.value}-license-radio`" class="form-check-label">
<label
:for=
"`js-$
{option.value}-license-radio`" class="form-check-label
pt-1
">
{{
option
.
label
}}
</label>
<div
v-if=
"isDescriptionEnabled"
class=
"text-secondary"
>
{{
option
.
description
}}
</div>
</div>
</div>
<loading-button
...
...
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