Commit 4064301b by Őry Máté

dashboard: fix vm-details to match pipeline

parent 8f9234a1
...@@ -174,15 +174,16 @@ PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor' ...@@ -174,15 +174,16 @@ PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor' # PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor'
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor' # PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
PIPELINE_JS_COMPRESSOR = None # js compressors don't really like our deps PIPELINE_JS_COMPRESSOR = None # js compressors don't really like our deps
PIPELINE_DISABLE_WRAPPER = True
PIPELINE_CSS = { PIPELINE_CSS = {
"all": {"source_filenames": ( "all": {"source_filenames": (
"bootstrap/dist/css/bootstrap.css", "bootstrap/dist/css/bootstrap.css",
"bootstrap/dist/css/bootstrap-theme.css", "bootstrap/dist/css/bootstrap-theme.css",
"fontawesome/css/font-awesome.css", "fontawesome/css/font-awesome.css",
"template.css",
"dashboard/dashboard.css",
"jquery-simple-slider/css/simple-slider.css", "jquery-simple-slider/css/simple-slider.css",
"bootstrap-tour/build/css/bootstrap-tour.css", "bootstrap-tour/build/css/bootstrap-tour.css",
"template.css",
"dashboard/dashboard.css",
"network/network.css", "network/network.css",
), ),
"output_filename": "all.css", "output_filename": "all.css",
...@@ -197,7 +198,6 @@ PIPELINE_JS = { ...@@ -197,7 +198,6 @@ PIPELINE_JS = {
"jquery-knob/dist/jquery.knob.min.js", "jquery-knob/dist/jquery.knob.min.js",
"jquery-simple-slider/js/simple-slider.js", "jquery-simple-slider/js/simple-slider.js",
"dashboard/dashboard.js", "dashboard/dashboard.js",
"dashboard/disk-list.js",
"dashboard/group-details.js", "dashboard/group-details.js",
"dashboard/group-list.js", "dashboard/group-list.js",
"dashboard/js/stupidtable.min.js", "dashboard/js/stupidtable.min.js",
...@@ -217,21 +217,20 @@ PIPELINE_JS = { ...@@ -217,21 +217,20 @@ PIPELINE_JS = {
"output_filename": "all.js", "output_filename": "all.js",
}, },
"vm-detail": {"source_filenames": ( "vm-detail": {"source_filenames": (
"dashboard/vm-details.js",
"no-vnc/include/util.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/webutil.js",
"no-vnc/include/input.js", "no-vnc/include/base64.js",
"no-vnc/include/jsunzip.js", "no-vnc/include/websock.js",
"no-vnc/include/logo.js",
"no-vnc/include/des.js", "no-vnc/include/des.js",
"no-vnc/include/keyboard.js",
"no-vnc/include/input.js",
"no-vnc/include/display.js", "no-vnc/include/display.js",
"no-vnc/include/jsunzip.js",
"no-vnc/include/rfb.js", "no-vnc/include/rfb.js",
"no-vnc/include/base64.js",
"dashboard/vm-details.js",
"dashboard/vm-console.js", "dashboard/vm-console.js",
"dashboard/vm-tour.js", "dashboard/vm-tour.js",
"dashboard/disk-list.js",
), ),
"output_filename": "vm-detail.js", "output_filename": "vm-detail.js",
}, },
......
...@@ -940,3 +940,45 @@ textarea[name="list-new-namelist"] { ...@@ -940,3 +940,45 @@ textarea[name="list-new-namelist"] {
#vm-list-search, #vm-mass-ops { #vm-list-search, #vm-mass-ops {
margin-top: 8px; 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%;
}
...@@ -442,14 +442,15 @@ $(document).on('shown.bs.tab', 'a[href="#resources"]', function (e) { ...@@ -442,14 +442,15 @@ $(document).on('shown.bs.tab', 'a[href="#resources"]', function (e) {
}); });
function addSliderMiscs() { function addSliderMiscs() {
var vms = $(".vm-slider:not(.slider-added)").addClass("slider-added");
// set max values based on inputs // set max values based on inputs
var cpu_count_range = "0, " + $(".cpu-count-input").prop("max"); var cpu_count_range = "0, " + $(".cpu-count-input").prop("max");
var ram_range = "0, " + $(".ram-input").prop("max"); var ram_range = "0, " + $(".ram-input").prop("max");
$(".cpu-count-slider").data("slider-range", cpu_count_range); $(".cpu-count-slider").data("slider-range", cpu_count_range);
$(".ram-slider").data("slider-range", ram_range); $(".ram-slider").data("slider-range", ram_range);
$(".vm-slider").simpleSlider(); vms.simpleSlider();
$(".cpu-priority-slider").bind("slider:changed", function (event, data) { $(".cpu-priority-slider", vms).bind("slider:changed", function (event, data) {
var value = data.value + 0; var value = data.value + 0;
$('.cpu-priority-input option[value="' + value + '"]').attr("selected", "selected"); $('.cpu-priority-input option[value="' + value + '"]').attr("selected", "selected");
...@@ -460,7 +461,7 @@ function addSliderMiscs() { ...@@ -460,7 +461,7 @@ function addSliderMiscs() {
$(".cpu-priority-slider").simpleSlider("setValue", val); $(".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; var value = data.value + 0;
$(".cpu-count-input").val(parseInt(value)); $(".cpu-count-input").val(parseInt(value));
}); });
...@@ -473,7 +474,7 @@ function addSliderMiscs() { ...@@ -473,7 +474,7 @@ function addSliderMiscs() {
var ram_fire = false; var ram_fire = false;
$(".ram-slider").bind("slider:changed", function (event, data) { $(".ram-slider", vms).bind("slider:changed", function (event, data) {
if(ram_fire) { if(ram_fire) {
ram_fire = false; ram_fire = false;
return; return;
...@@ -491,9 +492,9 @@ function addSliderMiscs() { ...@@ -491,9 +492,9 @@ function addSliderMiscs() {
setDefaultSliderValues(); setDefaultSliderValues();
$(".cpu-priority-slider").simpleSlider("setDisabled", $(".cpu-priority-input").prop("disabled")); $(".cpu-priority-slider", vms).simpleSlider("setDisabled", $(".cpu-priority-input").prop("disabled"));
$(".cpu-count-slider").simpleSlider("setDisabled", $(".cpu-count-input").prop("disabled")); $(".cpu-count-slider", vms).simpleSlider("setDisabled", $(".cpu-count-input").prop("disabled"));
$(".ram-slider").simpleSlider("setDisabled", $(".ram-input").prop("disabled")); $(".ram-slider", vms).simpleSlider("setDisabled", $(".ram-input").prop("disabled"));
} }
function setDefaultSliderValues() { function setDefaultSliderValues() {
......
$(function() { $(function() {
"use strict"; "use strict";
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js", // Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"input.js", "display.js", "jsunzip.js", "rfb.js"]); // "input.js", "display.js", "jsunzip.js", "rfb.js"]);
var rfb; var rfb;
function updateState(rfb, state, oldstate, msg) { function updateState(rfb, state, oldstate, msg) {
......
var show_all = false; var show_all = false;
var in_progress = false; var in_progress = false;
var activity_hash = 5; var activity_hash = 5;
var Websock_native;
$(function() { $(function() {
/* do we need to check for new activities */ /* do we need to check for new activities */
......
{% extends "dashboard/base.html" %} {% extends "dashboard/base.html" %}
{% load staticfiles %} {% load staticfiles %}
{% load i18n %} {% load i18n %}
{% load compressed %}
{% block title-page %}{{ instance.name }} | vm{% endblock %} {% block title-page %}{{ instance.name }} | vm{% endblock %}
...@@ -173,10 +174,5 @@ ...@@ -173,10 +174,5 @@
{% endblock %} {% endblock %}
{% block extra_js %} {% block extra_js %}
<script src="{% static "dashboard/bootstrap-tour.min.js" %}"></script> {% compressed_js 'vm-detail' %}
<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>
{% endblock %} {% endblock %}
...@@ -23,9 +23,8 @@ ...@@ -23,9 +23,8 @@
<canvas id="noVNC_canvas" width="640px" height="20px">Canvas not supported. <canvas id="noVNC_canvas" width="640px" height="20px">Canvas not supported.
</canvas> </canvas>
<script src="{% static "dashboard/novnc/util.js" %}"></script>
<script> <script>
var INCLUDE_URI = '{{ STATIC_URL }}dashboard/novnc/'; var INCLUDE_URI = '{% static "no-vnc/include/" %}';
var VNC_URL = "{{ vnc_url }}"; var VNC_URL = "{{ vnc_url }}";
</script> </script>
{% endif %} {% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment