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
e5436bf4
Commit
e5436bf4
authored
Aug 18, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: add compute node request certificate action
parent
5481e121
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
348 additions
and
3 deletions
+348
-3
master/bt5/slapos_panel/ActionTemplateItem/portal_types/Compute%20Node/request_slapos_certificate_action.xml
...ypes/Compute%20Node/request_slapos_certificate_action.xml
+100
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Base_viewSlapOSComputeNodeCertificateDialog.xml
...pos_panel/Base_viewSlapOSComputeNodeCertificateDialog.xml
+2
-2
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Base_viewSlapOSComputeNodeCertificateDialog/your_compute_node_certificate.xml
...teNodeCertificateDialog/your_compute_node_certificate.xml
+0
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Base_viewSlapOSComputeNodeCertificateDialog/your_compute_node_key.xml
...pOSComputeNodeCertificateDialog/your_compute_node_key.xml
+0
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Base_viewSlapOSComputeNodeCertificateDialog/your_compute_node_reference.xml
...puteNodeCertificateDialog/your_compute_node_reference.xml
+0
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Base_viewSlapOSComputeNodeCertificateDialog/your_compute_node_relative_url.xml
...eNodeCertificateDialog/your_compute_node_relative_url.xml
+0
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/ComputeNode_requestCertificate.py
...rtal_skins/slapos_panel/ComputeNode_requestCertificate.py
+28
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/ComputeNode_requestCertificate.xml
...tal_skins/slapos_panel/ComputeNode_requestCertificate.xml
+62
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/ComputeNode_viewRequestCertificateDialog.xml
...slapos_panel/ComputeNode_viewRequestCertificateDialog.xml
+154
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_addSlapOSComputeNode.py
...portal_skins/slapos_panel/Project_addSlapOSComputeNode.py
+1
-1
master/bt5/slapos_panel/bt/template_action_path_list
master/bt5/slapos_panel/bt/template_action_path_list
+1
-0
No files found.
master/bt5/slapos_panel/ActionTemplateItem/portal_types/Compute%20Node/request_slapos_certificate_action.xml
0 → 100644
View file @
e5436bf4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
request_slapos_certificate_action
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
0.5
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Request Certificate
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ComputeNode_viewRequestCertificateDialog
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: context.Base_hasSlapOSProjectUserGroup(project_relation=\'follow_up\', manager=True, agent=True)
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Project
_viewSlapOSComputeNodeCertificateDialog.xml
→
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Base
_viewSlapOSComputeNodeCertificateDialog.xml
View file @
e5436bf4
...
...
@@ -116,7 +116,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Project
_viewSlapOSComputeNodeCertificateDialog
</string>
</value>
<value>
<string>
Base
_viewSlapOSComputeNodeCertificateDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
...
...
@@ -140,7 +140,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Add Compute Node
</string>
</value>
<value>
<string>
Copy Certificates
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Project
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_certificate.xml
→
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Base
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_certificate.xml
View file @
e5436bf4
File moved
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Project
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_key.xml
→
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Base
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_key.xml
View file @
e5436bf4
File moved
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Project
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_reference.xml
→
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Base
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_reference.xml
View file @
e5436bf4
File moved
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Project
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_relative_url.xml
→
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/
Base
_viewSlapOSComputeNodeCertificateDialog/your_compute_node_relative_url.xml
View file @
e5436bf4
File moved
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/ComputeNode_requestCertificate.py
0 → 100644
View file @
e5436bf4
from
Products.ERP5Type.Message
import
translateString
request
=
context
.
REQUEST
try
:
context
.
generateCertificate
()
except
ValueError
:
message
=
"This compute_node already has one certificate, please revoke it before request a new one.."
status
=
'warning'
return
context
.
Base_redirect
(
keep_items
=
{
'portal_status_message'
:
translateString
(
message
),
'portal_status_level'
:
status
}
)
else
:
message
=
"Certificate is Requested."
status
=
'success'
return
context
.
Base_renderForm
(
'Base_viewSlapOSComputeNodeCertificateDialog'
,
message
=
translateString
(
message
),
level
=
status
,
keep_items
=
{
'your_compute_node_certificate'
:
request
.
get
(
'compute_node_certificate'
),
'your_compute_node_key'
:
request
.
get
(
'compute_node_key'
),
'your_compute_node_reference'
:
context
.
getReference
(),
'your_compute_node_relative_url'
:
context
.
getRelativeUrl
()
}
)
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/ComputeNode_requestCertificate.xml
0 → 100644
View file @
e5436bf4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputeNode_requestCertificate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/ComputeNode_viewRequestCertificateDialog.xml
0 → 100644
View file @
e5436bf4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
ComputeNode_requestCertificate
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string>
multipart/form-data
</string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputeNode_viewRequestCertificateDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
ComputeNode_viewRequestCertificateDialog
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_dialog
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Request Certificate
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_addSlapOSComputeNode.py
View file @
e5436bf4
...
...
@@ -13,7 +13,7 @@ compute_node = context.restrictedTraverse(context.REQUEST.get('compute_node'))
compute_node
.
generateCertificate
()
return
context
.
Base_renderForm
(
'
Project
_viewSlapOSComputeNodeCertificateDialog'
,
'
Base
_viewSlapOSComputeNodeCertificateDialog'
,
message
=
'New Compute Node created.'
,
keep_items
=
{
'your_compute_node_certificate'
:
request
.
get
(
'compute_node_certificate'
),
...
...
master/bt5/slapos_panel/bt/template_action_path_list
View file @
e5436bf4
Compute Node | request_slapos_certificate_action
Compute Node | revoke_slapos_certificate
Compute Node | slapos_panel_view
Project Module | slapos_panel_view
...
...
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