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
fa1355f8
Commit
fa1355f8
authored
Jan 20, 2014
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Jan 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make a list of results so that we can display any result.
parent
7510c7fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
3 deletions
+30
-3
dream/platform/static/css/demo-new.css
dream/platform/static/css/demo-new.css
+10
-0
dream/platform/static/index.html
dream/platform/static/index.html
+3
-0
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+5
-1
dream/platform/static/src/dream_launcher.js
dream/platform/static/src/dream_launcher.js
+12
-2
No files found.
dream/platform/static/css/demo-new.css
View file @
fa1355f8
...
...
@@ -356,3 +356,13 @@ path {
background-color
:
#3DD388
;
border-color
:
#28B06C
;
}
li
.result
{
width
:
100%
;
text-align
:
left
;
cursor
:
pointer
;
}
li
.result.active
{
background
:
#fcc
;
}
dream/platform/static/index.html
View file @
fa1355f8
...
...
@@ -61,6 +61,9 @@
</div>
</div>
<div
class=
"twelve columns"
>
<div
id=
"result_zone"
>
<div>
Result List
</div>
<ul
id=
"result_list"
></ul></div>
<div
id=
"graph_zone"
>
<div>
Stations Utilization
</div>
<div
id=
"graph"
></div>
...
...
dream/platform/static/src/dream.js
View file @
fa1355f8
...
...
@@ -264,7 +264,11 @@
});
};
that
.
displayResult
=
function
(
result
)
{
that
.
displayResult
=
function
(
idx
)
{
$
(
'
li.result
'
).
removeClass
(
'
active
'
)
$
(
$
(
'
li.result
'
)[
idx
]).
addClass
(
'
active
'
)
var
result
=
JSON
.
parse
(
$
(
"
#json_result
"
).
val
())[
idx
][
'
result
'
];
$
(
"
#result_zone
"
).
show
();
$
(
"
#graph_zone
"
).
show
();
$
(
"
#spreadsheet_output
"
).
show
();
$
(
"
#gantt_output
"
).
show
();
...
...
dream/platform/static/src/dream_launcher.js
View file @
fa1355f8
...
...
@@ -324,12 +324,21 @@
function
(
e
)
{
dream_instance
.
runSimulation
(
function
(
data
)
{
$
(
'
#result_list
'
).
empty
();
if
(
data
[
'
success
'
])
{
$
(
"
#json_result
"
).
val
(
JSON
.
stringify
(
data
[
'
success
'
],
undefined
,
"
"
));
dream_instance
.
displayResult
(
data
[
'
success
'
][
0
][
'
result
'
]);
$
.
each
(
data
[
'
success
'
],
function
(
idx
,
obj
)
{
$
(
'
#result_list
'
).
append
(
'
<li class="result">
'
+
idx
+
'
:
'
+
obj
[
'
key
'
]
+
'
</li>
'
);
$
(
'
#result_list
'
).
children
().
last
().
click
(
function
(
e
)
{
dream_instance
.
displayResult
(
idx
);
}
);
});
dream_instance
.
displayResult
(
0
);
}
else
{
$
(
"
#result_zone
"
).
hide
();
$
(
"
#graph_zone
"
).
hide
();
$
(
"
#spreadsheet_output
"
).
hide
();
$
(
"
#gantt_output
"
).
hide
();
...
...
@@ -408,6 +417,7 @@
dream_instance
.
redraw
();
});
$
(
"
#result_zone
"
).
hide
();
$
(
"
#graph_zone
"
).
hide
();
$
(
"
#spreadsheet_output
"
).
hide
();
$
(
"
#gantt_output
"
).
hide
();
...
...
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