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
Carlos Ramos Carreño
slapos.core
Commits
cb5e1ffc
Commit
cb5e1ffc
authored
Jan 31, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
slapos_crm: Consider the default as "disabled" for monitor_scope
See merge request
nexedi/slapos.core!600
parents
8967ca45
d127603b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
10 deletions
+11
-10
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkSoftwareInstallationState.py
..._monitoring/ComputeNode_checkSoftwareInstallationState.py
+1
-1
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
...tal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
+1
-1
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/InstanceTree_checkSoftwareInstanceState.py
...crm_monitoring/InstanceTree_checkSoftwareInstanceState.py
+1
-1
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_getInstanceMessageList.py
...s_crm_monitoring/SupportRequest_getInstanceMessageList.py
+1
-1
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
...slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
+3
-3
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+4
-3
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkSoftwareInstallationState.py
View file @
cb5e1ffc
...
@@ -3,7 +3,7 @@ portal = context.getPortalObject()
...
@@ -3,7 +3,7 @@ portal = context.getPortalObject()
person
=
context
.
getSourceAdministrationValue
(
portal_type
=
"Person"
)
person
=
context
.
getSourceAdministrationValue
(
portal_type
=
"Person"
)
if
not
person
or
\
if
not
person
or
\
context
.
getMonitorScope
()
==
"disabled"
or
\
context
.
getMonitorScope
(
"disabled"
)
==
"disabled"
or
\
portal
.
ERP5Site_isSupportRequestCreationClosed
():
portal
.
ERP5Site_isSupportRequestCreationClosed
():
return
return
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
View file @
cb5e1ffc
...
@@ -3,7 +3,7 @@ portal = context.getPortalObject()
...
@@ -3,7 +3,7 @@ portal = context.getPortalObject()
person
=
context
.
getSourceAdministrationValue
(
portal_type
=
"Person"
)
person
=
context
.
getSourceAdministrationValue
(
portal_type
=
"Person"
)
if
not
person
or
\
if
not
person
or
\
context
.
getMonitorScope
()
==
"disabled"
or
\
context
.
getMonitorScope
(
"disabled"
)
==
"disabled"
or
\
portal
.
ERP5Site_isSupportRequestCreationClosed
():
portal
.
ERP5Site_isSupportRequestCreationClosed
():
return
return
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/InstanceTree_checkSoftwareInstanceState.py
View file @
cb5e1ffc
...
@@ -4,7 +4,7 @@ from erp5.component.module.DateUtils import addToDate
...
@@ -4,7 +4,7 @@ from erp5.component.module.DateUtils import addToDate
instance_tree
=
context
instance_tree
=
context
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
if
instance_tree
.
getMonitorScope
()
==
"disabled"
:
if
instance_tree
.
getMonitorScope
(
"disabled"
)
==
"disabled"
:
# Don't generate ticket if Monitor Scope is marked to disable
# Don't generate ticket if Monitor Scope is marked to disable
return
return
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_getInstanceMessageList.py
View file @
cb5e1ffc
...
@@ -13,7 +13,7 @@ if document is None:
...
@@ -13,7 +13,7 @@ if document is None:
aggregate_portal_type
=
document
.
getPortalType
()
aggregate_portal_type
=
document
.
getPortalType
()
if
aggregate_portal_type
in
[
"Compute Node"
,
"Instance Tree"
]
and
\
if
aggregate_portal_type
in
[
"Compute Node"
,
"Instance Tree"
]
and
\
document
.
getMonitorScope
()
==
"disabled"
:
document
.
getMonitorScope
(
"disabled"
)
==
"disabled"
:
return
[]
return
[]
if
aggregate_portal_type
==
"Instance Tree"
:
if
aggregate_portal_type
==
"Instance Tree"
:
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
View file @
cb5e1ffc
...
@@ -14,7 +14,7 @@ if document is None:
...
@@ -14,7 +14,7 @@ if document is None:
aggregate_portal_type
=
document
.
getPortalType
()
aggregate_portal_type
=
document
.
getPortalType
()
if
aggregate_portal_type
==
"Compute Node"
:
if
aggregate_portal_type
==
"Compute Node"
:
if
document
.
getMonitorScope
()
==
"disabled"
:
if
document
.
getMonitorScope
(
"disabled"
)
==
"disabled"
:
return
"Monitor is disabled to the related %s."
%
document
.
getPortalType
()
return
"Monitor is disabled to the related %s."
%
document
.
getPortalType
()
d
=
document
.
getAccessStatus
()
d
=
document
.
getAccessStatus
()
...
@@ -65,7 +65,7 @@ if aggregate_portal_type == "Compute Node":
...
@@ -65,7 +65,7 @@ if aggregate_portal_type == "Compute Node":
if
aggregate_portal_type
==
"Software Installation"
:
if
aggregate_portal_type
==
"Software Installation"
:
compute_node_title
=
document
.
getAggregateTitle
()
compute_node_title
=
document
.
getAggregateTitle
()
if
document
.
getAggregateValue
().
getMonitorScope
()
==
"disabled"
:
if
document
.
getAggregateValue
().
getMonitorScope
(
"disabled"
)
==
"disabled"
:
return
"Monitor is disabled to the related %s."
%
document
.
getPortalType
()
return
"Monitor is disabled to the related %s."
%
document
.
getPortalType
()
if
document
.
getSlapState
()
not
in
[
"start_requested"
,
"stop_requested"
]:
if
document
.
getSlapState
()
not
in
[
"start_requested"
,
"stop_requested"
]:
...
@@ -87,7 +87,7 @@ if aggregate_portal_type == "Software Installation":
...
@@ -87,7 +87,7 @@ if aggregate_portal_type == "Software Installation":
(
document
.
getUrlString
(),
compute_node_title
,
document
.
getCreationDate
())
(
document
.
getUrlString
(),
compute_node_title
,
document
.
getCreationDate
())
if
aggregate_portal_type
==
"Instance Tree"
:
if
aggregate_portal_type
==
"Instance Tree"
:
if
document
.
getMonitorScope
()
==
"disabled"
:
if
document
.
getMonitorScope
(
"disabled"
)
==
"disabled"
:
return
"Monitor is disabled to the related %s."
%
document
.
getPortalType
()
return
"Monitor is disabled to the related %s."
%
document
.
getPortalType
()
message_list
=
[]
message_list
=
[]
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
cb5e1ffc
...
@@ -689,9 +689,10 @@ class TestSlapOSHasError(SlapOSTestCaseMixin):
...
@@ -689,9 +689,10 @@ class TestSlapOSHasError(SlapOSTestCaseMixin):
instance_tree
.
validate
()
instance_tree
.
validate
()
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
instance_tree
.
edit
(
instance_tree
.
edit
(
title
=
"Test hosting sub ticket %s"
%
new_id
,
title
=
"Test hosting sub ticket %s"
%
new_id
,
reference
=
"TESTHST-%s"
%
new_id
,
reference
=
"TESTHST-%s"
%
new_id
,
destination_section_value
=
person
destination_section_value
=
person
,
monitor_scope
=
"enabled"
)
)
return
instance_tree
return
instance_tree
...
@@ -1036,7 +1037,7 @@ class TestSupportRequestUpdateMonitoringState(SlapOSTestCaseMixin):
...
@@ -1036,7 +1037,7 @@ class TestSupportRequestUpdateMonitoringState(SlapOSTestCaseMixin):
instance_tree
.
validate
()
instance_tree
.
validate
()
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
instance_tree
.
edit
(
instance_tree
.
edit
(
title
=
"Test hosting sub ticket %s"
%
new_id
,
title
=
"Test hosting sub ticket %s"
%
new_id
,
reference
=
"TESTHST-%s"
%
new_id
,
reference
=
"TESTHST-%s"
%
new_id
,
destination_section_value
=
person
destination_section_value
=
person
)
)
...
...
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