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
Cédric Le Ninivin
slapos.core
Commits
bf9a98ab
Commit
bf9a98ab
authored
Oct 02, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: remove unused script
parent
d241a081
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
110 deletions
+0
-110
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getTicketActivityReportList.py
...oring/SupportRequestModule_getTicketActivityReportList.py
+0
-48
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getTicketActivityReportList.xml
...ring/SupportRequestModule_getTicketActivityReportList.xml
+0
-62
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getTicketActivityReportList.py
deleted
100644 → 0
View file @
d241a081
from
DateTime
import
DateTime
from
Products.ERP5Type.Document
import
newTempDocument
portal
=
context
.
getPortalObject
()
# Hardcode the Date Range here
today
=
DateTime
()
date_set
=
set
([
"%s/%02d"
%
((
today
-
x
).
year
(),
(
today
-
x
).
month
())
for
x
in
range
(
0
,
370
,
27
)])
def
getSupportRequestList
(
creation_date
,
resource_uid
=
None
):
return
portal
.
portal_catalog
(
portal_type
=
"Support Request"
,
default_resource_uid
=
resource_uid
,
creation_date
=
creation_date
)
def
countSupportRequest
(
creation_date
,
resource_uid
=
None
):
return
len
(
getSupportRequestList
(
creation_date
,
resource_uid
))
def
countEvent
(
creation_date
,
resource_uid
=
None
):
sr_uid_list
=
[
sr
.
uid
for
sr
in
getSupportRequestList
(
creation_date
,
resource_uid
)]
if
not
sr_uid_list
:
return
0
return
portal
.
portal_catalog
.
countResults
(
default_follow_up_uid
=
[
sr
.
uid
for
sr
in
getSupportRequestList
(
creation_date
,
resource_uid
)],
creation_date
=
creation_date
)[
0
][
0
]
monitor_resource_uid
=
context
.
service_module
.
slapos_crm_monitoring
.
getUid
()
stats_list
=
[]
creation_date_list
=
list
(
date_set
)
creation_date_list
.
sort
()
for
creation_date
in
creation_date_list
:
line
=
newTempDocument
(
context
,
'%s'
%
creation_date
.
replace
(
"/"
,
"_"
),
**
{
"uid"
:
"%s_%s"
%
(
context
.
getUid
(),
len
(
stats_list
)),
"title"
:
creation_date
,
"event_user_amount"
:
countEvent
(
creation_date
,
resource_uid
=
'NOT %s'
%
monitor_resource_uid
),
"user_amount"
:
countSupportRequest
(
creation_date
,
resource_uid
=
'NOT %s'
%
monitor_resource_uid
),
"monitor_amount"
:
countSupportRequest
(
creation_date
,
resource_uid
=
monitor_resource_uid
),
"event_monitor_amount"
:
countEvent
(
creation_date
,
resource_uid
=
monitor_resource_uid
)})
stats_list
.
append
(
line
)
return
stats_list
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequestModule_getTicketActivityReportList.xml
deleted
100644 → 0
View file @
d241a081
<?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_getTicketActivityReportList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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