Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
477a4db4
Commit
477a4db4
authored
Aug 10, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: drop hardcoded url
parent
f75631c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_addSlapOSComputeNodeToken.py
...l_skins/slapos_panel/Project_addSlapOSComputeNodeToken.py
+13
-3
No files found.
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_addSlapOSComputeNodeToken.py
View file @
477a4db4
...
@@ -2,6 +2,19 @@ portal = context.getPortalObject()
...
@@ -2,6 +2,19 @@ portal = context.getPortalObject()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
web_site
=
context
.
getWebSiteValue
()
web_site
=
context
.
getWebSiteValue
()
slapos_master_api
=
web_site
.
getLayoutProperty
(
"configuration_slapos_master_api"
,
None
)
if
slapos_master_api
is
None
:
return
context
.
Base_redirect
(
keep_items
=
{
'portal_status_message'
:
'configuration_slapos_master_api is not configured'
,
'portal_status_level'
:
'error'
}
)
# This url is only used to call 1 (one) python script.
# it could be whatever url able to reach erp5
slapos_master_web_url
=
web_site
.
getLayoutProperty
(
slapos_master_web_url
=
web_site
.
getLayoutProperty
(
"configuration_slapos_master_web_url"
,
"configuration_slapos_master_web_url"
,
default
=
web_site
.
absolute_url
()
default
=
web_site
.
absolute_url
()
...
@@ -29,9 +42,6 @@ access_token = portal.access_token_module.newContent(
...
@@ -29,9 +42,6 @@ access_token = portal.access_token_module.newContent(
access_token_id
=
access_token
.
getId
()
access_token_id
=
access_token
.
getId
()
access_token
.
validate
()
access_token
.
validate
()
slapos_master_api
=
web_site
.
getLayoutProperty
(
"configuration_slapos_master_api"
,
"https://slap.vifib.com"
)
compute_node_install_command_line
=
web_site
.
getLayoutProperty
(
compute_node_install_command_line
=
web_site
.
getLayoutProperty
(
"configuration_compute_node_install_command_line"
,
"configuration_compute_node_install_command_line"
,
"wget https://deploy.erp5.net/slapos ; bash slapos"
)
"wget https://deploy.erp5.net/slapos ; bash slapos"
)
...
...
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