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
183bb94a
Commit
183bb94a
authored
Mar 23, 2023
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: use correct notification message
parent
3d7a6ee9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
...tal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
+6
-2
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
View file @
183bb94a
...
@@ -16,6 +16,7 @@ ticket_title = node_ticket_title
...
@@ -16,6 +16,7 @@ ticket_title = node_ticket_title
description
=
""
description
=
""
last_contact
=
"No Contact Information"
last_contact
=
"No Contact Information"
issue_document_reference
=
""
notification_message_reference
=
'slapos-crm-compute_node_check_state.notification'
notification_message_reference
=
'slapos-crm-compute_node_check_state.notification'
now
=
DateTime
()
now
=
DateTime
()
...
@@ -36,8 +37,10 @@ else:
...
@@ -36,8 +37,10 @@ else:
data_array
=
context
.
ComputeNode_hasModifiedFile
()
data_array
=
context
.
ComputeNode_hasModifiedFile
()
if
data_array
:
if
data_array
:
should_notify
=
True
should_notify
=
True
notification_message_reference
=
"slapos-crm-compute_node_check_modified_file.notification"
ticket_title
=
"[MONITORING] Compute Node %s has modified file"
%
reference
ticket_title
=
"[MONITORING] Compute Node %s has modified file"
%
reference
description
=
"The Compute Node %s (%s) has modified file: %s"
%
(
compute_node_title
,
reference
,
data_array
.
getRelativeUrl
())
issue_document_reference
=
data_array
.
Reference
()
description
=
"The Compute Node %s (%s) has modified file: %s"
%
(
compute_node_title
,
reference
,
issue_document_reference
)
if
not
should_notify
:
if
not
should_notify
:
# Since server is contacting, check for stalled processes
# Since server is contacting, check for stalled processes
...
@@ -107,7 +110,8 @@ if should_notify:
...
@@ -107,7 +110,8 @@ if should_notify:
else
:
else
:
mapping_dict
=
{
'compute_node_title'
:
context
.
getTitle
(),
mapping_dict
=
{
'compute_node_title'
:
context
.
getTitle
(),
'compute_node_id'
:
reference
,
'compute_node_id'
:
reference
,
'last_contact'
:
last_contact
}
'last_contact'
:
last_contact
,
'issue_document_reference'
:
issue_document_reference
}
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