Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4064301b
authored
Sep 02, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix vm-details to match pipeline
parent
8f9234a1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
28 deletions
+66
-28
circle/circle/settings/base.py
+10
-11
circle/dashboard/static/dashboard/dashboard.css
+42
-0
circle/dashboard/static/dashboard/dashboard.js
+8
-7
circle/dashboard/static/dashboard/vm-console.js
+2
-2
circle/dashboard/static/dashboard/vm-details.js
+1
-0
circle/dashboard/templates/dashboard/vm-detail.html
+2
-6
circle/dashboard/templates/dashboard/vm-detail/console.html
+1
-2
No files found.
circle/circle/settings/base.py
View file @
4064301b
...
...
@@ -174,15 +174,16 @@ PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor'
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
PIPELINE_JS_COMPRESSOR
=
None
# js compressors don't really like our deps
PIPELINE_DISABLE_WRAPPER
=
True
PIPELINE_CSS
=
{
"all"
:
{
"source_filenames"
:
(
"bootstrap/dist/css/bootstrap.css"
,
"bootstrap/dist/css/bootstrap-theme.css"
,
"fontawesome/css/font-awesome.css"
,
"template.css"
,
"dashboard/dashboard.css"
,
"jquery-simple-slider/css/simple-slider.css"
,
"bootstrap-tour/build/css/bootstrap-tour.css"
,
"template.css"
,
"dashboard/dashboard.css"
,
"network/network.css"
,
),
"output_filename"
:
"all.css"
,
...
...
@@ -197,7 +198,6 @@ PIPELINE_JS = {
"jquery-knob/dist/jquery.knob.min.js"
,
"jquery-simple-slider/js/simple-slider.js"
,
"dashboard/dashboard.js"
,
"dashboard/disk-list.js"
,
"dashboard/group-details.js"
,
"dashboard/group-list.js"
,
"dashboard/js/stupidtable.min.js"
,
...
...
@@ -217,21 +217,20 @@ PIPELINE_JS = {
"output_filename"
:
"all.js"
,
},
"vm-detail"
:
{
"source_filenames"
:
(
"dashboard/vm-details.js"
,
"no-vnc/include/util.js"
,
"no-vnc/include/ui.js"
,
"no-vnc/include/playback.js"
,
"no-vnc/include/websock.js"
,
"no-vnc/include/webutil.js"
,
"no-vnc/include/input.js"
,
"no-vnc/include/jsunzip.js"
,
"no-vnc/include/logo.js"
,
"no-vnc/include/base64.js"
,
"no-vnc/include/websock.js"
,
"no-vnc/include/des.js"
,
"no-vnc/include/keyboard.js"
,
"no-vnc/include/input.js"
,
"no-vnc/include/display.js"
,
"no-vnc/include/jsunzip.js"
,
"no-vnc/include/rfb.js"
,
"no-vnc/include/base64.js"
,
"dashboard/vm-details.js"
,
"dashboard/vm-console.js"
,
"dashboard/vm-tour.js"
,
"dashboard/disk-list.js"
,
),
"output_filename"
:
"vm-detail.js"
,
},
...
...
circle/dashboard/static/dashboard/dashboard.css
View file @
4064301b
...
...
@@ -940,3 +940,45 @@ textarea[name="list-new-namelist"] {
#vm-list-search
,
#vm-mass-ops
{
margin-top
:
8px
;
}
.list-group-item-last
{
border-bottom
:
1px
solid
#ddd
!important
;
}
.slider
{
display
:
inline-block
;
}
.slider
.track
{
height
:
20px
;
top
:
50%
;
}
.slider
>
.dragger
,
.slider
>
.dragger
:hover
{
border-radius
:
0px
;
-moz-border-radius
:
0px
;
-webkit-border-radius
:
0px
;
width
:
8px
;
height
:
24px
;
margin-top
:
-12px
!important
;
text-shadow
:
0
1px
0
#fff
;
background-image
:
-webkit-gradient
(
linear
,
left
0%
,
left
100%
,
from
(
#428bca
),
to
(
#3071a9
));
background-image
:
-webkit-linear-gradient
(
top
,
#428bca
,
0%
,
#3071a9
,
100%
);
background-image
:
-moz-linear-gradient
(
top
,
#428bca
0%
,
#3071a9
100%
);
background-image
:
linear-gradient
(
to
bottom
,
#428bca
0%
,
#3071a9
100%
);
background-repeat
:
repeat-x
;
border-color
:
#2d6ca2
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ff428bca'
,
endColorstr
=
'#ff3071a9'
,
GradientType
=
0
);
}
.slider
>
.dragger
:hover
{
background-color
:
#3071a9
;
background-image
:
none
;
border-color
:
#2d6ca2
;
}
.slider
>
.highlight-track
{
height
:
20px
;
top
:
50%
;
}
.slider
>
.track
,
.slider
>
.highlight-track
{
border-radius
:
5px
;
}
.slider
{
width
:
100%
;
}
circle/dashboard/static/dashboard/dashboard.js
View file @
4064301b
...
...
@@ -442,14 +442,15 @@ $(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
);
$
(
".vm-slider"
)
.
simpleSlider
();
$
(
".cpu-priority-slider"
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
vms
.
simpleSlider
();
$
(
".cpu-priority-slider"
,
vms
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
var
value
=
data
.
value
+
0
;
$
(
'.cpu-priority-input option[value="'
+
value
+
'"]'
).
attr
(
"selected"
,
"selected"
);
...
...
@@ -460,7 +461,7 @@ function addSliderMiscs() {
$
(
".cpu-priority-slider"
).
simpleSlider
(
"setValue"
,
val
);
});
$
(
".cpu-count-slider"
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
$
(
".cpu-count-slider"
,
vms
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
var
value
=
data
.
value
+
0
;
$
(
".cpu-count-input"
).
val
(
parseInt
(
value
));
});
...
...
@@ -473,7 +474,7 @@ function addSliderMiscs() {
var
ram_fire
=
false
;
$
(
".ram-slider"
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
$
(
".ram-slider"
,
vms
).
bind
(
"slider:changed"
,
function
(
event
,
data
)
{
if
(
ram_fire
)
{
ram_fire
=
false
;
return
;
...
...
@@ -491,9 +492,9 @@ function addSliderMiscs() {
setDefaultSliderValues
();
$
(
".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"
));
$
(
".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"
));
}
function
setDefaultSliderValues
()
{
...
...
circle/dashboard/static/dashboard/vm-console.js
View file @
4064301b
$
(
function
()
{
"use strict"
;
Util
.
load_scripts
([
"webutil.js"
,
"base64.js"
,
"websock.js"
,
"des.js"
,
"input.js"
,
"display.js"
,
"jsunzip.js"
,
"rfb.js"
]);
//
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
//
"input.js", "display.js", "jsunzip.js", "rfb.js"]);
var
rfb
;
function
updateState
(
rfb
,
state
,
oldstate
,
msg
)
{
...
...
circle/dashboard/static/dashboard/vm-details.js
View file @
4064301b
var
show_all
=
false
;
var
in_progress
=
false
;
var
activity_hash
=
5
;
var
Websock_native
;
$
(
function
()
{
/* do we need to check for new activities */
...
...
circle/dashboard/templates/dashboard/vm-detail.html
View file @
4064301b
{% extends "dashboard/base.html" %}
{% load staticfiles %}
{% load i18n %}
{% load compressed %}
{% block title-page %}{{ instance.name }} | vm{% endblock %}
...
...
@@ -173,10 +174,5 @@
{% endblock %}
{% block extra_js %}
<script
src=
"{% static "
dashboard
/
bootstrap-tour
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
dashboard
/
vm-details
.
js
"
%}"
></script>
<script
src=
"{% static "
dashboard
/
vm-common
.
js
"
%}"
></script>
<script
src=
"{% static "
dashboard
/
vm-console
.
js
"
%}"
></script>
<script
src=
"{% static "
dashboard
/
disk-list
.
js
"
%}"
></script>
<script
src=
"{% static "
dashboard
/
vm-tour
.
js
"
%}"
></script>
{% compressed_js 'vm-detail' %}
{% endblock %}
circle/dashboard/templates/dashboard/vm-detail/console.html
View file @
4064301b
...
...
@@ -23,9 +23,8 @@
<canvas
id=
"noVNC_canvas"
width=
"640px"
height=
"20px"
>
Canvas not supported.
</canvas>
<script
src=
"{% static "
dashboard
/
novnc
/
util
.
js
"
%}"
></script>
<script>
var
INCLUDE_URI
=
'{
{ STATIC_URL }}dashboard/novnc/
'
;
var
INCLUDE_URI
=
'{
% static "no-vnc/include/" %}
'
;
var
VNC_URL
=
"{{ vnc_url }}"
;
</script>
{% endif %}
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