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
b4b229e4
Commit
b4b229e4
authored
Dec 02, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render job simulation result in spreadsheet.
parent
2454542a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
7 deletions
+36
-7
dream/platform/static/index.html
dream/platform/static/index.html
+2
-6
dream/platform/static/src/dream_launcher.js
dream/platform/static/src/dream_launcher.js
+34
-1
No files found.
dream/platform/static/index.html
View file @
b4b229e4
...
...
@@ -40,6 +40,7 @@
<div
class=
"twelve columns"
>
<div
id=
"main"
></div>
<div
id=
"spreadsheet_input"
></div>
</div>
</div>
...
...
@@ -62,6 +63,7 @@
<div>
Stations Utilization
</div>
<div
id=
"graph"
></div>
</div>
<div
id=
"spreadsheet_output"
></div>
<div
id=
"debug"
>
<div
class=
"six columns alpha"
>
...
...
@@ -76,12 +78,6 @@
</div>
</div>
<div
id=
"spreadsheet"
class=
"sixteen columns"
>
<h4>
Spreadsheet
</h4>
<div
id=
"spreadsheet_input"
></div>
<div
id=
"spreadsheet_output"
></div>
</div>
<!-- DEP -->
<script
type=
"text/javascript"
src=
"lib/jquery-1.10.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"lib/jquery-ui-1.10.3.custom.min.js"
></script>
...
...
dream/platform/static/src/dream_launcher.js
View file @
b4b229e4
...
...
@@ -313,7 +313,18 @@
failure_data
=
[],
working_data
=
[],
ticks
=
[],
counter
=
1
;
counter
=
1
,
spreadsheet_data
=
[[
"
Jobs
"
,
"
ID
"
,
"
Order Date
"
,
"
Due Date
"
,
"
Priority
"
,
"
Material
"
,
"
Entrance Time
"
,
"
Station ID
"
,
"
Step No.
"
]];
$
.
each
(
data
[
'
success
'
].
elementList
,
function
(
idx
,
obj
)
{
if
(
obj
.
results
.
working_ratio
!==
undefined
)
{
/* when there is only one replication, the ratio is given as a float,
...
...
@@ -342,6 +353,23 @@
obj
.
id
].
name
||
obj
.
id
]);
counter
++
;
}
if
(
obj
.
_class
===
'
Dream.Job
'
)
{
var
property_dict
=
obj
.
extraPropertyDict
;
$
.
each
(
obj
[
'
results
'
][
'
schedule
'
],
function
(
i
,
schedule
)
{
spreadsheet_data
.
push
([
property_dict
[
'
name
'
],
obj
[
'
id
'
],
property_dict
[
'
order_date
'
],
property_dict
[
'
due_date
'
],
property_dict
[
'
priority
'
],
property_dict
[
'
material
'
],
schedule
[
'
entranceTime
'
],
schedule
[
'
stationId
'
],
schedule
[
'
stepNumber
'
]
]);
});
}
});
var
series
=
[{
...
...
@@ -377,6 +405,11 @@
};
$
.
plot
(
"
#graph
"
,
series
,
options
);
if
(
spreadsheet_data
.
length
>
1
)
{
$
(
'
#spreadsheet_output
'
).
handsontable
({
data
:
spreadsheet_data
});
}
}
else
{
$
(
"
#json_result
"
).
effect
(
'
shake
'
,
50
).
val
(
data
[
'
error
'
]);
}
...
...
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