Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dar-otechestvu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Open-source
dar-otechestvu
Commits
1a824a03
Commit
1a824a03
authored
Mar 15, 2025
by
Sergey Shadrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4.x-docker' into '10.4.x'
Fixes See merge request
!3
parents
97a3f3b5
83696b6c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
13 deletions
+4
-13
.gitignore
.gitignore
+2
-2
SettingsForm.php
app/modules/custom/support_dar/src/Form/SettingsForm.php
+0
-7
LicenseManager.php
app/modules/custom/support_dar/src/LicenseManager.php
+2
-4
No files found.
.gitignore
View file @
1a824a03
...
...
@@ -20,5 +20,5 @@ app/vendor/cweagans/composer-patches
app/vendor/wikimedia/composer-merge-plugin
# Docker related files.
/
provision/local/docker-runtime/
/
provision/local/.env
provision/local/docker-runtime/
provision/local/.env
app/modules/custom/support_dar/src/Form/SettingsForm.php
View file @
1a824a03
...
...
@@ -39,12 +39,6 @@ class SettingsForm extends ConfigFormBase {
'#markup'
=>
$this
->
t
(
'Your site key: @key, give it to us to register your domain'
,
[
'@key'
=>
LicenseManager
::
getSiteKey
()]),
];
$config
=
$this
->
config
(
self
::
CONFIG_KEY
);
$form
[
'lms_site_url'
]
=
[
'#type'
=>
'url'
,
'#title'
=>
$this
->
t
(
'License Manager System site url'
),
'#default_value'
=>
$config
->
get
(
'lms_site_url'
),
];
$form
[
'lms_api_token'
]
=
[
'#type'
=>
'textfield'
,
'#title'
=>
$this
->
t
(
'License Manager System API token'
),
...
...
@@ -66,7 +60,6 @@ class SettingsForm extends ConfigFormBase {
*/
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
)
{
$this
->
config
(
self
::
CONFIG_KEY
)
->
set
(
'lms_site_url'
,
$form_state
->
getValue
(
'lms_site_url'
))
->
set
(
'lms_api_token'
,
$form_state
->
getValue
(
'lms_api_token'
))
->
set
(
'lms_license_id'
,
$form_state
->
getValue
(
'lms_license_id'
))
->
save
();
...
...
app/modules/custom/support_dar/src/LicenseManager.php
View file @
1a824a03
...
...
@@ -33,13 +33,11 @@ class LicenseManager {
public
const
LICENSE_STATUS_STATE_KEY
=
'dar_license.license_status'
;
/**
* @todo replace on prod url.
*
* Url of license manager service.
*
* @var string
*/
private
string
$url
=
'h
ost.docker.internal:8001
'
;
private
string
$url
=
'h
ttps://lic.darcms.ru
'
;
/**
* Prefix to concatenate on every request.
...
...
@@ -151,7 +149,7 @@ class LicenseManager {
if
(
!
isset
(
$data
))
{
$data
=
[];
$config
=
$this
->
configFactory
->
get
(
SettingsForm
::
CONFIG_KEY
);
$data
[
'url'
]
=
$
config
->
get
(
'lms_site_url'
)
;
$data
[
'url'
]
=
$
this
->
url
;
$data
[
'api_token'
]
=
$config
->
get
(
'lms_api_token'
);
$data
[
'license_id'
]
=
$config
->
get
(
'lms_license_id'
);
}
...
...
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