Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
337c9aea
Commit
337c9aea
authored
Feb 13, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction on how ManPy returns the trace and how the plugin sends it back to the platform
parent
4a85c766
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
dream/plugins/ParseTraceFile.py
dream/plugins/ParseTraceFile.py
+2
-4
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+5
-4
No files found.
dream/plugins/ParseTraceFile.py
View file @
337c9aea
...
...
@@ -9,12 +9,10 @@ class ParseTraceFile(plugin.OutputPreparationPlugin):
outPutFile
=
None
for
record
in
data
[
'result'
][
'result_list'
][
-
1
][
'elementList'
]:
if
record
.
get
(
'id'
,
None
)
==
'TraceFile'
:
outPutFile
=
record
outPutFile
=
record
[
'results'
][
'trace'
]
data
[
'result'
][
'result_list'
][
-
1
][
self
.
configuration_dict
[
'output_id'
]]
=
{
'name'
:
'Trace.xls
x
'
,
'name'
:
'Trace.xls'
,
'mime_type'
:
'application/vnd.ms-excel'
,
'data'
:
outPutFile
}
print
data
[
'result'
][
'result_list'
][
-
1
][
self
.
configuration_dict
[
'output_id'
]][
'data'
]
return
data
dream/simulation/LineGenerationJSON.py
View file @
337c9aea
...
...
@@ -668,6 +668,10 @@ def main(argv=[], input_data=None):
#output trace to excel
if
(
G
.
trace
==
"Yes"
):
ExcelHandler
.
outputTrace
(
'trace'
+
str
(
i
))
import
StringIO
traceStringIO
=
StringIO
.
StringIO
()
G
.
traceFile
.
save
(
traceStringIO
)
encodedTrace
=
traceStringIO
.
getvalue
().
encode
(
'base64'
)
ExcelHandler
.
resetTrace
()
G
.
outputJSON
[
'_class'
]
=
'Dream.Simulation'
;
...
...
@@ -683,13 +687,10 @@ def main(argv=[], input_data=None):
# output the trace as encoded if it is set on
if
G
.
trace
==
"Yes"
:
import
StringIO
out
=
StringIO
.
StringIO
()
G
.
traceFile
.
save
(
out
)
# XXX discuss names on this
jsonTRACE
=
{
'_class'
:
'Dream.Simulation'
,
'id'
:
'TraceFile'
,
'results'
:
{
'
Trace'
:
out
.
getvalue
().
encode
(
'base64'
)
}
'results'
:
{
'
trace'
:
encodedTrace
}
}
G
.
outputJSON
[
'elementList'
].
append
(
jsonTRACE
)
...
...
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