mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-18 19:02:53 +09:00
Merge branch 'master' of git.opennebula.org:one
This commit is contained in:
commit
b26aa52c2b
55 files changed
+680
-297
No files matched your search
@@ -42,6 +42,8 @@ public:
|
||||
private:
|
||||
static const char * vmware_vnm_name;
|
||||
|
||||
static const float CGROUP_BASE_CPU_SHARES;
|
||||
|
||||
int deployment_description(
|
||||
const VirtualMachine * vm,
|
||||
const string& file_name) const
|
||||
|
||||
@@ -348,23 +348,6 @@ public:
|
||||
return obj_template->replace(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new attribute to the template (replacing it if
|
||||
* already defined), the object's mutex SHOULD be locked
|
||||
* @param name of the new attribute
|
||||
* @param value of the new attribute
|
||||
* @return 0 on success
|
||||
*/
|
||||
int replace_template_attribute(
|
||||
const string& name,
|
||||
const int& value)
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << value;
|
||||
|
||||
return replace_template_attribute(name, oss.str());
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a XML string for the template of the Object
|
||||
* @param xml the string to store the XML description.
|
||||
|
||||
+16
-1
@@ -265,6 +265,8 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \
|
||||
$SUNSTONE_LOCATION/public/locale/sk_SK \
|
||||
$SUNSTONE_LOCATION/public/locale/zh_TW \
|
||||
$SUNSTONE_LOCATION/public/vendor \
|
||||
$SUNSTONE_LOCATION/public/vendor/crypto-js \
|
||||
$SUNSTONE_LOCATION/public/vendor/explorercanvas \
|
||||
$SUNSTONE_LOCATION/public/vendor/jQueryLayout \
|
||||
$SUNSTONE_LOCATION/public/vendor/dataTables \
|
||||
$SUNSTONE_LOCATION/public/vendor/jQueryUI \
|
||||
@@ -286,6 +288,7 @@ OZONES_DIRS="$OZONES_LOCATION/lib \
|
||||
$OZONES_LOCATION/templates \
|
||||
$OZONES_LOCATION/public \
|
||||
$OZONES_LOCATION/public/vendor \
|
||||
$OZONES_LOCATION/public/vendor/crypto-js \
|
||||
$OZONES_LOCATION/public/vendor/jQuery \
|
||||
$OZONES_LOCATION/public/vendor/jQueryLayout \
|
||||
$OZONES_LOCATION/public/vendor/dataTables \
|
||||
@@ -486,6 +489,8 @@ INSTALL_SUNSTONE_FILES=(
|
||||
SUNSTONE_PUBLIC_JS_FILES:$SUNSTONE_LOCATION/public/js
|
||||
SUNSTONE_PUBLIC_JS_PLUGINS_FILES:$SUNSTONE_LOCATION/public/js/plugins
|
||||
SUNSTONE_PUBLIC_CSS_FILES:$SUNSTONE_LOCATION/public/css
|
||||
SUNSTONE_PUBLIC_VENDOR_CRYPTOJS:$SUNSTONE_LOCATION/public/vendor/crypto-js
|
||||
SUNSTONE_PUBLIC_VENDOR_EXPLORERCANVAS:$SUNSTONE_LOCATION/public/vendor/explorercanvas
|
||||
SUNSTONE_PUBLIC_VENDOR_DATATABLES:$SUNSTONE_LOCATION/public/vendor/dataTables
|
||||
SUNSTONE_PUBLIC_VENDOR_JGROWL:$SUNSTONE_LOCATION/public/vendor/jGrowl
|
||||
SUNSTONE_PUBLIC_VENDOR_JQUERY:$SUNSTONE_LOCATION/public/vendor/jQuery
|
||||
@@ -526,6 +531,7 @@ INSTALL_OZONES_FILES=(
|
||||
OZONES_LIB_ZONE_FILES:$OZONES_LOCATION/lib/OZones
|
||||
OZONES_PUBLIC_VENDOR_JQUERY:$OZONES_LOCATION/public/vendor/jQuery
|
||||
OZONES_PUBLIC_VENDOR_DATATABLES:$OZONES_LOCATION/public/vendor/dataTables
|
||||
OZONES_PUBLIC_VENDOR_CRYPTOJS:$OZONES_LOCATION/public/vendor/crypto-js
|
||||
OZONES_PUBLIC_VENDOR_JGROWL:$OZONES_LOCATION/public/vendor/jGrowl
|
||||
OZONES_PUBLIC_VENDOR_JQUERYUI:$OZONES_LOCATION/public/vendor/jQueryUI
|
||||
OZONES_PUBLIC_VENDOR_JQUERYUIIMAGES:$OZONES_LOCATION/public/vendor/jQueryUI/images
|
||||
@@ -1336,9 +1342,16 @@ src/sunstone/public/vendor/flot/NOTICE"
|
||||
|
||||
SUNSTONE_PUBLIC_VENDOR_CRYPTOJS="\
|
||||
src/sunstone/public/vendor/crypto-js/NOTICE \
|
||||
src/sunstone/public/vendor/crypto-js/2.3.0-crypto-sha1.js \
|
||||
src/sunstone/public/vendor/crypto-js/sha1-min.js \
|
||||
src/sunstone/public/vendor/crypto-js/core-min.js \
|
||||
src/sunstone/public/vendor/crypto-js/enc-base64-min.js \
|
||||
src/sunstone/public/vendor/crypto-js/NEW-BSD-LICENSE.txt"
|
||||
|
||||
SUNSTONE_PUBLIC_VENDOR_EXPLORERCANVAS="\
|
||||
src/sunstone/public/vendor/explorercanvas/excanvas.compiled.js \
|
||||
src/sunstone/public/vendor/explorercanvas/NOTICE \
|
||||
src/sunstone/public/vendor/explorercanvas/LICENSE.txt"
|
||||
|
||||
SUNSTONE_PUBLIC_VENDOR_FILEUPLOADER="\
|
||||
src/sunstone/public/vendor/fileuploader/NOTICE \
|
||||
src/sunstone/public/vendor/fileuploader/fileuploader.js"
|
||||
@@ -1459,6 +1472,8 @@ OZONES_LIB_API_ZONA_FILES="src/ozones/Client/lib/zona/ZoneElement.rb \
|
||||
|
||||
OZONES_PUBLIC_VENDOR_JQUERY=$SUNSTONE_PUBLIC_VENDOR_JQUERY
|
||||
|
||||
OZONES_PUBLIC_VENDOR_CRYPTOJS=$SUNSTONE_PUBLIC_VENDOR_CRYPTOJS
|
||||
|
||||
OZONES_PUBLIC_VENDOR_DATATABLES=$SUNSTONE_PUBLIC_VENDOR_DATATABLES
|
||||
|
||||
OZONES_PUBLIC_VENDOR_JGROWL=$SUNSTONE_PUBLIC_VENDOR_JGROWL
|
||||
|
||||
@@ -37,10 +37,11 @@ puts "datatable_lang=\"#{datatable_lang}_datatable.txt\""
|
||||
puts "locale={"
|
||||
|
||||
msgid = nil
|
||||
tr_lines = []
|
||||
po_file.each do |line|
|
||||
if msgid
|
||||
msgstr = line.sub("msgstr ", "").chomp
|
||||
puts " #{msgid}:#{msgstr},"
|
||||
tr_lines << " #{msgid}:#{msgstr}"
|
||||
msgid = nil
|
||||
next
|
||||
end
|
||||
@@ -55,4 +56,10 @@ po_file.each do |line|
|
||||
|
||||
end
|
||||
|
||||
tr_lines[0..-2].each do |line|
|
||||
puts line+','
|
||||
end
|
||||
# last line must not have an ending , for IE7 JS compatibility
|
||||
puts tr_lines[-1]
|
||||
|
||||
puts "}"
|
||||
@@ -525,18 +525,6 @@ ul.action_list{
|
||||
|
||||
/*background: #EDEDED;*/
|
||||
border: 1px solid #525252;
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0.25, #E9E9E9),
|
||||
color-stop(0.63, #F5F5F5)
|
||||
);
|
||||
background-image: -moz-linear-gradient(
|
||||
center bottom,
|
||||
#E9E9E9 25%,
|
||||
#F5F5F5 63%
|
||||
);
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
list-style-type:none;
|
||||
@@ -551,6 +539,16 @@ ul.action_list{
|
||||
border-radius:4px;
|
||||
border-bottom-right-radius:5px;
|
||||
border-bottom-left-radius:5px;
|
||||
|
||||
background: #e9e9e9; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #e9e9e9 25%, #f5f5f5 63%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(25%,#e9e9e9), color-stop(63%,#f5f5f5)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #e9e9e9 25%,#f5f5f5 63%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #e9e9e9 25%,#f5f5f5 63%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #e9e9e9 25%,#f5f5f5 63%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #e9e9e9 25%,#f5f5f5 63%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e9e9e9', endColorstr='#f5f5f5',GradientType=0 ); /* IE6-9 */
|
||||
|
||||
}
|
||||
|
||||
ul.action_list li a{
|
||||
|
||||
@@ -107,6 +107,7 @@ body {
|
||||
padding-left: 0;
|
||||
border:0;
|
||||
border-right: 1px solid #353735;
|
||||
|
||||
background: #636663; /* Old browsers */
|
||||
background: -moz-linear-gradient(left, #636663 95%, #353735 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, right top, color-stop(95%,#636663), color-stop(100%,#353735)); /* Chrome,Safari4+ */
|
||||
|
||||
@@ -139,6 +139,7 @@ div#login input#login_btn:hover {
|
||||
position: relative;
|
||||
top: 80px;
|
||||
font-size:1.0em;
|
||||
padding: 2px 15px;
|
||||
}
|
||||
|
||||
#login_spinner {
|
||||
|
||||
@@ -43,7 +43,7 @@ function auth_error(req, error){
|
||||
function authenticate(){
|
||||
var username = $("#username").val();
|
||||
var password = $("#password").val();
|
||||
password = Crypto.SHA1(password);
|
||||
password = CryptoJS.SHA1(password);
|
||||
var remember = $("#check_remember").is(":checked");
|
||||
|
||||
$("#error_box").fadeOut("slow");
|
||||
@@ -63,6 +63,32 @@ function authenticate(){
|
||||
OCCI.Auth.login(obj);
|
||||
}
|
||||
|
||||
function getInternetExplorerVersion(){
|
||||
// Returns the version of Internet Explorer or a -1
|
||||
// (indicating the use of another browser).
|
||||
var rv = -1; // Return value assumes failure.
|
||||
if (navigator.appName == 'Microsoft Internet Explorer')
|
||||
{
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
rv = parseFloat( RegExp.$1 );
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
function checkVersion(){
|
||||
var ver = getInternetExplorerVersion();
|
||||
|
||||
if ( ver > -1 ){
|
||||
msg = ver <= 7.0 ? "You are using an old version of IE. \
|
||||
Please upgrade or use Firefox or Chrome for full compatibility." :
|
||||
"OpenNebula Self-Service is best seen with Chrome or Firefox";
|
||||
$("#error_box").text(msg);
|
||||
$("#error_box").fadeIn('slow');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('div#logo_selfservice').css("background","url("+logo_big+") no-repeat center");
|
||||
|
||||
@@ -80,4 +106,6 @@ $(document).ready(function(){
|
||||
|
||||
$("input#username.box").focus();
|
||||
$("#login_spinner").hide();
|
||||
|
||||
checkVersion();
|
||||
});
|
||||
@@ -42,7 +42,7 @@ $.ajaxSetup({
|
||||
converters: {
|
||||
"xml ONEjson": function(xml){
|
||||
return $.xml2json(xml);
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -255,7 +255,7 @@ var OCCI = {
|
||||
callback_error(request, OCCI.Error(response)) : null;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
/*
|
||||
"monitor": function(params,resource,all){
|
||||
var callback = params.success;
|
||||
@@ -306,9 +306,16 @@ var OCCI = {
|
||||
type: "POST",
|
||||
data: {remember: remember, lang: lang},
|
||||
beforeSend : function(req) {
|
||||
req.setRequestHeader( "Authorization",
|
||||
"Basic " + btoa(username + ":" + password)
|
||||
)
|
||||
var token = username + ':' + password;
|
||||
var authString = 'Basic ';
|
||||
if (typeof(btoa) === 'function')
|
||||
authString += btoa(token)
|
||||
else {
|
||||
token = CryptoJS.enc.Utf8.parse(token);
|
||||
authString += CryptoJS.enc.Base64.stringify(token)
|
||||
}
|
||||
|
||||
req.setRequestHeader( "Authorization", authString);
|
||||
},
|
||||
success: function(response){
|
||||
return callback ? callback(request, response) : null;
|
||||
@@ -389,7 +396,7 @@ var OCCI = {
|
||||
"unpublish": function(params){
|
||||
params.data.body = { "PUBLIC": "NO" };
|
||||
OCCI.Action.update(params,OCCI.Network.resource,"unpublish");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VM": {
|
||||
@@ -474,7 +481,7 @@ var OCCI = {
|
||||
"stopvnc" : function(params){
|
||||
OCCI.VM.vnc(params,"stopvnc");
|
||||
|
||||
},
|
||||
}
|
||||
/*
|
||||
"monitor" : function(params){
|
||||
OCCI.Action.monitor(params,OCCI.VM.resource,false);
|
||||
@@ -534,7 +541,7 @@ var OCCI = {
|
||||
"nonpersistent": function(params){
|
||||
params.data.body = { "PERSISTENT":"NO" };
|
||||
OCCI.Action.update(params,OCCI.Image.resource,"nonpersistent");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"Template" : {
|
||||
@@ -587,7 +594,7 @@ var OCCI = {
|
||||
"resource" : "INSTANCE_TYPE",
|
||||
"list" : function(params){
|
||||
OCCI.Action.list(params,OCCI.Instance_type.resource);
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"User" : {
|
||||
@@ -597,8 +604,7 @@ var OCCI = {
|
||||
},
|
||||
"show" : function(params){
|
||||
OCCI.Action.show(params,OCCI.User.resource);
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ var vm_actions = {
|
||||
|
||||
"VM.create_dialog" : {
|
||||
type: "custom",
|
||||
call: popUpCreateVMDialog,
|
||||
call: popUpCreateVMDialog
|
||||
},
|
||||
|
||||
"VM.list" : {
|
||||
@@ -159,14 +159,14 @@ var vm_actions = {
|
||||
call : function (){
|
||||
waitingNodes(dataTable_vMachines);
|
||||
Sunstone.runAction("VM.list");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VM.autorefresh" : {
|
||||
type: "custom",
|
||||
call : function() {
|
||||
OCCI.VM.list({timeout: true, success: updateVMachinesView,error: onError});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VM.suspend" : {
|
||||
@@ -262,6 +262,7 @@ var vm_actions = {
|
||||
callback: saveasDisksCallback,
|
||||
error: onError
|
||||
},
|
||||
|
||||
"VM.getInstanceTypes" : {
|
||||
type: "list",
|
||||
call: OCCI.Instance_type.list,
|
||||
@@ -292,7 +293,7 @@ var vm_actions = {
|
||||
call: OCCI.VM.stopvnc,
|
||||
error: onError,
|
||||
notify: true
|
||||
},
|
||||
}
|
||||
|
||||
/*
|
||||
"VM.monitor" : {
|
||||
@@ -319,9 +320,9 @@ var vm_actions = {
|
||||
|
||||
var vm_buttons = {
|
||||
"VM.refresh" : {
|
||||
type: "image",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
},
|
||||
|
||||
"VM.create_dialog" : {
|
||||
@@ -395,14 +396,14 @@ var vm_info_panel = {
|
||||
"vm_networks_tab" : {
|
||||
title: tr("Networks"),
|
||||
content: ""
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var vm_create_panel = {
|
||||
"vm_create_panel" : {
|
||||
title: tr("Create Virtual Machine"),
|
||||
content: create_vm_tmpl
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var vms_tab = {
|
||||
@@ -723,7 +724,7 @@ function popUpCreateVMDialog(){
|
||||
|
||||
$('#network_box',dialog).html(net_select);
|
||||
$('#network_box option',dialog).each(function(){
|
||||
$(this).text('☐ '+$(this).text()+' (id:'+$(this).val()+')');
|
||||
$(this).text('☐ '+$(this).text());
|
||||
});
|
||||
|
||||
|
||||
@@ -736,7 +737,7 @@ function popUpCreateVMDialog(){
|
||||
|
||||
$('#disk_box',dialog).html(image_select);
|
||||
$('#disk_box option',dialog).each(function(){
|
||||
$(this).text('☐ '+$(this).text()+' (id:'+$(this).val()+')');
|
||||
$(this).text('☐ '+$(this).text());
|
||||
});
|
||||
|
||||
|
||||
@@ -771,7 +772,7 @@ function popUpCreateVMDialog(){
|
||||
|
||||
var vm = {
|
||||
"NAME" : vm_name,
|
||||
"INSTANCE_TYPE" : instance_type,
|
||||
"INSTANCE_TYPE" : instance_type
|
||||
};
|
||||
|
||||
var href = location.protocol + "//" + location.host;
|
||||
@@ -844,7 +845,7 @@ function setupSaveasDialog(){
|
||||
width:600,
|
||||
modal:true,
|
||||
height:350,
|
||||
resizable:true,
|
||||
resizable:true
|
||||
});
|
||||
|
||||
$('#saveas_vm_form',dialog).submit(function(){
|
||||
@@ -862,7 +863,7 @@ function setupSaveasDialog(){
|
||||
else {
|
||||
var obj = {
|
||||
disk_id : disk_id,
|
||||
image_name : image_name,
|
||||
image_name : image_name
|
||||
};
|
||||
args.push(id);
|
||||
Sunstone.runAction("VM.saveas",id,obj);
|
||||
@@ -1126,7 +1127,7 @@ $(document).ready(function(){
|
||||
{ "bSortable": false, "aTargets": ["check"] },
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1] },
|
||||
{ "sWidth": "110px", "aTargets": [3] },
|
||||
{ "sWidth": "110px", "aTargets": [3] }
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ var config_actions = {
|
||||
call : OCCI.Config.list,
|
||||
callback : updateConfig,
|
||||
error : onError
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var config_tab = {
|
||||
|
||||
@@ -148,15 +148,15 @@ var vnet_actions = {
|
||||
elements: vnElements,
|
||||
error: onError,
|
||||
notify: true
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var vnet_buttons = {
|
||||
"Network.refresh" : {
|
||||
type: "image",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
},
|
||||
|
||||
"Network.create_dialog" : {
|
||||
@@ -184,7 +184,7 @@ var vnet_info_panel = {
|
||||
"vnet_info_tab" : {
|
||||
title: tr("Network information"),
|
||||
content: ""
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ var vnet_create_panel = {
|
||||
"vnet_create_panel" : {
|
||||
title: tr("Create network"),
|
||||
content: create_vn_tmpl
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var vnets_tab = {
|
||||
@@ -409,7 +409,7 @@ $(document).ready(function(){
|
||||
"aoColumnDefs": [
|
||||
{ "bSortable": false, "aTargets": ["check"] },
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1] },
|
||||
{ "sWidth": "35px", "aTargets": [1] }
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ var image_actions = {
|
||||
call: function () {
|
||||
waitingNodes(dataTable_images);
|
||||
Sunstone.runAction("Image.list");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"Image.autorefresh" : {
|
||||
@@ -204,15 +204,15 @@ var image_actions = {
|
||||
elements: imageElements,
|
||||
error: onError,
|
||||
notify: true
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var image_buttons = {
|
||||
"Image.refresh" : {
|
||||
type: "image",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
},
|
||||
"Image.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
@@ -249,15 +249,14 @@ var image_info_panel = {
|
||||
"image_info_tab" : {
|
||||
title: tr("Image information"),
|
||||
content: ""
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
var image_create_panel = {
|
||||
"image_create_panel" : {
|
||||
title: tr("Add storage"),
|
||||
content: create_image_tmpl
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var images_tab = {
|
||||
@@ -448,7 +447,7 @@ function popUpCreateImageDialog(){
|
||||
width: "258px",
|
||||
// left: "133px",
|
||||
height: "15px",
|
||||
display: "inline-block",
|
||||
display: "inline-block"
|
||||
});
|
||||
$('#upload-progress div',dialog).css("border","1px solid #AAAAAA");
|
||||
|
||||
@@ -482,7 +481,7 @@ function popUpCreateImageDialog(){
|
||||
return false;
|
||||
},
|
||||
onCancel: function(id, fileName){
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
var file_input = false;
|
||||
@@ -593,7 +592,7 @@ $(document).ready(function(){
|
||||
"aoColumnDefs": [
|
||||
{ "bSortable": false, "aTargets": ["check"] },
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1] },
|
||||
{ "sWidth": "35px", "aTargets": [1] }
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="vendor/jQueryUI/jquery-ui-1.8.16.custom.css" />
|
||||
<!-- Vendor Libraries -->
|
||||
<script type="text/javascript" src="vendor/jQuery/jquery-1.7.2.min.js"></script>
|
||||
<script type="text/javascript" src="vendor/crypto-js/2.3.0-crypto-sha1.js"></script>
|
||||
<script type="text/javascript" src="vendor/crypto-js/core-min.js"></script>
|
||||
<script type="text/javascript" src="vendor/crypto-js/sha1-min.js"></script>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="vendor/crypto-js/enc-base64-min.js"></script>
|
||||
<![endif]-->
|
||||
<!-- End Vendor Libraries -->
|
||||
|
||||
<script type="text/javascript" src="js/locale.js"></script>
|
||||
|
||||
@@ -140,6 +140,7 @@ div#login input#login_btn:hover {
|
||||
position: relative;
|
||||
top: 80px;
|
||||
font-size:1.0em;
|
||||
padding: 2px 15px;
|
||||
}
|
||||
|
||||
#login_spinner {
|
||||
|
||||
@@ -56,6 +56,32 @@ function authenticate(){
|
||||
});
|
||||
}
|
||||
|
||||
function getInternetExplorerVersion(){
|
||||
// Returns the version of Internet Explorer or a -1
|
||||
// (indicating the use of another browser).
|
||||
var rv = -1; // Return value assumes failure.
|
||||
if (navigator.appName == 'Microsoft Internet Explorer')
|
||||
{
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
rv = parseFloat( RegExp.$1 );
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
function checkVersion(){
|
||||
var ver = getInternetExplorerVersion();
|
||||
|
||||
if ( ver > -1 ){
|
||||
msg = ver <= 7.0 ? "You are using an old version of IE. \
|
||||
Please upgrade or use Firefox or Chrome for full compatibility." :
|
||||
"OpenNebula Ozones is best seen with Chrome or Firefox";
|
||||
$("#error_box").text(msg);
|
||||
$("#error_box").fadeIn('slow');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#login_form").submit(function (){
|
||||
authenticate();
|
||||
@@ -71,4 +97,6 @@ $(document).ready(function(){
|
||||
|
||||
$("input#username.box").focus();
|
||||
$("#login_spinner").hide();
|
||||
|
||||
checkVersion();
|
||||
});
|
||||
@@ -332,9 +332,16 @@ var oZones = {
|
||||
type: "POST",
|
||||
data: {remember: remember},
|
||||
beforeSend : function(req) {
|
||||
req.setRequestHeader( "Authorization",
|
||||
"Basic " + btoa(username + ":" + password)
|
||||
)
|
||||
var token = username + ':' + password;
|
||||
var authString = 'Basic ';
|
||||
if (typeof(btoa) === 'function')
|
||||
authString += btoa(token)
|
||||
else {
|
||||
token = CryptoJS.enc.Utf8.parse(token);
|
||||
authString += CryptoJS.enc.Base64.stringify(token)
|
||||
}
|
||||
|
||||
req.setRequestHeader( "Authorization", authString);
|
||||
},
|
||||
success: function(response){
|
||||
return callback ? callback(request, response) : null;
|
||||
@@ -458,7 +465,7 @@ var oZones = {
|
||||
},
|
||||
"datastore": function(params){
|
||||
oZones.Zone.subresource(params,"datastore");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VDC": {
|
||||
@@ -478,7 +485,7 @@ var oZones = {
|
||||
},
|
||||
"show": function(params){
|
||||
oZones.Action.show(params,oZones.VDC.resource);
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"ZoneHosts": {
|
||||
@@ -535,5 +542,5 @@ var oZones = {
|
||||
"list": function(params){
|
||||
oZones.Action.list(params,oZones.ZoneDatastores.resource,"datastore");
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -15,8 +15,8 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
var aggregated_hosts_tab_content =
|
||||
'<div class="action_blocks">\
|
||||
var aggregated_hosts_tab_content = '\
|
||||
<div class="action_blocks">\
|
||||
</div>\
|
||||
<table id="datatable_agg_hosts" class="display">\
|
||||
<thead>\
|
||||
@@ -38,8 +38,8 @@ var aggregated_hosts_tab_content =
|
||||
<tbody>\
|
||||
</tbody>\
|
||||
</table>';
|
||||
var aggregated_vms_tab_content =
|
||||
'<div class="action_blocks">\
|
||||
var aggregated_vms_tab_content = '\
|
||||
<div class="action_blocks">\
|
||||
</div>\
|
||||
<table id="datatable_agg_vms" class="display">\
|
||||
<thead>\
|
||||
@@ -406,71 +406,70 @@ var agg_actions = {
|
||||
success: datastoresListCB,
|
||||
error: onError})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
var hosts_buttons = {
|
||||
"ZoneHosts.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var vms_buttons = {
|
||||
"ZoneVMs.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var vns_buttons = {
|
||||
"ZoneVNs.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var images_buttons = {
|
||||
"ZoneImages.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var users_buttons = {
|
||||
"ZoneUsers.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var templates_buttons = {
|
||||
"ZoneTemplates.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var clusters_buttons = {
|
||||
"ZoneClusters.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
var datastores_buttons = {
|
||||
"ZoneDatastores.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
}
|
||||
};
|
||||
|
||||
@@ -601,7 +600,7 @@ function vnsListCB(req,list){
|
||||
|
||||
function imagesListCB(req,list){
|
||||
dataTable_agg_images.fnClearTable();
|
||||
total_images = [];
|
||||
var total_images = [];
|
||||
$.each(list,function(){
|
||||
if (this.ZONE.error){
|
||||
notifyError(this.ZONE.error.message);
|
||||
|
||||
@@ -167,7 +167,7 @@ var vdc_actions = {
|
||||
type: "list",
|
||||
call: oZones.VDC.list,
|
||||
callback: updateVDCsView,
|
||||
error: onError,
|
||||
error: onError
|
||||
},
|
||||
|
||||
"VDC.refresh" : {
|
||||
@@ -183,7 +183,7 @@ var vdc_actions = {
|
||||
type: "custom",
|
||||
call: function(){
|
||||
oZones.VDC.list({timeout: true, success: updateVDCsView, error: onError});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VDC.delete" : {
|
||||
@@ -248,24 +248,23 @@ var vdc_actions = {
|
||||
$('div#create_vdc_dialog select#clusterid').html(options);
|
||||
},
|
||||
error: onError
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
var vdc_buttons = {
|
||||
"VDC.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
},
|
||||
"VDC.create_dialog" : {
|
||||
type: "action",
|
||||
text: "+ New",
|
||||
alwaysActive:true
|
||||
alwaysActive: true
|
||||
},
|
||||
"VDC.update_dialog" : {
|
||||
type: "action",
|
||||
text: "Update VDC resources",
|
||||
text: "Update VDC resources"
|
||||
},
|
||||
"VDC.delete" : {
|
||||
type: "action",
|
||||
@@ -711,8 +710,8 @@ function setupCreateVDCDialog(){
|
||||
"RESOURCES" : {
|
||||
"HOSTS" : hosts,
|
||||
"DATASTORES" : datastores,
|
||||
"NETWORKS" : vnets,
|
||||
},
|
||||
"NETWORKS" : vnets
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -864,9 +863,9 @@ function setupUpdateVDCDialog(){
|
||||
"RESOURCES": {
|
||||
"HOSTS": hosts,
|
||||
"NETWORKS": vnets,
|
||||
"DATASTORES": datastores,
|
||||
"DATASTORES": datastores
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Sunstone.runAction("VDC.update",id,vdc_json);
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
var zones_tab_content =
|
||||
'<form id="form_zones" action="javascript:alert(\'js errors?!\')">\
|
||||
var zones_tab_content = '\
|
||||
<form id="form_zones" action="javascript:alert(\'js errors?!\')">\
|
||||
<div class="action_blocks">\
|
||||
</div>\
|
||||
<table id="datatable_zones" class="display">\
|
||||
@@ -33,8 +33,8 @@ var zones_tab_content =
|
||||
</form>';
|
||||
|
||||
|
||||
var create_zone_tmpl =
|
||||
'<form id="create_zone_form" action="">\
|
||||
var create_zone_tmpl = '\
|
||||
<form id="create_zone_form" action="">\
|
||||
<fieldset>\
|
||||
<div>\
|
||||
<label for="name">Name:</label>\
|
||||
@@ -194,14 +194,14 @@ var zone_actions = {
|
||||
updateDatastoresList(req,json,'#datatable_zone_datastores');
|
||||
},
|
||||
error: onError
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var zone_buttons = {
|
||||
"Zone.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
img: "images/Refresh-icon.png"
|
||||
type: "action",
|
||||
text: '<i class="icon-refresh icon-large">',
|
||||
alwaysActive: true
|
||||
},
|
||||
"Zone.create_dialog" : {
|
||||
type: "action",
|
||||
@@ -257,7 +257,7 @@ var zone_info_panel = {
|
||||
"zone_vnets_tab" : {
|
||||
title : "Virtual Networks",
|
||||
content : ""
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Sunstone.addActions(zone_actions);
|
||||
@@ -346,8 +346,8 @@ function updateZoneInfo(req,zone_json){
|
||||
};
|
||||
var hosts_tab = {
|
||||
title : "Hosts",
|
||||
content :
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content : '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_hosts" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -370,8 +370,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var templates_tab = {
|
||||
title: "Templates",
|
||||
content :
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content : '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_templates" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -389,8 +389,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var vms_tab = {
|
||||
title : "Virtual Machines",
|
||||
content :
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content : '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_vms" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -413,8 +413,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var vnets_tab = {
|
||||
title : "Virtual Networks",
|
||||
content :
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content : '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_vnets" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -435,8 +435,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var images_tab = {
|
||||
title : "Images",
|
||||
content :
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content : '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_images" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -461,8 +461,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var users_tab = {
|
||||
title: "Users",
|
||||
content:
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content: '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_users" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -484,8 +484,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var clusters_tab = {
|
||||
title: "Clusters",
|
||||
content:
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content: '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_clusters" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -504,8 +504,8 @@ function updateZoneInfo(req,zone_json){
|
||||
|
||||
var datastores_tab = {
|
||||
title: "Datastores",
|
||||
content:
|
||||
'<div style="padding: 10px 10px;">\
|
||||
content: '\
|
||||
<div style="padding: 10px 10px;">\
|
||||
<table id="datatable_zone_datastores" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@@ -631,7 +631,7 @@ function updateZoneInfo(req,zone_json){
|
||||
"sDom" : '<"H"lfrC>t<"F"ip>',
|
||||
"sPaginationType": "full_numbers",
|
||||
"aoColumnDefs": [
|
||||
{ "sWidth": "35px", "aTargets": [0,2,3,4] },
|
||||
{ "sWidth": "35px", "aTargets": [0,2,3,4] }
|
||||
]
|
||||
});
|
||||
|
||||
@@ -715,7 +715,7 @@ function setupCreateZoneDialog(){
|
||||
"ONENAME": onename,
|
||||
"ONEPASS": onepass,
|
||||
"SUNSENDPOINT" : se,
|
||||
"SELFENDPOINT" : ss,
|
||||
"SELFENDPOINT" : ss
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
<link rel="stylesheet" type="text/css" href="vendor/jQueryUI/jquery-ui-1.8.16.custom.css" />
|
||||
<!-- Vendor Libraries -->
|
||||
<script type="text/javascript" src="vendor/jQuery/jquery-1.7.2.min.js"></script>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="vendor/crypto-js/core-min.js"></script>
|
||||
<script type="text/javascript" src="vendor/crypto-js/enc-base64-min.js"></script>
|
||||
<![endif]-->
|
||||
<!-- End Vendor Libraries -->
|
||||
<script type="text/javascript" src="js/ozones.js"></script>
|
||||
<script type="text/javascript" src="js/login.js"></script>
|
||||
|
||||
@@ -139,6 +139,7 @@ div#login input#login_btn:hover {
|
||||
margin-right: auto;
|
||||
top: 80px;
|
||||
font-size:1.0em;
|
||||
padding: 2px 15px;
|
||||
}
|
||||
|
||||
#login_spinner {
|
||||
|
||||
@@ -63,7 +63,7 @@ function setLang(lang_str){
|
||||
$.post('config',JSON.stringify({lang:lang_tmp}),function(){
|
||||
window.location.href = ".";
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
OpenNebula.User.update(obj);
|
||||
|
||||
@@ -74,7 +74,7 @@ function setLang(lang_str){
|
||||
if (whichUI() == "sunstone"){
|
||||
var obj = {
|
||||
data : {
|
||||
id: uid,
|
||||
id: uid
|
||||
},
|
||||
success: updateUserTemplate
|
||||
};
|
||||
|
||||
@@ -55,6 +55,32 @@ function authenticate(){
|
||||
});
|
||||
}
|
||||
|
||||
function getInternetExplorerVersion(){
|
||||
// Returns the version of Internet Explorer or a -1
|
||||
// (indicating the use of another browser).
|
||||
var rv = -1; // Return value assumes failure.
|
||||
if (navigator.appName == 'Microsoft Internet Explorer')
|
||||
{
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
rv = parseFloat( RegExp.$1 );
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
function checkVersion(){
|
||||
var ver = getInternetExplorerVersion();
|
||||
|
||||
if ( ver > -1 ){
|
||||
msg = ver <= 7.0 ? "You are using an old version of IE. \
|
||||
Please upgrade or use Firefox or Chrome for full compatibility." :
|
||||
"OpenNebula Sunstone is best seen with Chrome or Firefox";
|
||||
$("#error_box").text(msg);
|
||||
$("#error_box").fadeIn('slow');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#login_form").submit(function (){
|
||||
authenticate();
|
||||
@@ -70,4 +96,6 @@ $(document).ready(function(){
|
||||
|
||||
$("input#username.box").focus();
|
||||
$("#login_spinner").hide();
|
||||
|
||||
checkVersion();
|
||||
});
|
||||
@@ -222,7 +222,7 @@ var SunstoneMonitoring = {
|
||||
var data = partitions[partition]
|
||||
var color = config.colorize ? config.colorize(partition) : null
|
||||
series.push({ label: partition,
|
||||
data: data,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
return series
|
||||
@@ -261,7 +261,7 @@ var SunstoneMonitoring = {
|
||||
data: [[totals[i],0]], //we paint on 0 value of y axis
|
||||
// y axis labels will be hidden
|
||||
label: paths[i],
|
||||
color: config.colorize? config.colorize(paths[i]) : null,
|
||||
color: config.colorize? config.colorize(paths[i]) : null
|
||||
})
|
||||
}
|
||||
return series
|
||||
|
||||
@@ -389,9 +389,16 @@ var OpenNebula = {
|
||||
type: "POST",
|
||||
data: {remember: remember},
|
||||
beforeSend : function(req) {
|
||||
req.setRequestHeader( "Authorization",
|
||||
"Basic " + btoa(username + ":" + password)
|
||||
)
|
||||
var token = username + ':' + password;
|
||||
var authString = 'Basic ';
|
||||
if (typeof(btoa) === 'function')
|
||||
authString += btoa(token)
|
||||
else {
|
||||
token = CryptoJS.enc.Utf8.parse(token);
|
||||
authString += CryptoJS.enc.Base64.stringify(token)
|
||||
}
|
||||
|
||||
req.setRequestHeader( "Authorization", authString);
|
||||
},
|
||||
success: function(response){
|
||||
return callback ? callback(request, response) : null;
|
||||
@@ -484,7 +491,7 @@ var OpenNebula = {
|
||||
},
|
||||
"monitor" : function(params){
|
||||
OpenNebula.Action.monitor(params,OpenNebula.Host.resource,false);
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"Network": {
|
||||
@@ -558,7 +565,7 @@ var OpenNebula = {
|
||||
},
|
||||
"fetch_template" : function(params){
|
||||
OpenNebula.Action.show(params,OpenNebula.Network.resource,"template");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VM": {
|
||||
@@ -753,7 +760,7 @@ var OpenNebula = {
|
||||
"set_quota" : function(params){
|
||||
var action_obj = { quotas : params.data.extra_param };
|
||||
OpenNebula.Action.simple_action(params,OpenNebula.User.resource,"set_quota",action_obj);
|
||||
},
|
||||
}
|
||||
|
||||
// "addgroup" : function(params){
|
||||
// var action_obj = {"group_id": params.data.extra_param };
|
||||
@@ -995,7 +1002,7 @@ var OpenNebula = {
|
||||
},
|
||||
"fetch_template" : function(params){
|
||||
OpenNebula.Action.show(params,OpenNebula.Datastore.resource,"template");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"Marketplace" : {
|
||||
@@ -1023,8 +1030,8 @@ var OpenNebula = {
|
||||
},
|
||||
error: function(res){
|
||||
return callback_error ? callback_error(request, OpenNebula.Error(res)) : null;
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ var acl_actions = {
|
||||
hideDialog();
|
||||
$('div#acls_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var acl_buttons = {
|
||||
@@ -172,7 +172,6 @@ var acl_buttons = {
|
||||
text: '?',
|
||||
alwaysActive: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var acls_tab = {
|
||||
@@ -192,7 +191,7 @@ SunstoneMonitoringConfig['ACL'] = {
|
||||
"totalAcls" : {
|
||||
operation: SunstoneMonitoring.ops.totalize
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ var cluster_actions = {
|
||||
callback : function (req) {
|
||||
Sunstone.runAction("Host.show",req.request.data[0][1].host_id);
|
||||
},
|
||||
error : onError,
|
||||
error : onError
|
||||
},
|
||||
|
||||
"Cluster.delhost" : {
|
||||
@@ -138,7 +138,7 @@ var cluster_actions = {
|
||||
callback : function (req) {
|
||||
Sunstone.runAction("Datastore.show",req.request.data[0][1].ds_id);
|
||||
},
|
||||
error : onError,
|
||||
error : onError
|
||||
},
|
||||
|
||||
"Cluster.deldatastore" : {
|
||||
@@ -147,7 +147,7 @@ var cluster_actions = {
|
||||
callback : function (req) {
|
||||
Sunstone.runAction("Datastore.show",req.request.data[0][1].ds_id);
|
||||
},
|
||||
error : onError,
|
||||
error : onError
|
||||
},
|
||||
|
||||
"Cluster.addvnet" : {
|
||||
@@ -156,7 +156,7 @@ var cluster_actions = {
|
||||
callback : function (req) {
|
||||
Sunstone.runAction("Network.show",req.request.data[0][1].vnet_id);
|
||||
},
|
||||
error : onError,
|
||||
error : onError
|
||||
},
|
||||
|
||||
"Cluster.delvnet" : {
|
||||
@@ -165,7 +165,7 @@ var cluster_actions = {
|
||||
callback : function (req) {
|
||||
Sunstone.runAction("Network.show",req.request.data[0][1].vnet_id);
|
||||
},
|
||||
error : onError,
|
||||
error : onError
|
||||
},
|
||||
|
||||
"Cluster.delete" : {
|
||||
@@ -205,8 +205,8 @@ var cluster_actions = {
|
||||
[],
|
||||
[]),
|
||||
clusterElements());
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var cluster_buttons = {
|
||||
@@ -255,7 +255,7 @@ var clusters_tab = {
|
||||
buttons: cluster_buttons,
|
||||
showOnTopMenu: false,
|
||||
tabClass: "topTab subTab",
|
||||
parentTab: "infra_tab",
|
||||
parentTab: "infra_tab"
|
||||
};
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ SunstoneMonitoringConfig['CLUSTER_HOST'] = {
|
||||
dataType: "pie",
|
||||
operation: SunstoneMonitoring.ops.hostCpuUsagePartition,
|
||||
plotOptions: {
|
||||
series: { pie: { show: true } },
|
||||
series: { pie: { show: true } }
|
||||
}
|
||||
},
|
||||
"cpuUsageBar" : {
|
||||
@@ -364,7 +364,7 @@ SunstoneMonitoringConfig['CLUSTER_HOST'] = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -907,7 +907,7 @@ function setupCreateClusterDialog(){
|
||||
|
||||
var cluster_json = {
|
||||
"cluster": {
|
||||
"name": $('#name',this).val(),
|
||||
"name": $('#name',this).val()
|
||||
}
|
||||
};
|
||||
|
||||
@@ -990,7 +990,7 @@ $(document).ready(function(){
|
||||
"aoColumnDefs": [
|
||||
{ "bSortable": false, "aTargets": ["check"] },
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1,3,4,5] },
|
||||
{ "sWidth": "35px", "aTargets": [1,3,4,5] }
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
|
||||
@@ -70,14 +70,14 @@ var config_actions = {
|
||||
call: OpenNebula.Config.list,
|
||||
callback: updateConfig,
|
||||
error: onError
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var config_tab = {
|
||||
title: tr("Configuration"),
|
||||
content: config_tab_content,
|
||||
tabClass: "subTab",
|
||||
parentTab: "dashboard_tab",
|
||||
parentTab: "dashboard_tab"
|
||||
};
|
||||
|
||||
Sunstone.addActions(config_actions);
|
||||
@@ -103,7 +103,7 @@ function updateConfig(request,response){
|
||||
function updateWss(){
|
||||
var user_info_req = {
|
||||
data : {
|
||||
id: uid,
|
||||
id: uid
|
||||
},
|
||||
success: function(req,user_json) {
|
||||
var template = user_json.USER.TEMPLATE;
|
||||
@@ -123,7 +123,7 @@ function updateWss(){
|
||||
error: onError
|
||||
};
|
||||
OpenNebula.User.update(request);
|
||||
},
|
||||
}
|
||||
};
|
||||
OpenNebula.User.show(user_info_req);
|
||||
$.post('config',JSON.stringify({wss : ($('#config_table #wss_checkbox').is(':checked') ? "yes" : "no")}));
|
||||
|
||||
@@ -181,7 +181,7 @@ var dashboard_tab_content =
|
||||
var dashboard_tab = {
|
||||
title: '<i class="icon-dashboard"></i>'+tr("Dashboard"),
|
||||
content: dashboard_tab_content,
|
||||
showOnTopMenu: false,
|
||||
showOnTopMenu: false
|
||||
}
|
||||
|
||||
Sunstone.addMainTab('dashboard_tab',dashboard_tab);
|
||||
|
||||
@@ -85,7 +85,7 @@ var dashboard_tab_content =
|
||||
var dashboard_tab = {
|
||||
title: '<i class="icon-dashboard"></i>'+tr("Dashboard"),
|
||||
content: dashboard_tab_content,
|
||||
showOnTopMenu: false,
|
||||
showOnTopMenu: false
|
||||
}
|
||||
|
||||
Sunstone.addMainTab('dashboard_tab',dashboard_tab);
|
||||
|
||||
@@ -207,7 +207,7 @@ var datastore_actions = {
|
||||
|
||||
"Datastore.update_dialog" : {
|
||||
type: "custom",
|
||||
call: popUpDatastoreTemplateUpdateDialog,
|
||||
call: popUpDatastoreTemplateUpdateDialog
|
||||
},
|
||||
|
||||
"Datastore.update" : {
|
||||
@@ -284,7 +284,7 @@ var datastore_actions = {
|
||||
Sunstone.runAction("Cluster.adddatastore",cluster,ds);
|
||||
},
|
||||
elements: datastoreElements,
|
||||
notify:true,
|
||||
notify:true
|
||||
},
|
||||
|
||||
"Datastore.help" : {
|
||||
@@ -293,8 +293,7 @@ var datastore_actions = {
|
||||
hideDialog();
|
||||
$('div#datastores_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
var datastore_buttons = {
|
||||
@@ -306,20 +305,20 @@ var datastore_buttons = {
|
||||
"Datastore.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: tr("+ New"),
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"Datastore.update_dialog" : {
|
||||
type: "action",
|
||||
text: tr("Update properties"),
|
||||
alwaysActive: true,
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"Datastore.addtocluster" : {
|
||||
type: "confirm_with_select",
|
||||
text: tr("Select cluster"),
|
||||
select: clusters_sel,
|
||||
tip: tr("Select the destination cluster:"),
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"Datastore.chown" : {
|
||||
type: "confirm_with_select",
|
||||
@@ -356,7 +355,7 @@ var datastore_info_panel = {
|
||||
"datastore_template_tab" : {
|
||||
title: tr("Datastore template"),
|
||||
content: ""
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var datastores_tab = {
|
||||
@@ -365,7 +364,7 @@ var datastores_tab = {
|
||||
buttons: datastore_buttons,
|
||||
tabClass: "subTab",
|
||||
parentTab: "infra_tab",
|
||||
showOnTopMenu: false,
|
||||
showOnTopMenu: false
|
||||
}
|
||||
|
||||
Sunstone.addActions(datastore_actions);
|
||||
@@ -608,7 +607,7 @@ function setupDatastoreTemplateUpdateDialog(){
|
||||
width:500,
|
||||
modal:true,
|
||||
height:height,
|
||||
resizable:true,
|
||||
resizable:true
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@@ -139,7 +139,7 @@ var group_actions = {
|
||||
type: "list",
|
||||
call: OpenNebula.Group.list,
|
||||
callback: updateGroupsView,
|
||||
error: onError,
|
||||
error: onError
|
||||
},
|
||||
|
||||
"Group.show" : {
|
||||
@@ -223,7 +223,7 @@ var group_actions = {
|
||||
hideDialog();
|
||||
$('div#groups_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var group_buttons = {
|
||||
@@ -247,7 +247,7 @@ var group_buttons = {
|
||||
"Group.quotas_dialog" : {
|
||||
type : "action",
|
||||
text : tr("Update quotas"),
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"Group.delete" : {
|
||||
type: "confirm",
|
||||
@@ -265,7 +265,7 @@ var group_info_panel = {
|
||||
"group_info_tab" : {
|
||||
title: tr("Group information"),
|
||||
content:""
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var groups_tab = {
|
||||
@@ -296,7 +296,7 @@ SunstoneMonitoringConfig['GROUP'] = {
|
||||
"totalGroups" : {
|
||||
operation: SunstoneMonitoring.ops.totalize
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Sunstone.addActions(group_actions);
|
||||
|
||||
@@ -290,7 +290,7 @@ var host_actions = {
|
||||
},
|
||||
callback: null,
|
||||
elements: hostElements,
|
||||
notify:true,
|
||||
notify:true
|
||||
},
|
||||
|
||||
"Host.help" : {
|
||||
@@ -372,7 +372,7 @@ var hosts_tab = {
|
||||
buttons: host_buttons,
|
||||
tabClass: "subTab",
|
||||
parentTab: "infra_tab",
|
||||
showOnTopMenu: false,
|
||||
showOnTopMenu: false
|
||||
};
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ SunstoneMonitoringConfig['HOST'] = {
|
||||
dataType: "pie",
|
||||
operation: SunstoneMonitoring.ops.hostCpuUsagePartition,
|
||||
plotOptions: {
|
||||
series: { pie: { show: true } },
|
||||
series: { pie: { show: true } }
|
||||
}
|
||||
},
|
||||
"totalHosts" : { //count number of hosts
|
||||
@@ -530,7 +530,7 @@ SunstoneMonitoringConfig['HOST'] = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ var image_actions = {
|
||||
call: function () {
|
||||
waitingNodes(dataTable_images);
|
||||
Sunstone.runAction("Image.list");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"Image.autorefresh" : {
|
||||
@@ -314,7 +314,7 @@ var image_actions = {
|
||||
|
||||
"Image.update_dialog" : {
|
||||
type: "custom",
|
||||
call: popUpImageTemplateUpdateDialog,
|
||||
call: popUpImageTemplateUpdateDialog
|
||||
},
|
||||
|
||||
"Image.update" : {
|
||||
@@ -491,7 +491,7 @@ var image_buttons = {
|
||||
},
|
||||
"Image.clone_dialog" : {
|
||||
type: "action",
|
||||
text: tr("Clone"),
|
||||
text: tr("Clone")
|
||||
},
|
||||
"Image.delete" : {
|
||||
type: "confirm",
|
||||
@@ -787,7 +787,7 @@ function setupCreateImageDialog(){
|
||||
width: "258px",
|
||||
// left: "133px",
|
||||
height: "15px",
|
||||
display: "inline-block",
|
||||
display: "inline-block"
|
||||
});
|
||||
$('#upload-progress div',dialog).css("border","1px solid #AAAAAA");
|
||||
|
||||
@@ -841,7 +841,7 @@ function setupCreateImageDialog(){
|
||||
return false;
|
||||
},
|
||||
onCancel: function(id, fileName){
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
var file_input = false;
|
||||
@@ -947,7 +947,7 @@ function setupCreateImageDialog(){
|
||||
"image" : {
|
||||
"image_raw" : template
|
||||
},
|
||||
"ds_id" : ds_id,
|
||||
"ds_id" : ds_id
|
||||
};
|
||||
Sunstone.runAction("Image.create",img_obj);
|
||||
$create_image_dialog.dialog('close');
|
||||
@@ -983,7 +983,7 @@ function setupImageTemplateUpdateDialog(){
|
||||
width:700,
|
||||
modal:true,
|
||||
height:height,
|
||||
resizable:false,
|
||||
resizable:false
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
@@ -1152,7 +1152,7 @@ function setupImageCloneDialog(){
|
||||
autoOpen:false,
|
||||
width:375,
|
||||
modal:true,
|
||||
resizable:false,
|
||||
resizable:false
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@@ -115,7 +115,7 @@ var marketplace_tab_content = '\
|
||||
var marketplace_tab = {
|
||||
title: '<i class="icon-shopping-cart"></i>' + tr("Marketplace"),
|
||||
content: marketplace_tab_content,
|
||||
buttons: market_buttons,
|
||||
buttons: market_buttons
|
||||
};
|
||||
|
||||
Sunstone.addMainTab('marketplace_tab', marketplace_tab);
|
||||
@@ -130,7 +130,7 @@ var marketplace_info_panel = {
|
||||
"marketplace_info_tab" : {
|
||||
title: tr("Appliance information"),
|
||||
content:""
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Sunstone.addInfoPanel("marketplace_info_panel", marketplace_info_panel);
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
var system_tab_content =
|
||||
'<table class="dashboard_table" style=>\
|
||||
var system_tab_content = '\
|
||||
<table class="dashboard_table" style=>\
|
||||
<tr>\
|
||||
<td style="width:50%">\
|
||||
<table id="system_information_table" style="width:100%">\
|
||||
|
||||
@@ -683,7 +683,7 @@ var template_actions = {
|
||||
call: function () {
|
||||
waitingNodes(dataTable_templates);
|
||||
Sunstone.runAction("Template.list");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"Template.autorefresh" : {
|
||||
@@ -791,7 +791,7 @@ var template_actions = {
|
||||
hideDialog();
|
||||
$('div#templates_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var template_buttons = {
|
||||
@@ -829,7 +829,7 @@ var template_buttons = {
|
||||
},
|
||||
"Template.clone_dialog" : {
|
||||
type: "action",
|
||||
text: tr("Clone"),
|
||||
text: tr("Clone")
|
||||
},
|
||||
"Template.delete" : {
|
||||
type: "confirm",
|
||||
@@ -2034,7 +2034,7 @@ function setupTemplateTemplateUpdateDialog(){
|
||||
width:700,
|
||||
modal:true,
|
||||
height:height,
|
||||
resizable:false,
|
||||
resizable:false
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
@@ -2148,7 +2148,7 @@ function setupTemplateCloneDialog(){
|
||||
autoOpen:false,
|
||||
width:375,
|
||||
modal:true,
|
||||
resizable:false,
|
||||
resizable:false
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@@ -189,7 +189,7 @@ var user_actions = {
|
||||
call: function () {
|
||||
waitingNodes(dataTable_users);
|
||||
Sunstone.runAction("User.list");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"User.autorefresh" : {
|
||||
@@ -215,7 +215,7 @@ var user_actions = {
|
||||
notifyMessage(tr("Change password successful"));
|
||||
},
|
||||
elements: userElements,
|
||||
error: onError,
|
||||
error: onError
|
||||
},
|
||||
"User.chgrp" : {
|
||||
type: "multiple",
|
||||
@@ -353,8 +353,7 @@ var user_actions = {
|
||||
hideDialog();
|
||||
$('div#users_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var user_buttons = {
|
||||
@@ -375,7 +374,7 @@ var user_buttons = {
|
||||
},
|
||||
"User.update_password" : {
|
||||
type : "action",
|
||||
text : tr("Change password"),
|
||||
text : tr("Change password")
|
||||
},
|
||||
"User.quotas_dialog" : {
|
||||
type : "action",
|
||||
@@ -437,7 +436,7 @@ var user_info_panel = {
|
||||
"user_quotas_tab" : {
|
||||
title: tr("User quotas"),
|
||||
content:""
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var users_tab = {
|
||||
@@ -446,7 +445,7 @@ var users_tab = {
|
||||
buttons: user_buttons,
|
||||
tabClass: 'subTab',
|
||||
parentTab: 'system_tab',
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
};
|
||||
|
||||
var users_tab_non_admin = {
|
||||
@@ -455,7 +454,7 @@ var users_tab_non_admin = {
|
||||
buttons: user_buttons,
|
||||
tabClass: 'subTab',
|
||||
parentTab: 'dashboard_tab',
|
||||
condition: mustNotBeAdmin,
|
||||
condition: mustNotBeAdmin
|
||||
}
|
||||
|
||||
|
||||
@@ -489,13 +488,13 @@ SunstoneMonitoringConfig['USER'] = {
|
||||
min: 0 },
|
||||
legend : {
|
||||
show: false,
|
||||
noColumns: 2,
|
||||
noColumns: 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"totalUsers" : {
|
||||
operation: SunstoneMonitoring.ops.totalize
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ var vm_actions = {
|
||||
|
||||
"VM.create_dialog" : {
|
||||
type: "custom",
|
||||
call: popUpCreateVMDialog,
|
||||
call: popUpCreateVMDialog
|
||||
},
|
||||
|
||||
"VM.update_dialog" : {
|
||||
@@ -225,14 +225,14 @@ var vm_actions = {
|
||||
call : function (){
|
||||
waitingNodes(dataTable_vMachines);
|
||||
Sunstone.runAction("VM.list");
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VM.autorefresh" : {
|
||||
type: "custom",
|
||||
call : function() {
|
||||
OpenNebula.VM.list({timeout: true, success: updateVMachinesView,error: onError});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"VM.deploy" : {
|
||||
@@ -483,7 +483,7 @@ var vm_actions = {
|
||||
hideDialog();
|
||||
$('div#vms_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -577,7 +577,7 @@ var vm_buttons = {
|
||||
"VM.stop" : {
|
||||
type: "confirm",
|
||||
text: tr("Stop"),
|
||||
tip: "This will stop selected VMs"
|
||||
tip: tr("This will stop selected VMs")
|
||||
},
|
||||
"VM.restart" : {
|
||||
type: "confirm",
|
||||
@@ -639,7 +639,7 @@ var vm_info_panel = {
|
||||
},
|
||||
"vm_history_tab" : {
|
||||
title: tr("History information"),
|
||||
content: "",
|
||||
content: ""
|
||||
}
|
||||
};
|
||||
|
||||
@@ -745,7 +745,7 @@ SunstoneMonitoringConfig['VM'] = {
|
||||
min: 0,
|
||||
tickFormatter : function(val,axis) {
|
||||
return humanize_size(val,true);
|
||||
},
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
noColumns: 3,
|
||||
@@ -755,7 +755,7 @@ SunstoneMonitoringConfig['VM'] = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1063,7 +1063,7 @@ function updateVMInfo(request,vm){
|
||||
|
||||
var history_tab = {
|
||||
title: tr("History information"),
|
||||
content: generateHistoryTable(vm_info),
|
||||
content: generateHistoryTable(vm_info)
|
||||
};
|
||||
|
||||
Sunstone.updateInfoPanelTab("vm_info_panel","vm_info_tab",info_tab);
|
||||
@@ -1378,7 +1378,7 @@ function setupVMTemplateUpdateDialog(){
|
||||
width:500,
|
||||
modal:true,
|
||||
height:height,
|
||||
resizable:true,
|
||||
resizable:true
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@@ -302,7 +302,7 @@ var vnet_actions = {
|
||||
call: OpenNebula.Network.addleases,
|
||||
callback: vnShow,
|
||||
error: onError,
|
||||
notify: false,
|
||||
notify: false
|
||||
},
|
||||
|
||||
"Network.rmleases" : {
|
||||
@@ -310,7 +310,7 @@ var vnet_actions = {
|
||||
call: OpenNebula.Network.rmleases,
|
||||
callback: vnShow,
|
||||
error: onError,
|
||||
notify: false,
|
||||
notify: false
|
||||
},
|
||||
|
||||
"Network.hold" : {
|
||||
@@ -318,7 +318,7 @@ var vnet_actions = {
|
||||
call: OpenNebula.Network.hold,
|
||||
callback: vnShow,
|
||||
error: onError,
|
||||
notify: false,
|
||||
notify: false
|
||||
},
|
||||
|
||||
"Network.release" : {
|
||||
@@ -326,7 +326,7 @@ var vnet_actions = {
|
||||
call: OpenNebula.Network.release,
|
||||
callback: vnShow,
|
||||
error: onError,
|
||||
notify: false,
|
||||
notify: false
|
||||
},
|
||||
|
||||
"Network.chown" : {
|
||||
@@ -409,7 +409,7 @@ var vnet_actions = {
|
||||
},
|
||||
callback: null,
|
||||
elements: vnElements,
|
||||
notify:true,
|
||||
notify: true
|
||||
},
|
||||
|
||||
"Network.help" : {
|
||||
@@ -418,8 +418,7 @@ var vnet_actions = {
|
||||
hideDialog();
|
||||
$('div#vnets_tab div.legend_div').slideToggle();
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -445,7 +444,7 @@ var vnet_buttons = {
|
||||
text: tr("Select cluster"),
|
||||
select: clusters_sel,
|
||||
tip: tr("Select the destination cluster:"),
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"Network.chown" : {
|
||||
type: "confirm_with_select",
|
||||
@@ -460,7 +459,7 @@ var vnet_buttons = {
|
||||
text: tr("Change group"),
|
||||
select: groups_sel,
|
||||
tip: tr("Select the new group")+":",
|
||||
condition: mustBeAdmin,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
|
||||
"Network.delete" : {
|
||||
@@ -483,7 +482,7 @@ var vnet_info_panel = {
|
||||
"vnet_leases_tab" : {
|
||||
title: tr("Lease management"),
|
||||
content: ""
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var vnets_tab = {
|
||||
@@ -492,7 +491,7 @@ var vnets_tab = {
|
||||
buttons: vnet_buttons,
|
||||
tabClass: "subTab",
|
||||
parentTab: "infra_tab",
|
||||
showOnTopMenu: false,
|
||||
showOnTopMenu: false
|
||||
}
|
||||
|
||||
Sunstone.addActions(vnet_actions);
|
||||
@@ -997,7 +996,7 @@ function setupCreateVNetDialog() {
|
||||
//Create the VNetwork.
|
||||
|
||||
network_json = {
|
||||
"vnet" : network_json,
|
||||
"vnet" : network_json
|
||||
};
|
||||
|
||||
Sunstone.runAction("Network.create",network_json);
|
||||
@@ -1035,7 +1034,7 @@ function setupVNetTemplateUpdateDialog(){
|
||||
width:700,
|
||||
modal:true,
|
||||
height:height,
|
||||
resizable:true,
|
||||
resizable:true
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
var vres_tab_content =
|
||||
'<table class="dashboard_table" style=>\
|
||||
var vres_tab_content = '\
|
||||
<table class="dashboard_table" style=>\
|
||||
<tr>\
|
||||
<td style="width:50%">\
|
||||
<table style="width:100%">\
|
||||
|
||||
@@ -684,7 +684,7 @@ function plot_graph(data,context,id_prefix,info){
|
||||
xaxis : {
|
||||
tickFormatter: function(val,axis){
|
||||
return pretty_time_axis(val);
|
||||
},
|
||||
}
|
||||
},
|
||||
yaxis : { labelWidth: 40,
|
||||
tickFormatter: function(val, axis) {
|
||||
@@ -749,7 +749,7 @@ function setupTemplateUpdateDialog(){
|
||||
width:700,
|
||||
modal:true,
|
||||
height:430,
|
||||
resizable:false,
|
||||
resizable:false
|
||||
});
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
* Crypto-JS v2.3.0
|
||||
* http://code.google.com/p/crypto-js/
|
||||
* Copyright (c) 2011, Jeff Mott. All rights reserved.
|
||||
* http://code.google.com/p/crypto-js/wiki/License
|
||||
*/
|
||||
if(typeof Crypto=="undefined"||!Crypto.util)(function(){var k=window.Crypto={},l=k.util={rotl:function(a,c){return a<<c|a>>>32-c},rotr:function(a,c){return a<<32-c|a>>>c},endian:function(a){if(a.constructor==Number)return l.rotl(a,8)&16711935|l.rotl(a,24)&4278255360;for(var c=0;c<a.length;c++)a[c]=l.endian(a[c]);return a},randomBytes:function(a){for(var c=[];a>0;a--)c.push(Math.floor(Math.random()*256));return c},bytesToWords:function(a){for(var c=[],b=0,d=0;b<a.length;b++,d+=8)c[d>>>5]|=a[b]<<24-
|
||||
d%32;return c},wordsToBytes:function(a){for(var c=[],b=0;b<a.length*32;b+=8)c.push(a[b>>>5]>>>24-b%32&255);return c},bytesToHex:function(a){for(var c=[],b=0;b<a.length;b++){c.push((a[b]>>>4).toString(16));c.push((a[b]&15).toString(16))}return c.join("")},hexToBytes:function(a){for(var c=[],b=0;b<a.length;b+=2)c.push(parseInt(a.substr(b,2),16));return c},bytesToBase64:function(a){if(typeof btoa=="function")return btoa(m.bytesToString(a));for(var c=[],b=0;b<a.length;b+=3)for(var d=a[b]<<16|a[b+1]<<
|
||||
8|a[b+2],e=0;e<4;e++)b*8+e*6<=a.length*8?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>>6*(3-e)&63)):c.push("=");return c.join("")},base64ToBytes:function(a){if(typeof atob=="function")return m.stringToBytes(atob(a));a=a.replace(/[^A-Z0-9+\/]/ig,"");for(var c=[],b=0,d=0;b<a.length;d=++b%4)d!=0&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(b-1))&Math.pow(2,-2*d+8)-1)<<d*2|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(b))>>>
|
||||
6-d*2);return c}};k=k.charenc={};k.UTF8={stringToBytes:function(a){return m.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(m.bytesToString(a)))}};var m=k.Binary={stringToBytes:function(a){for(var c=[],b=0;b<a.length;b++)c.push(a.charCodeAt(b)&255);return c},bytesToString:function(a){for(var c=[],b=0;b<a.length;b++)c.push(String.fromCharCode(a[b]));return c.join("")}}})();
|
||||
(function(){var k=Crypto,l=k.util,m=k.charenc,a=m.UTF8,c=m.Binary,b=k.SHA1=function(d,e){var g=l.wordsToBytes(b._sha1(d));return e&&e.asBytes?g:e&&e.asString?c.bytesToString(g):l.bytesToHex(g)};b._sha1=function(d){if(d.constructor==String)d=a.stringToBytes(d);var e=l.bytesToWords(d),g=d.length*8;d=[];var n=1732584193,h=-271733879,i=-1732584194,j=271733878,o=-1009589776;e[g>>5]|=128<<24-g%32;e[(g+64>>>9<<4)+15]=g;for(g=0;g<e.length;g+=16){for(var q=n,r=h,s=i,t=j,u=o,f=0;f<80;f++){if(f<16)d[f]=e[g+
|
||||
f];else{var p=d[f-3]^d[f-8]^d[f-14]^d[f-16];d[f]=p<<1|p>>>31}p=(n<<5|n>>>27)+o+(d[f]>>>0)+(f<20?(h&i|~h&j)+1518500249:f<40?(h^i^j)+1859775393:f<60?(h&i|h&j|i&j)-1894007588:(h^i^j)-899497514);o=j;j=i;i=h<<30|h>>>2;h=n;n=p}n+=q;h+=r;i+=s;j+=t;o+=u}return[n,h,i,j,o]};b._blocksize=16;b._digestsize=20})();
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
CryptoJS v3.0.2
|
||||
code.google.com/p/crypto-js
|
||||
(c) 2009-2012 by Jeff Mott. All rights reserved.
|
||||
code.google.com/p/crypto-js/wiki/License
|
||||
*/
|
||||
var CryptoJS=CryptoJS||function(h,o){var f={},j=f.lib={},k=j.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;b&&c.mixIn(b);c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.$super.extend(this)}}}(),i=j.WordArray=k.extend({init:function(a,b){a=
|
||||
this.words=a||[];this.sigBytes=b!=o?b:4*a.length},toString:function(a){return(a||p).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,a=a.sigBytes;this.clamp();if(d%4)for(var e=0;e<a;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535<c.length)for(e=0;e<a;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=
|
||||
k.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c<a;c+=4)b.push(4294967296*h.random()|0);return i.create(b,a)}}),l=f.enc={},p=l.Hex={stringify:function(a){for(var b=a.words,a=a.sigBytes,c=[],d=0;d<a;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16));c.push((e&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return i.create(c,b/2)}},n=l.Latin1={stringify:function(a){for(var b=
|
||||
a.words,a=a.sigBytes,c=[],d=0;d<a;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return i.create(c,b)}},q=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}},m=j.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=i.create();
|
||||
this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,d=b.sigBytes,e=this.blockSize,f=d/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0),a=f*e,d=h.min(4*a,d);if(a){for(var g=0;g<a;g+=e)this._doProcessBlock(c,g);g=c.splice(0,a);b.sigBytes-=d}return i.create(g,d)},clone:function(){var a=k.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});j.Hasher=m.extend({init:function(){this.reset()},
|
||||
reset:function(){m.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);this._doFinalize();return this._hash},clone:function(){var a=m.clone.call(this);a._hash=this._hash.clone();return a},blockSize:16,_createHelper:function(a){return function(b,c){return a.create(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return r.HMAC.create(a,c).finalize(b)}}});var r=f.algo={};return f}(Math);
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
CryptoJS v3.0.2
|
||||
code.google.com/p/crypto-js
|
||||
(c) 2009-2012 by Jeff Mott. All rights reserved.
|
||||
code.google.com/p/crypto-js/wiki/License
|
||||
*/
|
||||
(function(){var h=CryptoJS,i=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();for(var b=[],a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var b=b.replace(/\s/g,""),e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));
|
||||
for(var c=[],a=0,d=0;d<e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return i.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
CryptoJS v3.0.2
|
||||
code.google.com/p/crypto-js
|
||||
(c) 2009-2012 by Jeff Mott. All rights reserved.
|
||||
code.google.com/p/crypto-js/wiki/License
|
||||
*/
|
||||
(function(){var d=CryptoJS,c=d.lib,l=c.WordArray,c=c.Hasher,j=[],k=d.algo.SHA1=c.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,m){for(var a=this._hash.words,e=a[0],f=a[1],h=a[2],i=a[3],d=a[4],b=0;80>b;b++){if(16>b)j[b]=c[m+b]|0;else{var g=j[b-3]^j[b-8]^j[b-14]^j[b-16];j[b]=g<<1|g>>>31}g=(e<<5|e>>>27)+d+j[b];g=20>b?g+((f&h|~f&i)+1518500249):40>b?g+((f^h^i)+1859775393):60>b?g+((f&h|f&i|h&i)-1894007588):g+((f^h^i)-
|
||||
899497514);d=i;i=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+i|0;a[4]=a[4]+d|0},_doFinalize:function(){var d=this._data,c=d.words,a=8*this._nDataBytes,e=8*d.sigBytes;c[e>>>5]|=128<<24-e%32;c[(e+64>>>9<<4)+15]=a;d.sigBytes=4*c.length;this._process()}});d.SHA1=c._createHelper(k);d.HmacSHA1=c._createHmacHelper(k)})();
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,8 @@
|
||||
THIRD-PARTY SOFTWARE
|
||||
|
||||
* Authors: Emil A Eklund <emil@eae.net>
|
||||
Erik Arvidsson <erik@eae.net>
|
||||
Glen Murphy <glen@glenmurphy.com>
|
||||
* Info: http://code.google.com/p/explorercanvas/
|
||||
* Copyright: Copyright 2006 Google Inc.
|
||||
* License: Apache 2 License. See LICENSE file.
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright 2006 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
|
||||
b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])},
|
||||
initElement:function(b){if(!b.getContext){b.getContext=X;b.innerHTML="";b.attachEvent("onpropertychange",Z);b.attachEvent("onresize",$);var a=b.attributes;if(a.width&&a.width.specified)b.style.width=a.width.nodeValue+"px";else b.width=b.clientWidth;if(a.height&&a.height.specified)b.style.height=a.height.nodeValue+"px";else b.height=b.clientHeight}return b}};function Z(b){var a=b.srcElement;switch(b.propertyName){case "width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect();
|
||||
break;case "height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function $(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}M.init();var N=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)N[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function y(b,a){var c=I(),d=0;for(;d<3;d++){var f=0;for(;f<3;f++){var h=0,g=0;for(;g<3;g++)h+=b[d][g]*a[g][f];c[d][f]=
|
||||
h}}return c}function O(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.globalAlpha=b.globalAlpha;a.arcScaleX_=b.arcScaleX_;a.arcScaleY_=b.arcScaleY_;a.lineScale_=b.lineScale_}function P(b){var a,c=1;b=String(b);if(b.substring(0,3)=="rgb"){var d=b.indexOf("(",3),f=b.indexOf(")",d+
|
||||
1),h=b.substring(d+1,f).split(",");a="#";var g=0;for(;g<3;g++)a+=N[Number(h[g])];if(h.length==4&&b.substr(3,1)=="a")c=h[3]}else a=b;return{color:a,alpha:c}}function aa(b){switch(b){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}function H(b){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=b;
|
||||
var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.element_=a;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};
|
||||
i.lineTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(b,a,c,d,f,h){var g=this.getCoords_(f,h),l=this.getCoords_(b,a),e=this.getCoords_(c,d);Q(this,l,e,g)};function Q(b,a,c,d){b.currentPath_.push({type:"bezierCurveTo",cp1x:a.x,cp1y:a.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});b.currentX_=d.x;b.currentY_=d.y}i.quadraticCurveTo=function(b,a,c,d){var f=this.getCoords_(b,a),h=this.getCoords_(c,d),g={x:this.currentX_+
|
||||
0.6666666666666666*(f.x-this.currentX_),y:this.currentY_+0.6666666666666666*(f.y-this.currentY_)};Q(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(b,a,c,d,f,h){c*=k;var g=h?"at":"wa",l=b+G(d)*c-v,e=a+F(d)*c-v,m=b+G(f)*c-v,r=a+F(f)*c-v;if(l==m&&!h)l+=0.125;var n=this.getCoords_(b,a),o=this.getCoords_(l,e),q=this.getCoords_(m,r);this.currentPath_.push({type:g,x:n.x,y:n.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(b,a,c,d){this.moveTo(b,
|
||||
a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath()};i.strokeRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.stroke();this.currentPath_=f};i.fillRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.fill();this.currentPath_=f};i.createLinearGradient=function(b,
|
||||
a,c,d){var f=new D("gradient");f.x0_=b;f.y0_=a;f.x1_=c;f.y1_=d;return f};i.createRadialGradient=function(b,a,c,d,f,h){var g=new D("gradientradial");g.x0_=b;g.y0_=a;g.r0_=c;g.x1_=d;g.y1_=f;g.r1_=h;return g};i.drawImage=function(b){var a,c,d,f,h,g,l,e,m=b.runtimeStyle.width,r=b.runtimeStyle.height;b.runtimeStyle.width="auto";b.runtimeStyle.height="auto";var n=b.width,o=b.height;b.runtimeStyle.width=m;b.runtimeStyle.height=r;if(arguments.length==3){a=arguments[1];c=arguments[2];h=g=0;l=d=n;e=f=o}else if(arguments.length==
|
||||
5){a=arguments[1];c=arguments[2];d=arguments[3];f=arguments[4];h=g=0;l=n;e=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];l=arguments[3];e=arguments[4];a=arguments[5];c=arguments[6];d=arguments[7];f=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(a,c),t=[];t.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var E=[];E.push("M11=",
|
||||
this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/k),",","Dy=",j(q.y/k),"");var p=q,z=this.getCoords_(a+d,c),w=this.getCoords_(a,c+f),x=this.getCoords_(a+d,c+f);p.x=s.max(p.x,z.x,w.x,x.x);p.y=s.max(p.y,z.y,w.y,x.y);t.push("padding:0 ",j(p.x/k),"px ",j(p.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",E.join(""),", sizingmethod='clip');")}else t.push("top:",j(q.y/k),"px;left:",j(q.x/k),"px;");t.push(' ">','<g_vml_:image src="',b.src,
|
||||
'"',' style="width:',k*d,"px;"," height:",k*f,'px;"',' cropleft="',h/n,'"',' croptop="',g/o,'"',' cropright="',(n-h-l)/n,'"',' cropbottom="',(o-g-e)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("<g_vml_:shape",' filled="',!!b,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',
|
||||
!b,'"',' path="');var h={x:null,y:null},g={x:null,y:null},l=0;for(;l<this.currentPath_.length;l++){var e=this.currentPath_[l];switch(e.type){case "moveTo":a.push(" m ",j(e.x),",",j(e.y));break;case "lineTo":a.push(" l ",j(e.x),",",j(e.y));break;case "close":a.push(" x ");e=null;break;case "bezierCurveTo":a.push(" c ",j(e.cp1x),",",j(e.cp1y),",",j(e.cp2x),",",j(e.cp2y),",",j(e.x),",",j(e.y));break;case "at":case "wa":a.push(" ",e.type," ",j(e.x-this.arcScaleX_*e.radius),",",j(e.y-this.arcScaleY_*e.radius),
|
||||
" ",j(e.x+this.arcScaleX_*e.radius),",",j(e.y+this.arcScaleY_*e.radius)," ",j(e.xStart),",",j(e.yStart)," ",j(e.xEnd),",",j(e.yEnd));break}if(e){if(h.x==null||e.x<h.x)h.x=e.x;if(g.x==null||e.x>g.x)g.x=e.x;if(h.y==null||e.y<h.y)h.y=e.y;if(g.y==null||e.y>g.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
|
||||
z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l<J;l++){var T=u[l];S.push(T.offset*q+
|
||||
o+" "+T.color)}a.push('<g_vml_:fill type="',m.type_,'"',' method="none" focus="100%"',' color="',da,'"',' color2="',ea,'"',' colors="',S.join(","),'"',' opacity="',ga,'"',' g_o_:opacity2="',fa,'"',' angle="',r,'"',' focusposition="',n.x,",",n.y,'" />')}else a.push('<g_vml_:fill color="',d,'" opacity="',f,'" />');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("<g_vml_:stroke",' opacity="',f,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',aa(this.lineCap),
|
||||
'"',' weight="',K,'px"',' color="',d,'" />')}a.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
|
||||
this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
|
||||
0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
|
||||
M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
|
||||
@@ -7,14 +7,16 @@
|
||||
|
||||
<!-- Vendor Libraries -->
|
||||
<script type="text/javascript" src="vendor/jQuery/jquery-1.7.2.min.js"></script>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="vendor/crypto-js/core-min.js"></script>
|
||||
<script type="text/javascript" src="vendor/crypto-js/enc-base64-min.js"></script>
|
||||
<![endif]-->
|
||||
<!-- End Vendor Libraries -->
|
||||
|
||||
<script type="text/javascript" src="js/opennebula.js"></script>
|
||||
<script type="text/javascript" src="js/login.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<script language="javascript" type="text/javascript" src="vendor/flot/jquery.flot.pie.min.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="vendor/flot/jquery.flot.resize.min.js"></script>
|
||||
<script type="text/javascript" src="vendor/fileuploader/fileuploader.js"></script>
|
||||
<!--[if lte IE 8]>
|
||||
<script type="text/javascript" src="vendor/explorercanvas/excanvas.compiled.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- End Vendor Libraries -->
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ bool Template::get(
|
||||
|
||||
iss >> value;
|
||||
|
||||
if ( iss.fail() )
|
||||
if (iss.fail() || !iss.eof())
|
||||
{
|
||||
value = 0;
|
||||
return false;
|
||||
@@ -461,7 +461,7 @@ bool Template::get(
|
||||
|
||||
iss >> value;
|
||||
|
||||
if ( iss.fail() )
|
||||
if (iss.fail() || !iss.eof())
|
||||
{
|
||||
value = 0;
|
||||
return false;
|
||||
|
||||
@@ -252,13 +252,13 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
|
||||
goto error_memory;
|
||||
}
|
||||
|
||||
replace_template_attribute("MEMORY", ivalue);
|
||||
|
||||
if ( get_template_attribute("CPU", fvalue) == false || fvalue <= 0 )
|
||||
{
|
||||
goto error_cpu;
|
||||
}
|
||||
|
||||
// VCPU is optional, first check if the attribute exists, then check it is
|
||||
// an integer
|
||||
get_template_attribute("VCPU", value);
|
||||
|
||||
if ( value.empty() == false )
|
||||
@@ -267,8 +267,6 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
|
||||
{
|
||||
goto error_vcpu;
|
||||
}
|
||||
|
||||
replace_template_attribute("VCPU", ivalue);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
+17
-13
@@ -20,6 +20,9 @@
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <libgen.h>
|
||||
#include <math.h>
|
||||
|
||||
const float LibVirtDriver::CGROUP_BASE_CPU_SHARES = 1024;
|
||||
|
||||
int LibVirtDriver::deployment_description_kvm(
|
||||
const VirtualMachine * vm,
|
||||
@@ -31,9 +34,8 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
vector<const Attribute *> attrs;
|
||||
|
||||
string vcpu;
|
||||
string memory;
|
||||
|
||||
int memory_in_kb = 0;
|
||||
float cpu;
|
||||
int memory;
|
||||
|
||||
string emulator_path = "";
|
||||
|
||||
@@ -111,7 +113,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
file << "\t<name>one-" << vm->get_oid() << "</name>" << endl;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// CPU
|
||||
// CPU & Memory
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
vm->get_template_attribute("VCPU", vcpu);
|
||||
@@ -126,17 +128,19 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
file << "\t<vcpu>" << vcpu << "</vcpu>" << endl;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Memory
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
vm->get_template_attribute("MEMORY",memory);
|
||||
|
||||
if (!memory.empty())
|
||||
//Every process gets 1024 shares by default (cgroups), scale this with CPU
|
||||
if(vm->get_template_attribute("CPU", cpu))
|
||||
{
|
||||
memory_in_kb = atoi(memory.c_str()) * 1024;
|
||||
file << "\t<cputune>" << endl
|
||||
<< "\t\t<shares>"<< ceil( cpu * CGROUP_BASE_CPU_SHARES )
|
||||
<< "</shares>" << endl
|
||||
<< "\t</cputune>"<< endl;
|
||||
}
|
||||
|
||||
file << "\t<memory>" << memory_in_kb << "</memory>" << endl;
|
||||
// Memory must be expressed in Kb
|
||||
if (vm->get_template_attribute("MEMORY",memory))
|
||||
{
|
||||
file << "\t<memory>" << memory * 1024 << "</memory>" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user