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
4e1bf2e4
Commit
4e1bf2e4
authored
Feb 19, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update static version
parent
80291b60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
dream/platform/static/dream/Output_viewChart.html
dream/platform/static/dream/Output_viewChart.html
+18
-0
dream/platform/static/dream/Output_viewChart.js
dream/platform/static/dream/Output_viewChart.js
+22
-0
dream/platform/static/dream/Output_viewExitStatistics.js
dream/platform/static/dream/Output_viewExitStatistics.js
+7
-0
No files found.
dream/platform/static/dream/Output_viewChart.html
0 → 100644
View file @
4e1bf2e4
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Graph
</title>
<script
src=
"../lib/rsvp.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/jquery.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/jquery.flot.js"
></script>
<script
src=
"../lib/jquery.flot.stack.js"
></script>
<script
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Output_viewChart.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"graph_container"
style=
"width: 100%;height:300px"
></div>
</body>
</html>
dream/platform/static/dream/Output_viewChart.js
0 → 100644
View file @
4e1bf2e4
/*global rJS, jQuery, initGadgetMixin, console */
/*jslint unparam: true */
(
function
(
window
,
rJS
,
$
,
initGadgetMixin
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
).
declareMethod
(
"
render
"
,
function
(
options
)
{
var
jio_key
=
options
.
id
,
gadget
=
this
;
gadget
.
props
.
jio_key
=
jio_key
;
gadget
.
props
.
result
=
options
.
result
;
return
gadget
.
aq_getAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
}).
push
(
function
(
simulation_json
)
{
var
json_data
=
JSON
.
parse
(
simulation_json
);
gadget
.
props
.
data
=
json_data
.
result
.
result_list
[
options
.
result
][
options
.
action_definition
.
configuration
.
output_id
];
});
}).
declareMethod
(
"
startService
"
,
function
()
{
// XXX Manually calculate width and height when resizing
$
.
plot
(
this
.
props
.
element
.
querySelector
(
"
.graph_container
"
),
this
.
props
.
data
.
series
,
this
.
props
.
data
.
options
);
});
})(
window
,
rJS
,
jQuery
,
initGadgetMixin
);
\ No newline at end of file
dream/platform/static/dream/Output_viewExitStatistics.js
View file @
4e1bf2e4
...
...
@@ -51,6 +51,9 @@
average
:
calculate_average
(
attainment_list
)
});
}
else
{
if
(
metric_value
.
length
===
1
)
{
metric_value
=
metric_value
[
0
];
}
if
(
typeof
metric_value
===
"
object
"
)
{
if
(
metric_value
.
ub
===
metric_value
.
lb
)
{
metric_value
=
metric_value
.
ub
;
...
...
@@ -65,6 +68,10 @@
if
(
typeof
metric_value
===
"
number
"
)
{
metric_value
=
metric_value
.
toFixed
(
2
);
}
// Add time unit in some metric
if
(
data
.
general
.
timeUnit
&&
(
metric
===
"
lifespan
"
||
metric
===
"
takt_time
"
))
{
metric_value
=
metric_value
+
"
"
+
data
.
general
.
timeUnit
;
}
// Rename some metric to something more meaningful
if
(
metric
===
"
lifespan
"
)
{
metric
=
"
Cycle Time
"
;
...
...
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