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
Arnaud Véron
slapos.core
Commits
e8d307fe
Commit
e8d307fe
authored
Nov 27, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm_monitoring: add error message in generated ticket for hosting subscription
parent
25d42cb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/HostingSubscription_createSupportRequestEvent.py
...nitoring/HostingSubscription_createSupportRequestEvent.py
+7
-1
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/HostingSubscription_createSupportRequestEvent.py
View file @
e8d307fe
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
ticket_title
=
"Hosting Subscription %s is failing."
%
context
.
getTitle
()
ticket_title
=
"Hosting Subscription %s is failing."
%
context
.
getTitle
()
error_message
=
instance
.
SoftwareInstance_hasReportedError
(
include_message
=
True
)
description
=
"%s contains software instances which are unallocated or reporting errors."
%
(
description
=
"%s contains software instances which are unallocated or reporting errors."
%
(
context
.
getTitle
())
context
.
getTitle
())
if
error_message
:
description
+=
"
\
n
\
n
Message: %s"
%
error_message
else
:
error_message
=
"No message!"
support_request
=
context
.
Base_generateSupportRequestForSlapOS
(
support_request
=
context
.
Base_generateSupportRequestForSlapOS
(
ticket_title
,
ticket_title
,
...
@@ -28,7 +33,8 @@ notification_message = portal.portal_notifications.getDocumentValue(
...
@@ -28,7 +33,8 @@ notification_message = portal.portal_notifications.getDocumentValue(
reference
=
notification_reference
)
reference
=
notification_reference
)
if
notification_message
is
not
None
:
if
notification_message
is
not
None
:
mapping_dict
=
{
'hosting_subscription_title'
:
context
.
getTitle
(),
mapping_dict
=
{
'hosting_subscription_title'
:
context
.
getTitle
(),
'instance'
:
instance
.
getTitle
()}
'instance'
:
instance
.
getTitle
(),
'error_text'
:
error_message
}
message
=
notification_message
.
asText
(
message
=
notification_message
.
asText
(
substitution_method_parameter_dict
=
{
'mapping_dict'
:
mapping_dict
})
substitution_method_parameter_dict
=
{
'mapping_dict'
:
mapping_dict
})
...
...
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