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
3e27d0b6
Commit
3e27d0b6
authored
Apr 18, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when updating throughput, do not reset everything and prevent enter key to close dialogs
parent
48c8a61c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
simulation/src/output.xls
simulation/src/output.xls
+0
-0
simulation/src/trace1.xls
simulation/src/trace1.xls
+0
-0
ui/src/dream.js
ui/src/dream.js
+14
-8
No files found.
simulation/src/output.xls
View file @
3e27d0b6
No preview for this file type
simulation/src/trace1.xls
View file @
3e27d0b6
No preview for this file type
ui/src/dream.js
View file @
3e27d0b6
...
...
@@ -121,7 +121,7 @@
box
.
throughput
=
parseInt
(
throughput
.
val
(),
10
);
}
}
priv
.
set
Model
();
priv
.
update
Model
();
$
(
this
).
dialog
(
"
close
"
);
}
},
...
...
@@ -135,6 +135,12 @@
});
};
// Prevent enter key to do nasty things
$
(
'
#dialog-form :input
'
).
on
(
"
keypress
"
,
function
(
e
)
{
console
.
log
(
"
keyup, e
"
,
e
);
return
e
.
keyCode
!==
13
;
});
priv
.
displayGraph
=
function
()
{
var
render_element
,
i
,
i_length
,
box
,
style_string
,
j
,
j_length
,
line
;
// Add boxes in the render div
...
...
@@ -272,7 +278,7 @@
}
};
priv
.
update
Model
=
function
(
success
)
{
priv
.
refresh
Model
=
function
(
success
)
{
var
refreshGraph
=
function
(
model
)
{
var
i
,
i_length
,
box
,
box_list
,
box
,
box_id
;
i_length
=
model
.
box_list
.
length
;
...
...
@@ -306,12 +312,12 @@
priv
.
getModel
(
refreshGraph
);
};
priv
.
update
ModelRegularly
=
function
()
{
var
update
Regularly
=
function
()
{
priv
.
update
Model
();
setTimeout
(
update
Regularly
,
1000
);
priv
.
refresh
ModelRegularly
=
function
()
{
var
refresh
Regularly
=
function
()
{
priv
.
refresh
Model
();
setTimeout
(
refresh
Regularly
,
1000
);
};
setTimeout
(
update
Regularly
,
1000
);
setTimeout
(
refresh
Regularly
,
1000
);
};
Object
.
defineProperty
(
that
,
"
start
"
,
{
...
...
@@ -323,7 +329,7 @@
priv
.
initJsPlumb
();
priv
.
initDialog
();
priv
.
displayGraph
();
priv
.
update
ModelRegularly
();
priv
.
refresh
ModelRegularly
();
}
});
...
...
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