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
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
Xavier Thompson
slapos.core
Commits
95d11f41
Commit
95d11f41
authored
Sep 02, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Fix up action to get RSS Feed on Ticket Relate Modules
Include action for Incident Report Module
parent
360bbd9c
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
691 additions
and
5 deletions
+691
-5
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Incident%20Response%20Module/rss_view.xml
...em/portal_types/Incident%20Response%20Module/rss_view.xml
+100
-0
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Regularisation%20Request%20Module/rss_view.xml
...rtal_types/Regularisation%20Request%20Module/rss_view.xml
+2
-2
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Support%20Request%20Module/rss_view.xml
...Item/portal_types/Support%20Request%20Module/rss_view.xml
+2
-2
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_getTicketFeedUrl.py
...al_skins/slapos_crm_monitoring/Folder_getTicketFeedUrl.py
+34
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_getTicketFeedUrl.xml
...l_skins/slapos_crm_monitoring/Folder_getTicketFeedUrl.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_viewOpenTicketFeedURL.xml
...ns/slapos_crm_monitoring/Folder_viewOpenTicketFeedURL.xml
+135
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_viewOpenTicketFeedURL/your_feed_url.xml
...monitoring/Folder_viewOpenTicketFeedURL/your_feed_url.xml
+327
-0
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+26
-0
master/bt5/slapos_crm/bt/template_action_path_list
master/bt5/slapos_crm/bt/template_action_path_list
+1
-0
master/bt5/slapos_rss_style/bt/dependency_list
master/bt5/slapos_rss_style/bt/dependency_list
+2
-1
No files found.
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Incident%20Response%20Module/rss_view.xml
0 → 100644
View file @
95d11f41
<?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_button
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_button
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
rss_view
</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>
30.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
RSS Feed
</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}/Folder_viewOpenTicketFeedURL
</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>
string:rss_feed_image
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Regularisation%20Request%20Module/rss_view.xml
View file @
95d11f41
...
...
@@ -62,7 +62,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
RSS
Monitoring Support Request List
</string>
</value>
<value>
<string>
RSS
Feed
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
...
...
@@ -79,7 +79,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Folder_viewOpenTicket
List?portal_skin=RSS
</string>
</value>
<value>
<string>
string:${object_url}/Folder_viewOpenTicket
FeedURL
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Support%20Request%20Module/rss_view.xml
View file @
95d11f41
...
...
@@ -62,7 +62,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
RSS
Monitoring Support Request List
</string>
</value>
<value>
<string>
RSS
Feed
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
...
...
@@ -79,7 +79,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Folder_viewOpenTicket
List?portal_skin=RSS
</string>
</value>
<value>
<string>
string:${object_url}/Folder_viewOpenTicket
FeedURL
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_getTicketFeedUrl.py
0 → 100644
View file @
95d11f41
portal
=
context
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
person
is
None
:
raise
ValueError
(
"User Not Found"
)
request_url
=
"%s/Folder_viewOpenTicketList"
%
context
.
absolute_url
()
# XXX - Cannot search in catalog with parameter url_string
access_token
=
None
for
token_item
in
portal
.
portal_catalog
(
portal_type
=
"Restricted Access Token"
,
default_agent_uid
=
person
.
getUid
(),
validation_state
=
'validated'
):
if
token_item
.
getUrlString
()
==
request_url
:
access_token
=
token_item
reference
=
access_token
.
getReference
()
break
if
access_token
is
None
:
access_token
=
portal
.
access_token_module
.
newContent
(
portal_type
=
"Restricted Access Token"
,
url_string
=
request_url
,
url_method
=
"GET"
,
)
access_token
.
setAgentValue
(
person
)
reference
=
access_token
.
getReference
()
access_token
.
validate
()
return
"%s?portal_skin=RSS&access_token=%s&access_token_secret=%s"
%
(
request_url
,
access_token
.
getId
(),
reference
)
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_getTicketFeedUrl.xml
0 → 100644
View file @
95d11f41
<?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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Folder_getTicketFeedUrl
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_viewOpenTicketFeedURL.xml
0 → 100644
View file @
95d11f41
<?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></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></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<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>
<string>
your_feed_url
</string>
</list>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Folder_viewOpenTicketFeedURL
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Folder_viewOpenTicketFeedURL
</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>
RSS Feed
</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_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Folder_viewOpenTicketFeedURL/your_feed_url.xml
0 → 100644
View file @
95d11f41
This diff is collapsed.
Click to expand it.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
95d11f41
...
...
@@ -1399,3 +1399,29 @@ class TestSupportRequestUpdateMonitoringState(SlapOSTestCaseMixin):
self
.
assertEqual
(
"invalidated"
,
support_request
.
getSimulationState
())
class
TestSlapOSFolder_getTicketFeedUrl
(
TestCRMSkinsMixin
):
def
_test
(
self
,
module
):
self
.
assertRaises
(
ValueError
,
module
.
Folder_getTicketFeedUrl
)
person
=
self
.
makePerson
(
user
=
1
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
url
=
module
.
Folder_getTicketFeedUrl
()
self
.
assertIn
(
'Folder_viewOpenTicketList'
,
url
)
self
.
assertIn
(
module
.
absolute_url
(),
url
)
self
.
assertIn
(
'access_token_secret'
,
url
)
self
.
assertIn
(
'access_token='
,
url
)
self
.
assertIn
(
'portal_skin=RSS'
,
url
)
def
test_Folder_getTicketFeedUrl_support_request_module
(
self
):
self
.
_test
(
self
.
portal
.
support_request_module
)
def
test_Folder_getTicketFeedUrl_regularisation_request_module
(
self
):
self
.
_test
(
self
.
portal
.
regularisation_request_module
)
def
test_Folder_getTicketFeedUrl_incident_response_module
(
self
):
self
.
_test
(
self
.
portal
.
incident_response_module
)
master/bt5/slapos_crm/bt/template_action_path_list
View file @
95d11f41
Compute Node Module | slapos_ticket_activity_report
Compute Node | view_related_support_request
Incident Response Module | rss_view
Incident Response Module | view
Incident Response | view
Instance Tree Module | slapos_resilience_usage_report
...
...
master/bt5/slapos_rss_style/bt/dependency_list
View file @
95d11f41
slapos_web
erp5_rss_style
\ No newline at end of file
erp5_rss_style
slapos_crm
\ 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