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
2e39fcc0
Commit
2e39fcc0
authored
Jan 11, 2022
by
Ammar Alakkad
Committed by
Etienne Baqué
Jan 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update upload a license file docs
Changelog: changed EE: true
parent
eae88ce7
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
41 additions
and
101 deletions
+41
-101
app/views/admin/application_settings/general.html.haml
app/views/admin/application_settings/general.html.haml
+1
-0
doc/user/admin_area/license.md
doc/user/admin_area/license.md
+4
-3
ee/app/assets/javascripts/admin/subscriptions/show/components/subscription_activation_card.vue
...riptions/show/components/subscription_activation_card.vue
+0
-12
ee/app/assets/javascripts/admin/subscriptions/show/components/subscription_breakdown.vue
.../subscriptions/show/components/subscription_breakdown.vue
+1
-18
ee/app/assets/javascripts/admin/subscriptions/show/mount_cloud_licenses.js
...ascripts/admin/subscriptions/show/mount_cloud_licenses.js
+0
-2
ee/app/helpers/license_helper.rb
ee/app/helpers/license_helper.rb
+0
-1
ee/app/views/admin/application_settings/_license_file.html.haml
.../views/admin/application_settings/_license_file.html.haml
+9
-0
ee/spec/features/admin/admin_settings_spec.rb
ee/spec/features/admin/admin_settings_spec.rb
+6
-0
ee/spec/features/admin/subscriptions/admin_views_subscription_spec.rb
...ures/admin/subscriptions/admin_views_subscription_spec.rb
+2
-2
ee/spec/frontend/admin/subscriptions/show/components/subscription_activation_card_spec.js
...ions/show/components/subscription_activation_card_spec.js
+5
-30
ee/spec/frontend/admin/subscriptions/show/components/subscription_breakdown_spec.js
...scriptions/show/components/subscription_breakdown_spec.js
+4
-29
ee/spec/helpers/license_helper_spec.rb
ee/spec/helpers/license_helper_spec.rb
+0
-2
locale/gitlab.pot
locale/gitlab.pot
+3
-0
qa/qa/ee/page/admin/license.rb
qa/qa/ee/page/admin/license.rb
+1
-1
qa/qa/ee/resource/license.rb
qa/qa/ee/resource/license.rb
+5
-1
No files found.
app/views/admin/application_settings/general.html.haml
View file @
2e39fcc0
...
...
@@ -118,3 +118,4 @@
=
render
'admin/application_settings/snowplow'
=
render
'admin/application_settings/eks'
=
render
'admin/application_settings/floc'
=
render_if_exists
'admin/application_settings/license_file'
doc/user/admin_area/license.md
View file @
2e39fcc0
...
...
@@ -50,13 +50,14 @@ If you receive a license file from GitLab (for example a new trial), you can upl
The first time you visit your GitLab EE installation signed in as an administrator,
you should see a note urging you to upload a license with a link that takes you
to the
**
Subscription**
area
.
to the
**
Upload license**
page
.
Otherwise, to manually go to the
**
Subscription**
area
:
Otherwise, to manually go to the
**
Upload license**
page
:
1.
Sign in to your GitLab self-managed instance.
1.
From the top menu, select the Admin Area
**{admin}**
.
1.
From the left sidebar, select
**Subscription**
, and select
**Upload a license file**
.
1.
On the left sidebar, select
**Settings**
.
1.
In the
**License file**
section, select
**Upload a license**
.
-
*If you've received a `.gitlab-license` file:*
1.
Download the license file to your local machine.
...
...
ee/app/assets/javascripts/admin/subscriptions/show/components/subscription_activation_card.vue
View file @
2e39fcc0
...
...
@@ -4,7 +4,6 @@ import { helpPagePath } from '~/helpers/help_page_helper';
import
{
activateSubscription
,
howToActivateSubscription
,
uploadLicenseFile
,
SUBSCRIPTION_ACTIVATION_FAILURE_EVENT
,
SUBSCRIPTION_ACTIVATION_SUCCESS_EVENT
,
}
from
'
../constants
'
;
...
...
@@ -20,7 +19,6 @@ export default {
i18n
:
{
activateSubscription
,
howToActivateSubscription
,
uploadLicenseFile
,
},
components
:
{
GlCard
,
...
...
@@ -29,7 +27,6 @@ export default {
SubscriptionActivationErrors
,
SubscriptionActivationForm
,
},
inject
:
[
'
licenseUploadPath
'
],
links
:
{
activateSubscriptionUrl
,
},
...
...
@@ -79,14 +76,5 @@ export default {
</gl-sprintf>
</p>
<subscription-activation-form
class=
"gl-p-5"
v-on=
"$options.activationListeners"
/>
<
template
#footer
>
<gl-link
v-if=
"licenseUploadPath"
data-testid=
"upload-license-link"
data-qa-selector=
"license_upload_link"
:href=
"licenseUploadPath"
>
{{
$options
.
i18n
.
uploadLicenseFile
}}
</gl-link>
</
template
>
</gl-card>
</template>
ee/app/assets/javascripts/admin/subscriptions/show/components/subscription_breakdown.vue
View file @
2e39fcc0
...
...
@@ -12,7 +12,6 @@ import {
subscriptionDetailsHeaderText
,
subscriptionTypes
,
syncSubscriptionButtonText
,
uploadLicense
,
}
from
'
../constants
'
;
import
SubscriptionActivationBanner
from
'
./subscription_activation_banner.vue
'
;
import
SubscriptionActivationModal
from
'
./subscription_activation_modal.vue
'
;
...
...
@@ -33,7 +32,6 @@ export default {
removeLicenseConfirm
,
subscriptionDetailsHeaderText
,
syncSubscriptionButtonText
,
uploadLicense
,
},
modal
:
{
id
:
modalId
,
...
...
@@ -55,7 +53,6 @@ export default {
inject
:
[
'
customersPortalUrl
'
,
'
licenseRemovePath
'
,
'
licenseUploadPath
'
,
'
subscriptionSyncPath
'
,
'
subscriptionActivationBannerCalloutName
'
,
],
...
...
@@ -89,9 +86,6 @@ export default {
canSyncSubscription
()
{
return
this
.
subscriptionSyncPath
&&
this
.
isCloudType
;
},
canUploadLicense
()
{
return
this
.
licenseUploadPath
&&
this
.
isLicenseFileType
;
},
canRemoveLicense
()
{
return
this
.
licenseRemovePath
;
},
...
...
@@ -112,8 +106,7 @@ export default {
this
.
canActivateSubscription
||
this
.
canRemoveLicense
||
this
.
canManageSubscription
||
this
.
canSyncSubscription
||
this
.
canUploadLicense
this
.
canSyncSubscription
);
},
subscriptionHistory
()
{
...
...
@@ -207,16 +200,6 @@ export default {
>
{{
$options
.
i18n
.
activateCloudLicense
}}
</gl-button>
<gl-button
v-if=
"canUploadLicense"
:href=
"licenseUploadPath"
category=
"secondary"
variant=
"confirm"
data-testid=
"license-upload-action"
data-qa-selector=
"license_upload_link"
>
{{
$options
.
i18n
.
uploadLicense
}}
</gl-button>
<gl-button
v-if=
"canManageSubscription"
:href=
"customersPortalUrl"
...
...
ee/app/assets/javascripts/admin/subscriptions/show/mount_cloud_licenses.js
View file @
2e39fcc0
...
...
@@ -25,7 +25,6 @@ export default () => {
freeTrialPath
,
hasActiveLicense
,
licenseRemovePath
,
licenseUploadPath
,
subscriptionActivationBannerCalloutName
,
subscriptionSyncPath
,
licenseUsageFilePath
,
...
...
@@ -44,7 +43,6 @@ export default () => {
customersPortalUrl
,
freeTrialPath
,
licenseRemovePath
,
licenseUploadPath
,
subscriptionActivationBannerCalloutName
,
subscriptionSyncPath
,
},
...
...
ee/app/helpers/license_helper.rb
View file @
2e39fcc0
...
...
@@ -60,7 +60,6 @@ module LicenseHelper
customers_portal_url:
::
EE
::
SUBSCRIPTIONS_MANAGE_URL
,
free_trial_path:
new_trial_url
,
has_active_license:
(
has_active_license?
?
'true'
:
'false'
),
license_upload_path:
new_admin_license_path
,
license_remove_path:
admin_license_path
,
subscription_sync_path:
sync_seat_link_admin_license_path
,
congratulation_svg_path:
image_path
(
'illustrations/illustration-congratulation-purchase.svg'
),
...
...
ee/app/views/admin/application_settings/_license_file.html.haml
0 → 100644
View file @
2e39fcc0
%section
.settings.expanded
.settings-header
%h4
=
_
(
'License file'
)
.settings-content
-
link_start
=
'<a href="%{url}" data-qa-selector="license_upload_link">'
.
html_safe
%
{
url:
new_admin_license_path
}
%p
=
s_
(
'%{link_start}Upload a license%{link_end} file or enter the license key you have received from GitLab Inc.'
).
html_safe
%
{
link_start:
link_start
,
link_end:
'</a>'
.
html_safe
}
ee/spec/features/admin/admin_settings_spec.rb
View file @
2e39fcc0
...
...
@@ -407,6 +407,12 @@ RSpec.describe 'Admin updates EE-only settings' do
end
end
end
context
'License file link'
do
it
'provides a link to upload License file'
do
expect
(
page
).
to
have_link
(
text:
'Upload a license'
,
href:
new_admin_license_path
)
end
end
end
def
current_settings
...
...
ee/spec/features/admin/subscriptions/admin_views_subscription_spec.rb
View file @
2e39fcc0
...
...
@@ -216,9 +216,9 @@ RSpec.describe 'Admin views Subscription', :js do
end
context
'when uploading a license file'
do
it
'
shows
a link to upload a license file'
do
it
'
does not show
a link to upload a license file'
do
page
.
within
(
find
(
'#content-body'
,
match: :first
))
do
expect
(
page
).
to
have_link
(
'Upload a license file'
,
href:
new_admin_license_path
)
expect
(
page
).
not_
to
have_link
(
'Upload a license file'
,
href:
new_admin_license_path
)
end
end
end
...
...
ee/spec/frontend/admin/subscriptions/show/components/subscription_activation_card_spec.js
View file @
2e39fcc0
import
{
GlCard
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlCard
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
SubscriptionActivationCard
,
{
activateSubscriptionUrl
,
}
from
'
ee/admin/subscriptions/show/components/subscription_activation_card.vue
'
;
import
SubscriptionActivationCard
from
'
ee/admin/subscriptions/show/components/subscription_activation_card.vue
'
;
import
SubscriptionActivationErrors
from
'
ee/admin/subscriptions/show/components/subscription_activation_errors.vue
'
;
import
SubscriptionActivationForm
from
'
ee/admin/subscriptions/show/components/subscription_activation_form.vue
'
;
import
{
CONNECTIVITY_ERROR
,
SUBSCRIPTION_ACTIVATION_FAILURE_EVENT
,
SUBSCRIPTION_ACTIVATION_SUCCESS_EVENT
,
uploadLicenseFile
,
}
from
'
ee/admin/subscriptions/show/constants
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
license
}
from
'
../mock_data
'
;
...
...
@@ -17,11 +14,9 @@ import { license } from '../mock_data';
describe
(
'
CloudLicenseApp
'
,
()
=>
{
let
wrapper
;
const
licenseUploadPath
=
'
license/upload
'
;
const
findSubscriptionActivationForm
=
()
=>
wrapper
.
findComponent
(
SubscriptionActivationForm
);
const
findSubscriptionActivationErrors
=
()
=>
wrapper
.
findComponent
(
SubscriptionActivationErrors
);
const
findActivateSubscriptionLink
=
()
=>
wrapper
.
findByTestId
(
'
activate-subscription-link
'
);
const
findUploadLink
=
()
=>
wrapper
.
findByTestId
(
'
upload-license-link
'
);
const
createComponent
=
({
props
=
{},
stubs
=
{},
provide
=
{}
}
=
{})
=>
{
...
...
@@ -30,10 +25,7 @@ describe('CloudLicenseApp', () => {
propsData
:
{
...
props
,
},
provide
:
{
licenseUploadPath
,
...
provide
,
},
provide
,
stubs
,
}),
);
...
...
@@ -55,30 +47,13 @@ describe('CloudLicenseApp', () => {
expect
(
findSubscriptionActivationErrors
().
exists
()).
toBe
(
false
);
});
describe
(
'
with an upload legacy license link
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
stubs
:
{
GlCard
,
GlSprintf
}
});
});
it
(
'
shows a link when provided
'
,
()
=>
{
expect
(
findUploadLink
().
text
()).
toBe
(
uploadLicenseFile
);
});
it
(
'
shows an help link
'
,
()
=>
{
expect
(
findActivateSubscriptionLink
().
attributes
(
'
href
'
)).
toBe
(
activateSubscriptionUrl
);
});
it
(
'
provides the correct path
'
,
()
=>
{
expect
(
findUploadLink
().
attributes
(
'
href
'
)).
toBe
(
licenseUploadPath
);
});
it
(
'
does not show upload legacy license link
'
,
()
=>
{
expect
(
findUploadLink
().
exists
()).
toBe
(
false
);
});
it
(
'
does not show a link when legacy license link is not provided
'
,
()
=>
{
createComponent
({
stubs
:
{
GlCard
},
provide
:
{
licenseUploadPath
:
''
,
},
});
expect
(
findUploadLink
().
exists
()).
toBe
(
false
);
...
...
ee/spec/frontend/admin/subscriptions/show/components/subscription_breakdown_spec.js
View file @
2e39fcc0
...
...
@@ -40,7 +40,6 @@ describe('Subscription Breakdown', () => {
const
connectivityHelpURL
=
'
connectivity/help/url
'
;
const
customersPortalUrl
=
'
customers.dot
'
;
const
licenseRemovePath
=
'
/license/remove/
'
;
const
licenseUploadPath
=
'
/license/upload/
'
;
const
subscriptionActivationBannerCalloutName
=
'
banner_callout_name
'
;
const
subscriptionSyncPath
=
'
/sync/path/
'
;
...
...
@@ -82,7 +81,6 @@ describe('Subscription Breakdown', () => {
congratulationSvgPath
,
connectivityHelpURL
,
customersPortalUrl
,
licenseUploadPath
,
licenseRemovePath
,
subscriptionActivationBannerCalloutName
,
subscriptionSyncPath
,
...
...
@@ -195,7 +193,6 @@ describe('Subscription Breakdown', () => {
const
provide
=
{
connectivityHelpURL
:
''
,
customersPortalUrl
:
''
,
licenseUploadPath
:
''
,
licenseRemovePath
:
''
,
subscriptionSyncPath
:
url
,
};
...
...
@@ -207,31 +204,11 @@ describe('Subscription Breakdown', () => {
},
);
it
.
each
`
url | type | shouldShow
${
licenseUploadPath
}
|
${
subscriptionTypes
.
LICENSE_FILE
}
|
${
true
}
${
licenseUploadPath
}
|
${
subscriptionTypes
.
CLOUD
}
|
${
false
}
${
''
}
|
${
subscriptionTypes
.
LICENSE_FILE
}
|
${
false
}
${
''
}
|
${
subscriptionTypes
.
CLOUD
}
|
${
false
}
${
undefined
}
|
${
subscriptionTypes
.
LICENSE_FILE
}
|
${
false
}
${
undefined
}
|
${
subscriptionTypes
.
CLOUD
}
|
${
false
}
`
(
'
with url is $url and type is $type the upload button is shown: $shouldShow
'
,
({
url
,
type
,
shouldShow
})
=>
{
const
provide
=
{
connectivityHelpURL
:
''
,
customersPortalUrl
:
''
,
licenseRemovePath
:
''
,
subscriptionSyncPath
:
''
,
licenseUploadPath
:
url
,
};
const
props
=
{
subscription
:
{
...
license
.
ULTIMATE
,
type
}
};
const
stubs
=
{
GlCard
,
SubscriptionDetailsCard
};
createComponent
({
props
,
provide
,
stubs
});
it
(
'
does not show upload legacy license button
'
,
()
=>
{
createComponent
();
expect
(
findLicenseUploadAction
().
exists
()).
toBe
(
shouldShow
);
},
);
expect
(
findLicenseUploadAction
().
exists
()).
toBe
(
false
);
});
it
.
each
`
url | shouldShow
...
...
@@ -241,7 +218,6 @@ describe('Subscription Breakdown', () => {
`
(
'
with url is $url the manage button is shown: $shouldShow
'
,
({
url
,
shouldShow
})
=>
{
const
provide
=
{
connectivityHelpURL
:
''
,
licenseUploadPath
:
''
,
licenseRemovePath
:
''
,
subscriptionSyncPath
:
''
,
customersPortalUrl
:
url
,
...
...
@@ -266,7 +242,6 @@ describe('Subscription Breakdown', () => {
const
provide
=
{
connectivityHelpURL
:
''
,
customersPortalUrl
:
''
,
licenseUploadPath
:
''
,
subscriptionSyncPath
:
''
,
licenseRemovePath
:
url
,
};
...
...
ee/spec/helpers/license_helper_spec.rb
View file @
2e39fcc0
...
...
@@ -98,7 +98,6 @@ RSpec.describe LicenseHelper do
free_trial_path:
'new_trial_url'
,
buy_subscription_path:
'subscriptions_plans_url'
,
subscription_sync_path:
sync_seat_link_admin_license_path
,
license_upload_path:
new_admin_license_path
,
license_remove_path:
admin_license_path
,
congratulation_svg_path:
helper
.
image_path
(
'illustrations/illustration-congratulation-purchase.svg'
),
subscription_activation_banner_callout_name:
::
EE
::
Users
::
CalloutsHelper
::
CL_SUBSCRIPTION_ACTIVATION
,
...
...
@@ -115,7 +114,6 @@ RSpec.describe LicenseHelper do
free_trial_path:
'new_trial_url'
,
buy_subscription_path:
'subscriptions_plans_url'
,
subscription_sync_path:
sync_seat_link_admin_license_path
,
license_upload_path:
new_admin_license_path
,
license_remove_path:
admin_license_path
,
congratulation_svg_path:
helper
.
image_path
(
'illustrations/illustration-congratulation-purchase.svg'
),
subscription_activation_banner_callout_name:
::
EE
::
Users
::
CalloutsHelper
::
CL_SUBSCRIPTION_ACTIVATION
,
...
...
locale/gitlab.pot
View file @
2e39fcc0
...
...
@@ -731,6 +731,9 @@ msgstr ""
msgid "%{link_start}Start the title with %{draft_snippet}%{link_end} to prevent a merge request draft from merging before it's ready."
msgstr ""
msgid "%{link_start}Upload a license%{link_end} file or enter the license key you have received from GitLab Inc."
msgstr ""
msgid "%{link_start}What information does GitLab Inc. collect?%{link_end}"
msgstr ""
...
...
qa/qa/ee/page/admin/license.rb
View file @
2e39fcc0
...
...
@@ -5,7 +5,7 @@ module QA
module
Page
module
Admin
class
License
<
QA
::
Page
::
Base
view
'ee/app/
assets/javascripts/admin/subscriptions/show/components/subscription_activation_card.vue
'
do
view
'ee/app/
views/admin/application_settings/_license_file.html.haml
'
do
element
:license_upload_link
end
...
...
qa/qa/ee/resource/license.rb
View file @
2e39fcc0
...
...
@@ -10,7 +10,11 @@ module QA
QA
::
Page
::
Admin
::
Menu
.
perform
(
&
:click_subscription_menu_link
)
EE
::
Page
::
Admin
::
License
.
perform
do
|
license_page
|
license_page
.
add_new_license
(
license
)
unless
license_page
.
license?
unless
license_page
.
license?
QA
::
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_general_settings
)
license_page
.
add_new_license
(
license
)
end
end
QA
::
Page
::
Main
::
Menu
.
perform
(
&
:sign_out_if_signed_in
)
...
...
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