Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
0
Merge Requests
0
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
Léo-Paul Géneau
erp5
Commits
ee81e26e
Commit
ee81e26e
authored
Sep 22, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_test_result: add jump between related objects
parent
034d42f7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
412 additions
and
0 deletions
+412
-0
bt5/erp5_test_result/ActionTemplateItem/portal_types/Project/jump_to_test_suite.xml
...nTemplateItem/portal_types/Project/jump_to_test_suite.xml
+100
-0
bt5/erp5_test_result/ActionTemplateItem/portal_types/Test%20Result/jump_to_test_suite.xml
...ateItem/portal_types/Test%20Result/jump_to_test_suite.xml
+100
-0
bt5/erp5_test_result/ActionTemplateItem/portal_types/Test%20Suite/jump_to_test_result.xml
...ateItem/portal_types/Test%20Suite/jump_to_test_result.xml
+100
-0
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/Base_jumpToObjectWithIdenticalTitle.py
...s/erp5_test_result/Base_jumpToObjectWithIdenticalTitle.py
+43
-0
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/Base_jumpToObjectWithIdenticalTitle.xml
.../erp5_test_result/Base_jumpToObjectWithIdenticalTitle.xml
+66
-0
bt5/erp5_test_result/bt/template_action_path_list
bt5/erp5_test_result/bt/template_action_path_list
+3
-0
No files found.
bt5/erp5_test_result/ActionTemplateItem/portal_types/Project/jump_to_test_suite.xml
0 → 100644
View file @
ee81e26e
<?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_jump
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_jump
</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>
jump_to_test_suite
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
6.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Test Suites
</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
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=source_project&portal_type=Test Suite
]]>
</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:portal.Base_checkPermission(\'test_suite_module\', \'View\')
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_test_result/ActionTemplateItem/portal_types/Test%20Result/jump_to_test_suite.xml
0 → 100644
View file @
ee81e26e
<?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_jump
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_jump
</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>
jump_to_test_suite
</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>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Test Suites
</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}/Base_jumpToObjectWithIdenticalTitle?portal_type=Test Suite
</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:portal.Base_checkPermission(\'test_suite_module\', \'View\')
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_test_result/ActionTemplateItem/portal_types/Test%20Suite/jump_to_test_result.xml
0 → 100644
View file @
ee81e26e
<?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_jump
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_jump
</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>
jump_to_test_result
</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>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Test Results
</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}/Base_jumpToObjectWithIdenticalTitle?portal_type=Test Result
</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:portal.Base_checkPermission(\'test_result_module\', \'View\')
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/Base_jumpToObjectWithIdenticalTitle.py
0 → 100644
View file @
ee81e26e
# from ZTUtils import make_query
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
if
not
same_type
(
portal_type
,
''
):
# To be improve, but it is enough for Test Result, Suite for now
raise
NotImplementedError
(
'Only support single portal type'
)
query_params
=
{}
related_list
=
portal
.
portal_catalog
(
portal_type
=
portal_type
,
limit
=
2
,
title
=
context
.
getTitle
())
if
len
(
related_list
)
==
0
:
redirect_context
=
context
message
=
Base_translateString
(
'No %s Related'
%
portal_type
[
0
],
default
=
Base_translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
Base_translateString
(
portal_type
)}))
else
:
redirect_context
=
related_list
[
0
]
message
=
Base_translateString
(
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
redirect_context
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
default
=
Base_translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
redirect_context
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),)
if
(
len
(
related_list
)
>
1
):
# jump to the module if we can guess it
module_id
=
portal
.
getDefaultModuleId
(
portal_type
,
None
)
if
module_id
is
None
:
raise
NotImplementedError
(
'Can only search in module, not %s'
%
portal_type
)
redirect_context
=
portal
.
getDefaultModule
(
portal_type
)
query_params
[
'title'
]
=
context
.
getTitle
()
query_params
[
'portal_status_message'
]
=
message
return
redirect_context
.
Base_redirect
(
'view'
,
keep_items
=
query_params
)
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/Base_jumpToObjectWithIdenticalTitle.xml
0 → 100644
View file @
ee81e26e
<?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>
portal_type
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_jumpToObjectWithIdenticalTitle
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_test_result/bt/template_action_path_list
View file @
ee81e26e
...
@@ -4,6 +4,7 @@ Cloud Performance Unit Test Distributor | view
...
@@ -4,6 +4,7 @@ Cloud Performance Unit Test Distributor | view
ERP5 Project Unit Test Distributor | view
ERP5 Project Unit Test Distributor | view
ERP5 Scalability Distributor | view
ERP5 Scalability Distributor | view
Gitlab REST Connector | view
Gitlab REST Connector | view
Project | jump_to_test_suite
Scalability Test Suite | vcs_repository
Scalability Test Suite | vcs_repository
Scalability Test Suite | view
Scalability Test Suite | view
SlapOS Agent Distributor | view
SlapOS Agent Distributor | view
...
@@ -24,6 +25,7 @@ Test Result Module | view_test_result_diff
...
@@ -24,6 +25,7 @@ Test Result Module | view_test_result_diff
Test Result Node | view
Test Result Node | view
Test Result | jump_previous_test_result
Test Result | jump_previous_test_result
Test Result | jump_test_suite
Test Result | jump_test_suite
Test Result | jump_to_test_suite
Test Result | jump_viewvc_revision
Test Result | jump_viewvc_revision
Test Result | view
Test Result | view
Test Result | view_graph
Test Result | view_graph
...
@@ -31,5 +33,6 @@ Test Result | view_node_list
...
@@ -31,5 +33,6 @@ Test Result | view_node_list
Test Result | view_performance_graph
Test Result | view_performance_graph
Test Suite Module | view
Test Suite Module | view
Test Suite Repository | view
Test Suite Repository | view
Test Suite | jump_to_test_result
Test Suite | periodicity
Test Suite | periodicity
Test Suite | view
Test Suite | view
\ No newline at end of file
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