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
18
Merge Requests
18
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
nexedi
slapos.core
Commits
26ed57cc
Commit
26ed57cc
authored
Jun 04, 2019
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Add report to list the failing instances related to Support Request
parent
41a3f7d1
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1051 additions
and
0 deletions
+1051
-0
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Support%20Request%20Module/slapos_support_request_instance_message_report.xml
...Module/slapos_support_request_instance_message_report.xml
+81
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList.py
...monitoring/SupportRequestModule_getInstanceMessageList.py
+10
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList.xml
...onitoring/SupportRequestModule_getInstanceMessageList.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_viewInstanceMessageList.xml
...nitoring/SupportRequestModule_viewInstanceMessageList.xml
+152
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_viewInstanceMessageList/listbox.xml
.../SupportRequestModule_viewInstanceMessageList/listbox.xml
+626
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_getInstanceMessageList.py
...s_crm_monitoring/SupportRequest_getInstanceMessageList.py
+57
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_getInstanceMessageList.xml
..._crm_monitoring/SupportRequest_getInstanceMessageList.xml
+62
-0
master/bt5/slapos_crm/bt/template_action_path_list
master/bt5/slapos_crm/bt/template_action_path_list
+1
-0
No files found.
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Support%20Request%20Module/slapos_support_request_instance_message_report.xml
0 → 100644
View file @
26ed57cc
<?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_report
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_report
</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>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_support_request_instance_message_report
</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>
9.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Support Request Instance Message Report
</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}/SupportRequestModule_viewInstanceMessageList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList.py
0 → 100644
View file @
26ed57cc
portal
=
context
.
getPortalObject
()
instance_list
=
[]
for
support_request
in
portal
.
portal_catalog
(
portal_type
=
"Support Request"
,
simulation_state
=
[
"validated"
,
"suspended"
]):
instance_list
.
extend
(
support_request
.
SupportRequest_getInstanceMessageList
())
return
instance_list
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList.xml
0 → 100644
View file @
26ed57cc
<?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>
SupportRequestModule_getInstanceMessageList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_viewInstanceMessageList.xml
0 → 100644
View file @
26ed57cc
<?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>
SupportRequestModule_viewInstanceMessageList
</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>
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>
<string>
listbox
</string>
</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>
SupportRequestModule_viewInstanceMessageList
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
SupportRequestModule_viewInstanceMessageList
</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>
Update
</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/SupportRequestModule_viewInstanceMessageList/listbox.xml
0 → 100644
View file @
26ed57cc
This diff is collapsed.
Click to expand it.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_getInstanceMessageList.py
0 → 100644
View file @
26ed57cc
from
Products.ERP5Type.Document
import
newTempDocument
from
DateTime
import
DateTime
if
context
.
getSimulationState
()
==
"invalidated"
:
return
[]
document
=
context
.
getAggregateValue
()
if
document
is
None
:
return
[]
aggregate_portal_type
=
document
.
getPortalType
()
if
aggregate_portal_type
in
[
"Computer"
,
"Hosting Subscription"
]
and
\
document
.
getMonitorScope
()
==
"disabled"
:
return
[]
if
aggregate_portal_type
==
"Hosting Subscription"
:
message_list
=
[]
hosting_subscription
=
document
software_instance_list
=
hosting_subscription
.
getSpecialiseRelatedValueList
(
portal_type
=
[
"Software Instance"
,
"Slave Instance"
])
# Check if at least one software Instance is Allocated
for
instance
in
software_instance_list
:
if
instance
.
getSlapState
()
not
in
[
"start_requested"
,
"stop_requested"
]:
continue
if
instance
.
getAggregate
()
is
not
None
:
computer
=
instance
.
getAggregateValue
().
getParentValue
()
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
instance
.
getSlapState
()
==
"start_requested"
and
\
instance
.
SoftwareInstance_hasReportedError
():
message_list
.
append
(
newTempDocument
(
document
,
instance
.
getRelativeUrl
(),
**
{
"uid"
:
instance
.
getUid
(),
"title"
:
instance
.
getTitle
(),
"specialise_title"
:
hosting_subscription
.
getTitle
(),
"software_release"
:
instance
.
getUrlString
(),
"computer_reference"
:
computer
.
getReference
(),
"allocation_scope"
:
computer
.
getAllocationScope
(),
"message"
:
instance
.
SoftwareInstance_hasReportedError
(
include_message
=
True
)}))
else
:
message_list
.
append
(
newTempDocument
(
document
,
instance
.
getRelativeUrl
(),
**
{
"uid"
:
instance
.
getUid
(),
"title"
:
instance
.
title
(),
"specialise_title"
:
hosting_subscription
.
getTitle
(),
"software_release"
:
instance
.
getUrlString
(),
"computer_reference"
:
""
,
"allocation_scope"
:
""
,
"message"
:
"Instance isn't allocated"
}))
return
message_list
return
[]
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_getInstanceMessageList.xml
0 → 100644
View file @
26ed57cc
<?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>
SupportRequest_getInstanceMessageList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/bt/template_action_path_list
View file @
26ed57cc
...
...
@@ -13,6 +13,7 @@ Regularisation Request | view
Site Message | update_destination_for_slapos
Support Request Module | rss_view
Support Request Module | slapos_support_request_activity_report
Support Request Module | slapos_support_request_instance_message_report
Support Request Module | support_request_monitor_link
Support Request Module | support_request_monitor_opml_description_list
Support Request | jump_related_slapos_item
...
...
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