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
b0341834
Commit
b0341834
authored
Jan 21, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output_viewCapacityUtilisationGraph: update to new graph format
(untested)
parent
fa6937c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dream/platform/src/dream/Output_viewCapacityUtilisationGraph.js
...platform/src/dream/Output_viewCapacityUtilisationGraph.js
+6
-6
No files found.
dream/platform/src/dream/Output_viewCapacityUtilisationGraph.js
View file @
b0341834
...
@@ -3,18 +3,18 @@
...
@@ -3,18 +3,18 @@
(
function
(
window
,
rJS
,
$
,
initGadgetMixin
)
{
(
function
(
window
,
rJS
,
$
,
initGadgetMixin
)
{
"
use strict
"
;
"
use strict
"
;
function
capacity_utilisation_graph_widget
(
all_data
)
{
function
capacity_utilisation_graph_widget
(
data
,
result_id
)
{
var
available_capacity_by_station
=
{},
var
available_capacity_by_station
=
{},
station_id
,
station_id
,
series
,
series
,
graph_list
=
[],
graph_list
=
[],
options
,
options
,
capacity_usage_by_station
=
{},
capacity_usage_by_station
=
{},
input_data
=
all_data
.
input
,
input_data
=
data
,
output_data
=
all_data
.
result
;
output_data
=
data
.
result
.
result_list
[
result_id
]
;
// Compute availability by station
// Compute availability by station
$
.
each
(
input_data
.
nodes
,
function
(
idx
,
obj
)
{
$
.
each
(
input_data
.
graph
.
node
,
function
(
idx
,
obj
)
{
var
available_capacity
=
[];
var
available_capacity
=
[];
if
(
obj
.
intervalCapacity
!==
undefined
)
{
if
(
obj
.
intervalCapacity
!==
undefined
)
{
$
.
each
(
obj
.
intervalCapacity
,
function
(
i
,
capacity
)
{
$
.
each
(
obj
.
intervalCapacity
,
function
(
i
,
capacity
)
{
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
}
}
};
};
graph_list
.
push
([
graph_list
.
push
([
input_data
.
nodes
[
station_id
].
name
||
station_id
,
input_data
.
graph
.
node
[
station_id
].
name
||
station_id
,
series
,
series
,
options
]);
options
]);
}
}
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
})
})
.
push
(
function
(
simulation_json
)
{
.
push
(
function
(
simulation_json
)
{
gadget
.
props
.
result_list
=
capacity_utilisation_graph_widget
(
gadget
.
props
.
result_list
=
capacity_utilisation_graph_widget
(
JSON
.
parse
(
simulation_json
)
[
gadget
.
props
.
result
]
JSON
.
parse
(
simulation_json
)
,
gadget
.
props
.
result
);
);
});
});
})
})
...
...
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