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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
851fb79e
Commit
851fb79e
authored
Dec 18, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: bang action for the admin
parent
992b1053
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
175 additions
and
0 deletions
+175
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+1
-0
master/bt5/slapos_panel/ActionTemplateItem/portal_types/Instance%20Tree/slapos_force_reprocess.xml
...m/portal_types/Instance%20Tree/slapos_force_reprocess.xml
+100
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/InstanceTree_requestBang.py
...tem/portal_skins/slapos_panel/InstanceTree_requestBang.py
+11
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/InstanceTree_requestBang.xml
...em/portal_skins/slapos_panel/InstanceTree_requestBang.xml
+62
-0
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_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
851fb79e
...
...
@@ -228,6 +228,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_panel/InstanceTreeModule_selectRequestProject'
,
'slapos_panel/InstanceTree_redirectToManualDepositPayment'
,
'slapos_panel/InstanceTree_addSlapOSInstanceNode'
,
'slapos_panel/InstanceTree_requestBang'
,
'slapos_panel/InstanceTree_getConnectionParameterList'
,
'slapos_panel/InstanceTree_getMonitorParameterDict'
,
'slapos_panel/InstanceTree_getNewsDict'
,
...
...
master/bt5/slapos_panel/ActionTemplateItem/portal_types/Instance%20Tree/slapos_force_reprocess.xml
0 → 100644
View file @
851fb79e
<?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_fast_input
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_fast_input
</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>
slapos_force_reprocess
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
Modify portal content
</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>
20.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Force Reprocess
</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}/InstanceTree_requestBang
</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) and (context.getSlapState() != \'destroy_requested\')
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/InstanceTree_requestBang.py
0 → 100644
View file @
851fb79e
instance_tree
=
context
instance
=
([
x
for
x
in
instance_tree
.
getSuccessorValueList
()
if
(
x
.
getTitle
()
==
instance_tree
.
getTitle
())
and
(
x
.
getSlapState
()
!=
'destroy_requested'
)]
+
[
None
])[
0
]
if
(
instance
is
None
)
or
(
instance
.
getSlapState
()
==
'destroy_requested'
):
return
context
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
context
.
Base_translateString
(
'No root instance to process.'
)})
instance
.
bang
(
comment
=
'Force reprocess from panel'
,
bang_tree
=
True
)
return
instance_tree
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
context
.
Base_translateString
(
'Reprocessing requested.'
)})
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/InstanceTree_requestBang.xml
0 → 100644
View file @
851fb79e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InstanceTree_requestBang
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel/bt/template_action_path_list
View file @
851fb79e
...
...
@@ -33,6 +33,7 @@ Instance Tree Module | slapos_panel_view_my_instance_tree_list
Instance Tree | add_slapos_instance_node
Instance Tree | add_slapos_support_request
Instance Tree | slapos_create_upgrade_decision
Instance Tree | slapos_force_reprocess
Instance Tree | slapos_panel_view
Instance Tree | slapos_request_hs_start
Instance Tree | slapos_request_hs_stop
...
...
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