Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b8a48b95
authored
Sep 16, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix sliders
forked the original repo and applied our changes
parent
8e1635ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
circle/bower.json
+1
-1
circle/dashboard/static/dashboard/dashboard.js
+7
-8
No files found.
circle/bower.json
View file @
b8a48b95
...
...
@@ -17,7 +17,7 @@
"no-vnc"
:
"*"
,
"bootstrap-tour"
:
"~0.9.3"
,
"jquery-knob"
:
"~1.2.9"
,
"jquery-simple-slider"
:
"
*
"
,
"jquery-simple-slider"
:
"
https://github.com/BME-IK/jquery-simple-slider.git
"
,
"bootbox"
:
"~4.3.0"
}
}
circle/dashboard/static/dashboard/dashboard.js
View file @
b8a48b95
...
...
@@ -455,15 +455,14 @@ $(document).on('shown.bs.tab', 'a[href="#resources"]', function (e) {
});
function
addSliderMiscs
()
{
var
vms
=
$
(
".vm-slider:not(.slider-added)"
).
addClass
(
"slider-added"
);
// set max values based on inputs
var
cpu_count_range
=
"0, "
+
$
(
".cpu-count-input"
).
prop
(
"max"
);
var
ram_range
=
"0, "
+
$
(
".ram-input"
).
prop
(
"max"
);
$
(
".cpu-count-slider"
).
data
(
"slider-range"
,
cpu_count_range
);
$
(
".ram-slider"
).
data
(
"slider-range"
,
ram_range
);
vms
.
simpleSlider
();
$
(
".cpu-priority-slider"
,
vms
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
$
(
".vm-slider"
)
.
simpleSlider
();
$
(
".cpu-priority-slider"
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
var
value
=
data
.
value
+
0
;
$
(
'.cpu-priority-input option[value="'
+
value
+
'"]'
).
attr
(
"selected"
,
"selected"
);
...
...
@@ -474,7 +473,7 @@ function addSliderMiscs() {
$
(
".cpu-priority-slider"
).
simpleSlider
(
"setValue"
,
val
);
});
$
(
".cpu-count-slider"
,
vms
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
$
(
".cpu-count-slider"
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
var
value
=
data
.
value
+
0
;
$
(
".cpu-count-input"
).
val
(
parseInt
(
value
));
});
...
...
@@ -487,7 +486,7 @@ function addSliderMiscs() {
var
ram_fire
=
false
;
$
(
".ram-slider"
,
vms
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
$
(
".ram-slider"
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
if
(
ram_fire
)
{
ram_fire
=
false
;
return
;
...
...
@@ -505,9 +504,9 @@ function addSliderMiscs() {
setDefaultSliderValues
();
$
(
".cpu-priority-slider"
,
vms
).
simpleSlider
(
"setDisabled"
,
$
(
".cpu-priority-input"
).
prop
(
"disabled"
));
$
(
".cpu-count-slider"
,
vms
).
simpleSlider
(
"setDisabled"
,
$
(
".cpu-count-input"
).
prop
(
"disabled"
));
$
(
".ram-slider"
,
vms
).
simpleSlider
(
"setDisabled"
,
$
(
".ram-input"
).
prop
(
"disabled"
));
$
(
".cpu-priority-slider"
).
simpleSlider
(
"setDisabled"
,
$
(
".cpu-priority-input"
).
prop
(
"disabled"
));
$
(
".cpu-count-slider"
).
simpleSlider
(
"setDisabled"
,
$
(
".cpu-count-input"
).
prop
(
"disabled"
));
$
(
".ram-slider"
).
simpleSlider
(
"setDisabled"
,
$
(
".ram-input"
).
prop
(
"disabled"
));
}
function
setDefaultSliderValues
()
{
...
...
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