Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
f36966f3
Commit
f36966f3
authored
Jun 23, 2011
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DCWorkflowGraph problem was already solved by external python package.
parent
a0dfdc15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
52 deletions
+0
-52
product/ERP5Type/ZopePatch.py
product/ERP5Type/ZopePatch.py
+0
-1
product/ERP5Type/patches/DCWorkflowGraph.py
product/ERP5Type/patches/DCWorkflowGraph.py
+0
-51
No files found.
product/ERP5Type/ZopePatch.py
View file @
f36966f3
...
...
@@ -28,7 +28,6 @@ from Products.ERP5Type.patches import PropertyManager
from
Products.ERP5Type.patches
import
TM
from
Products.ERP5Type.patches
import
DA
from
Products.ERP5Type.patches
import
DCWorkflow
from
Products.ERP5Type.patches
import
DCWorkflowGraph
from
Products.ERP5Type.patches
import
Worklists
from
Products.ERP5Type.patches
import
BTreeFolder2
from
Products.ERP5Type.patches
import
WorkflowTool
...
...
product/ERP5Type/patches/DCWorkflowGraph.py
deleted
100644 → 0
View file @
a0dfdc15
#########################################################################
# This code is taken from Products.DCWorkflowGraph-0.4-py2.6.egg
# http://pypi.python.org/pypi/Products.DCWorkflowGraph
# Author: panjunyong (panjy at zopen.cn, from ZOpen) <panjy at zopen cn>
# License: ZPL
# The license term should be this one: http://www.zope.org/Resources/ZPL
#########################################################################
try
:
from
Products.DCWorkflowGraph
import
DCWorkflowGraph
from
Products.DCWorkflowGraph.DCWorkflowGraph
import
(
getPOT
,
mktemp
,
os
,
bin_search
,
DOT_EXE
)
except
ImportError
:
DCWorkflowGraph
=
None
if
DCWorkflowGraph
is
not
None
:
def
getGraph
(
self
,
wf_id
=
""
,
format
=
"gif"
,
REQUEST
=
None
):
"""show a workflow as a graph, copy from:
"OpenFlowEditor":http://www.openflow.it/wwwopenflow/Download/OpenFlowEditor_0_4.tgz
"""
pot
=
getPOT
(
self
,
wf_id
,
REQUEST
)
encoding
=
'utf-8'
#### PATCHED
pot
=
pot
.
encode
(
encoding
)
infile
=
mktemp
(
'.dot'
)
f
=
open
(
infile
,
'w'
)
f
.
write
(
pot
)
f
.
close
()
if
REQUEST
is
None
:
REQUEST
=
self
.
REQUEST
response
=
REQUEST
.
RESPONSE
if
format
!=
'dot'
:
outfile
=
mktemp
(
'.%s'
%
format
)
os
.
system
(
'%s -T%s -o %s %s'
%
(
bin_search
(
DOT_EXE
),
format
,
outfile
,
infile
))
out
=
open
(
outfile
,
'rb'
)
result
=
out
.
read
()
out
.
close
()
os
.
remove
(
outfile
)
response
.
setHeader
(
'Content-Type'
,
'image/%s'
%
format
)
else
:
result
=
open
(
infile
,
'r'
).
read
()
filename
=
wf_id
or
self
.
getId
()
response
.
setHeader
(
'Content-Type'
,
'text/x-graphviz'
)
response
.
setHeader
(
'Content-Disposition'
,
'attachment; filename=%s.dot'
%
filename
)
os
.
remove
(
infile
)
return
result
from
Products.DCWorkflow.DCWorkflow
import
DCWorkflowDefinition
DCWorkflowDefinition
.
getGraph
=
getGraph
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