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
3474904a
Commit
3474904a
authored
Feb 01, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the same JIO attachement for input & output
parent
92b77d35
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
37 additions
and
19 deletions
+37
-19
dream/platform/src/dream/Input_viewResultList.js
dream/platform/src/dream/Input_viewResultList.js
+2
-2
dream/platform/src/dream/Input_viewSimulation.js
dream/platform/src/dream/Input_viewSimulation.js
+24
-6
dream/platform/src/dream/Output_viewCapacityUtilisationGraph.js
...platform/src/dream/Output_viewCapacityUtilisationGraph.js
+1
-1
dream/platform/src/dream/Output_viewDownloadExcelSpreadsheet.js
...platform/src/dream/Output_viewDownloadExcelSpreadsheet.js
+1
-1
dream/platform/src/dream/Output_viewExitStatistics.js
dream/platform/src/dream/Output_viewExitStatistics.js
+1
-1
dream/platform/src/dream/Output_viewGantt.js
dream/platform/src/dream/Output_viewGantt.js
+1
-1
dream/platform/src/dream/Output_viewGraph.js
dream/platform/src/dream/Output_viewGraph.js
+1
-1
dream/platform/src/dream/Output_viewJobGantt.js
dream/platform/src/dream/Output_viewJobGantt.js
+1
-1
dream/platform/src/dream/Output_viewJobScheduleSpreadsheet.js
...m/platform/src/dream/Output_viewJobScheduleSpreadsheet.js
+1
-1
dream/platform/src/dream/Output_viewQueueStatGraph.js
dream/platform/src/dream/Output_viewQueueStatGraph.js
+1
-1
dream/platform/src/dream/Output_viewStationUtilisationGraph.js
.../platform/src/dream/Output_viewStationUtilisationGraph.js
+1
-1
dream/platform/src/dream/index.js
dream/platform/src/dream/index.js
+2
-2
No files found.
dream/platform/src/dream/Input_viewResultList.js
View file @
3474904a
...
...
@@ -32,7 +32,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
...
...
@@ -46,7 +46,7 @@
result_list
=
[],
document_list
=
[],
i
;
if
(
result
)
{
if
(
result
&&
result
.
result_list
)
{
document_list
=
result
.
result_list
;
}
for
(
i
=
0
;
i
<
document_list
.
length
;
i
+=
1
)
{
...
...
dream/platform/src/dream/Input_viewSimulation.js
View file @
3474904a
...
...
@@ -30,6 +30,7 @@
}
function
runSimulation
(
gadget
)
{
var
result_json
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
aq_getAttachment
({
...
...
@@ -38,25 +39,42 @@
});
})
.
push
(
function
(
body_json
)
{
// do not send previous results to simulation engine
var
json_without_result
=
JSON
.
parse
(
body_json
);
json_without_result
.
result
.
result_list
=
[];
// XXX Hardcoded relative URL
return
gadget
.
aq_ajax
({
url
:
"
../../runSimulation
"
,
type
:
"
POST
"
,
data
:
body_json
,
data
:
JSON
.
stringify
(
json_without_result
)
,
headers
:
{
"
Content-Type
"
:
'
application/json
'
}
});
})
.
push
(
function
(
evt
)
{
var
json_data
=
JSON
.
parse
(
evt
.
target
.
responseText
);
if
(
json_data
.
success
!==
true
)
{
throw
new
Error
(
json_data
.
error
);
result_json
=
JSON
.
parse
(
evt
.
target
.
responseText
);
if
(
result_json
.
success
!==
true
)
{
throw
new
Error
(
result_json
.
error
);
}
// get latest version
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
body.json
"
});
}).
push
(
function
(
data
){
data
=
JSON
.
parse
(
data
);
// XXX option to always add ?
if
(
data
.
general
.
reset_result_list
)
{
data
.
result
.
result_list
=
[];
}
data
.
result
.
result_list
=
data
.
result
.
result_list
.
concat
(
result_json
.
data
.
result
.
result_list
);
return
gadget
.
aq_putAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
,
"
_data
"
:
JSON
.
stringify
(
json_data
.
data
,
null
,
2
),
"
_attachment
"
:
"
body
.json
"
,
"
_data
"
:
JSON
.
stringify
(
data
,
null
,
2
),
"
_mimetype
"
:
"
application/json
"
});
})
...
...
dream/platform/src/dream/Output_viewCapacityUtilisationGraph.js
View file @
3474904a
...
...
@@ -99,7 +99,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
gadget
.
props
.
result_list
=
capacity_utilisation_graph_widget
(
...
...
dream/platform/src/dream/Output_viewDownloadExcelSpreadsheet.js
View file @
3474904a
...
...
@@ -21,7 +21,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
var
result
=
JSON
.
parse
(
simulation_json
)[
0
].
result
,
...
...
dream/platform/src/dream/Output_viewExitStatistics.js
View file @
3474904a
...
...
@@ -144,7 +144,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
var
result
=
calculate_exit_stat
(
...
...
dream/platform/src/dream/Output_viewGantt.js
View file @
3474904a
...
...
@@ -211,7 +211,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
var
json_data
=
JSON
.
parse
(
simulation_json
);
...
...
dream/platform/src/dream/Output_viewGraph.js
View file @
3474904a
...
...
@@ -118,7 +118,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
console
.
log
(
"
rendering view graph
"
);
...
...
dream/platform/src/dream/Output_viewJobGantt.js
View file @
3474904a
...
...
@@ -222,7 +222,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
gadget
.
props
.
result
=
job_gantt_widget
(
...
...
dream/platform/src/dream/Output_viewJobScheduleSpreadsheet.js
View file @
3474904a
...
...
@@ -195,7 +195,7 @@
return
RSVP
.
all
([
gadget
.
aq_getAttachment
({
"
_id
"
:
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
}),
gadget
.
getDeclaredGadget
(
"
tableeditor
"
)
]);
...
...
dream/platform/src/dream/Output_viewQueueStatGraph.js
View file @
3474904a
...
...
@@ -36,7 +36,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
gadget
.
props
.
series
=
queue_stat_widget
(
...
...
dream/platform/src/dream/Output_viewStationUtilisationGraph.js
View file @
3474904a
...
...
@@ -142,7 +142,7 @@
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
})
.
push
(
function
(
simulation_json
)
{
gadget
.
props
.
result_list
=
station_utilisation_graph_widget
(
...
...
dream/platform/src/dream/index.js
View file @
3474904a
...
...
@@ -76,7 +76,7 @@
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
getAttachment
({
_id
:
options
.
id
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
});
})
.
push
(
function
(
sim_json
)
{
...
...
@@ -113,7 +113,7 @@
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
getAttachment
({
_id
:
options
.
id
,
"
_attachment
"
:
"
simulation
.json
"
"
_attachment
"
:
"
body
.json
"
});
})
.
push
(
function
(
sim_json
)
{
...
...
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