diff --git a/include/LibVirtDriver.h b/include/LibVirtDriver.h index 9fd3286f15..081124bc38 100644 --- a/include/LibVirtDriver.h +++ b/include/LibVirtDriver.h @@ -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 diff --git a/include/PoolObjectSQL.h b/include/PoolObjectSQL.h index 6304d6bb6c..dd6e3ab3de 100644 --- a/include/PoolObjectSQL.h +++ b/include/PoolObjectSQL.h @@ -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. diff --git a/install.sh b/install.sh index 347a6e5597..64ea77a958 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/share/scons/po2json.rb b/share/scons/po2json.rb index b46d9ef832..9153736f34 100755 --- a/share/scons/po2json.rb +++ b/share/scons/po2json.rb @@ -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 "}" diff --git a/src/cloud/occi/lib/ui/public/css/application.css b/src/cloud/occi/lib/ui/public/css/application.css index a1b6b3cf61..faad452b97 100644 --- a/src/cloud/occi/lib/ui/public/css/application.css +++ b/src/cloud/occi/lib/ui/public/css/application.css @@ -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{ diff --git a/src/cloud/occi/lib/ui/public/css/layout.css b/src/cloud/occi/lib/ui/public/css/layout.css index 2bfe875597..6f113e7c6b 100644 --- a/src/cloud/occi/lib/ui/public/css/layout.css +++ b/src/cloud/occi/lib/ui/public/css/layout.css @@ -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+ */ diff --git a/src/cloud/occi/lib/ui/public/css/login.css b/src/cloud/occi/lib/ui/public/css/login.css index b58bacd20f..3c76e3b65f 100644 --- a/src/cloud/occi/lib/ui/public/css/login.css +++ b/src/cloud/occi/lib/ui/public/css/login.css @@ -139,6 +139,7 @@ div#login input#login_btn:hover { position: relative; top: 80px; font-size:1.0em; + padding: 2px 15px; } #login_spinner { diff --git a/src/cloud/occi/lib/ui/public/js/login.js b/src/cloud/occi/lib/ui/public/js/login.js index 363fb781fd..b7b80e5908 100644 --- a/src/cloud/occi/lib/ui/public/js/login.js +++ b/src/cloud/occi/lib/ui/public/js/login.js @@ -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(); }); diff --git a/src/cloud/occi/lib/ui/public/js/occi.js b/src/cloud/occi/lib/ui/public/js/occi.js index 29bd389ed6..edcd9c96c1 100644 --- a/src/cloud/occi/lib/ui/public/js/occi.js +++ b/src/cloud/occi/lib/ui/public/js/occi.js @@ -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); - }, - - }, + } + } } diff --git a/src/cloud/occi/lib/ui/public/js/plugins/compute.js b/src/cloud/occi/lib/ui/public/js/plugins/compute.js index 605bbec9e3..fe74c3bfcd 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/compute.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/compute.js @@ -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: '', + 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 != "") ? { diff --git a/src/cloud/occi/lib/ui/public/js/plugins/configuration.js b/src/cloud/occi/lib/ui/public/js/plugins/configuration.js index 9562202bf3..6b1444091d 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/configuration.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/configuration.js @@ -56,7 +56,7 @@ var config_actions = { call : OCCI.Config.list, callback : updateConfig, error : onError - }, + } }; var config_tab = { diff --git a/src/cloud/occi/lib/ui/public/js/plugins/network.js b/src/cloud/occi/lib/ui/public/js/plugins/network.js index 93942ff016..609151d206 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/network.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/network.js @@ -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: '', + 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 != "") ? { diff --git a/src/cloud/occi/lib/ui/public/js/plugins/storage.js b/src/cloud/occi/lib/ui/public/js/plugins/storage.js index 2fb749a85f..37e09ce498 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/storage.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/storage.js @@ -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: '', + 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 != "") ? { diff --git a/src/cloud/occi/lib/ui/templates/login.html b/src/cloud/occi/lib/ui/templates/login.html index 7fb6b3e456..b54379ff53 100644 --- a/src/cloud/occi/lib/ui/templates/login.html +++ b/src/cloud/occi/lib/ui/templates/login.html @@ -6,7 +6,11 @@ - + + + diff --git a/src/ozones/Server/public/css/login.css b/src/ozones/Server/public/css/login.css index 217c8c12ca..ea9fde05a8 100644 --- a/src/ozones/Server/public/css/login.css +++ b/src/ozones/Server/public/css/login.css @@ -140,6 +140,7 @@ div#login input#login_btn:hover { position: relative; top: 80px; font-size:1.0em; + padding: 2px 15px; } #login_spinner { diff --git a/src/ozones/Server/public/js/login.js b/src/ozones/Server/public/js/login.js index 1ddc1ecd61..72688f60fb 100644 --- a/src/ozones/Server/public/js/login.js +++ b/src/ozones/Server/public/js/login.js @@ -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(); }); diff --git a/src/ozones/Server/public/js/ozones.js b/src/ozones/Server/public/js/ozones.js index cd3027b53b..8e76421896 100644 --- a/src/ozones/Server/public/js/ozones.js +++ b/src/ozones/Server/public/js/ozones.js @@ -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"); } - }, + } }; diff --git a/src/ozones/Server/public/js/plugins/aggregated-tab.js b/src/ozones/Server/public/js/plugins/aggregated-tab.js index bc53615a57..937c9c832f 100644 --- a/src/ozones/Server/public/js/plugins/aggregated-tab.js +++ b/src/ozones/Server/public/js/plugins/aggregated-tab.js @@ -15,8 +15,8 @@ /* -------------------------------------------------------------------------- */ -var aggregated_hosts_tab_content = -'
\ +var aggregated_hosts_tab_content = '\ +
\
\ \ \ @@ -38,8 +38,8 @@ var aggregated_hosts_tab_content = \ \
'; -var aggregated_vms_tab_content = -'
\ +var aggregated_vms_tab_content = '\ +
\
\ \ \ @@ -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: '', + alwaysActive: true } }; var vms_buttons = { "ZoneVMs.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + alwaysActive: true } }; var vns_buttons = { "ZoneVNs.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + alwaysActive: true } }; var images_buttons = { "ZoneImages.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + alwaysActive: true } }; var users_buttons = { "ZoneUsers.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + alwaysActive: true } }; var templates_buttons = { "ZoneTemplates.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + alwaysActive: true } }; var clusters_buttons = { "ZoneClusters.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + alwaysActive: true } }; var datastores_buttons = { "ZoneDatastores.refresh" : { - type: "image", - text: "Refresh list", - img: "images/Refresh-icon.png" + type: "action", + text: '', + 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); diff --git a/src/ozones/Server/public/js/plugins/vdcs-tab.js b/src/ozones/Server/public/js/plugins/vdcs-tab.js index 01eb9dc6dd..207d602d86 100644 --- a/src/ozones/Server/public/js/plugins/vdcs-tab.js +++ b/src/ozones/Server/public/js/plugins/vdcs-tab.js @@ -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: '', + 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); diff --git a/src/ozones/Server/public/js/plugins/zones-tab.js b/src/ozones/Server/public/js/plugins/zones-tab.js index 6eff8e5b8b..ad40cfa59d 100644 --- a/src/ozones/Server/public/js/plugins/zones-tab.js +++ b/src/ozones/Server/public/js/plugins/zones-tab.js @@ -14,8 +14,8 @@ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ -var zones_tab_content = -'
\ +var zones_tab_content = '\ +\
\
\
\ @@ -33,8 +33,8 @@ var zones_tab_content = '; -var create_zone_tmpl = -'
\ +var create_zone_tmpl = '\ +\
\
\ \ @@ -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: '', + 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 : -'
\ + content : '\ +
\
\ \ \ @@ -370,8 +370,8 @@ function updateZoneInfo(req,zone_json){ var templates_tab = { title: "Templates", - content : -'
\ + content : '\ +
\
\ \ \ @@ -389,8 +389,8 @@ function updateZoneInfo(req,zone_json){ var vms_tab = { title : "Virtual Machines", - content : -'
\ + content : '\ +
\
\ \ \ @@ -413,8 +413,8 @@ function updateZoneInfo(req,zone_json){ var vnets_tab = { title : "Virtual Networks", - content : -'
\ + content : '\ +
\
\ \ \ @@ -435,8 +435,8 @@ function updateZoneInfo(req,zone_json){ var images_tab = { title : "Images", - content : -'
\ + content : '\ +
\
\ \ \ @@ -461,8 +461,8 @@ function updateZoneInfo(req,zone_json){ var users_tab = { title: "Users", - content: -'
\ + content: '\ +
\
\ \ \ @@ -484,8 +484,8 @@ function updateZoneInfo(req,zone_json){ var clusters_tab = { title: "Clusters", - content: -'
\ + content: '\ +
\
\ \ \ @@ -504,8 +504,8 @@ function updateZoneInfo(req,zone_json){ var datastores_tab = { title: "Datastores", - content: -'
\ + content: '\ +
\
\ \ \ @@ -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 } }; diff --git a/src/ozones/Server/templates/login.html b/src/ozones/Server/templates/login.html index 0624092c43..c0a381413b 100644 --- a/src/ozones/Server/templates/login.html +++ b/src/ozones/Server/templates/login.html @@ -6,6 +6,10 @@ + diff --git a/src/sunstone/public/css/login.css b/src/sunstone/public/css/login.css index d275f49a57..30837fb313 100644 --- a/src/sunstone/public/css/login.css +++ b/src/sunstone/public/css/login.css @@ -139,6 +139,7 @@ div#login input#login_btn:hover { margin-right: auto; top: 80px; font-size:1.0em; + padding: 2px 15px; } #login_spinner { diff --git a/src/sunstone/public/js/locale.js b/src/sunstone/public/js/locale.js index fedfc42cc6..b53137fc6a 100644 --- a/src/sunstone/public/js/locale.js +++ b/src/sunstone/public/js/locale.js @@ -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 }; diff --git a/src/sunstone/public/js/login.js b/src/sunstone/public/js/login.js index 6b460d35c0..a1012c14e6 100644 --- a/src/sunstone/public/js/login.js +++ b/src/sunstone/public/js/login.js @@ -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(); }); diff --git a/src/sunstone/public/js/monitoring.js b/src/sunstone/public/js/monitoring.js index e2efa88563..98244595e7 100644 --- a/src/sunstone/public/js/monitoring.js +++ b/src/sunstone/public/js/monitoring.js @@ -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 diff --git a/src/sunstone/public/js/opennebula.js b/src/sunstone/public/js/opennebula.js index 1e4ac8a512..2e85940675 100644 --- a/src/sunstone/public/js/opennebula.js +++ b/src/sunstone/public/js/opennebula.js @@ -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; - }, + } }); - }, - }, + } + } } diff --git a/src/sunstone/public/js/plugins/acls-tab.js b/src/sunstone/public/js/plugins/acls-tab.js index 2189989d69..fc08166d59 100644 --- a/src/sunstone/public/js/plugins/acls-tab.js +++ b/src/sunstone/public/js/plugins/acls-tab.js @@ -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 } - }, + } } diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js index ddae85b026..57baa73a5d 100644 --- a/src/sunstone/public/js/plugins/clusters-tab.js +++ b/src/sunstone/public/js/plugins/clusters-tab.js @@ -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 != "") ? { diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index c8c1008806..ed49cb8b5e 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -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")})); diff --git a/src/sunstone/public/js/plugins/dashboard-tab.js b/src/sunstone/public/js/plugins/dashboard-tab.js index 5993d5b06a..42cc399ab2 100644 --- a/src/sunstone/public/js/plugins/dashboard-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-tab.js @@ -181,7 +181,7 @@ var dashboard_tab_content = var dashboard_tab = { title: ''+tr("Dashboard"), content: dashboard_tab_content, - showOnTopMenu: false, + showOnTopMenu: false } Sunstone.addMainTab('dashboard_tab',dashboard_tab); diff --git a/src/sunstone/public/js/plugins/dashboard-users-tab.js b/src/sunstone/public/js/plugins/dashboard-users-tab.js index 7dbe45a959..37c7631e34 100644 --- a/src/sunstone/public/js/plugins/dashboard-users-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-users-tab.js @@ -85,7 +85,7 @@ var dashboard_tab_content = var dashboard_tab = { title: ''+tr("Dashboard"), content: dashboard_tab_content, - showOnTopMenu: false, + showOnTopMenu: false } Sunstone.addMainTab('dashboard_tab',dashboard_tab); diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js index 3b5f79a5df..6e9f886618 100644 --- a/src/sunstone/public/js/plugins/datastores-tab.js +++ b/src/sunstone/public/js/plugins/datastores-tab.js @@ -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(); diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 5b23eb9a5b..37aeaf0390 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -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); diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 4c18260eb3..4849013234 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -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'] = { } } } - }, + } } } diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index ef49c60c70..3d99b58206 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -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(); diff --git a/src/sunstone/public/js/plugins/marketplace-tab.js b/src/sunstone/public/js/plugins/marketplace-tab.js index 3ffb249040..1a5fd382c8 100644 --- a/src/sunstone/public/js/plugins/marketplace-tab.js +++ b/src/sunstone/public/js/plugins/marketplace-tab.js @@ -115,7 +115,7 @@ var marketplace_tab_content = '\ var marketplace_tab = { title: '' + 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); diff --git a/src/sunstone/public/js/plugins/system-tab.js b/src/sunstone/public/js/plugins/system-tab.js index fd0bbe78f9..8dc7e4519a 100644 --- a/src/sunstone/public/js/plugins/system-tab.js +++ b/src/sunstone/public/js/plugins/system-tab.js @@ -14,8 +14,8 @@ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ -var system_tab_content = -'
\ +var system_tab_content = '\ +
\ \
\ \ diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 295ffe0762..19306d34e3 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -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(); diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index 9ab1256e64..00eccecc6c 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -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 - }, + } } } diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 86ff58de67..b14a6f3f72 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -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(); diff --git a/src/sunstone/public/js/plugins/vnets-tab.js b/src/sunstone/public/js/plugins/vnets-tab.js index 929f1d3836..523c7e4568 100644 --- a/src/sunstone/public/js/plugins/vnets-tab.js +++ b/src/sunstone/public/js/plugins/vnets-tab.js @@ -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(); diff --git a/src/sunstone/public/js/plugins/vresources-tab.js b/src/sunstone/public/js/plugins/vresources-tab.js index 494f8eb1a2..0e6d91f84a 100644 --- a/src/sunstone/public/js/plugins/vresources-tab.js +++ b/src/sunstone/public/js/plugins/vresources-tab.js @@ -14,8 +14,8 @@ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ -var vres_tab_content = -'
\ +var vres_tab_content = '\ +
\ \
\ \ diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index 2005cd7c68..949c5967f0 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -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(); diff --git a/src/sunstone/public/vendor/crypto-js/2.3.0-crypto-sha1.js b/src/sunstone/public/vendor/crypto-js/2.3.0-crypto-sha1.js deleted file mode 100644 index 579cf6c456..0000000000 --- a/src/sunstone/public/vendor/crypto-js/2.3.0-crypto-sha1.js +++ /dev/null @@ -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<>>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;c0;a--)c.push(Math.floor(Math.random()*256));return c},bytesToWords:function(a){for(var c=[],b=0,d=0;b>>5]|=a[b]<<24- -d%32;return c},wordsToBytes:function(a){for(var c=[],b=0;b>>5]>>>24-b%32&255);return c},bytesToHex:function(a){for(var c=[],b=0;b>>4).toString(16));c.push((a[b]&15).toString(16))}return c.join("")},hexToBytes:function(a){for(var c=[],b=0;b>>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>> -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>5]|=128<<24-g%32;e[(g+64>>>9<<4)+15]=g;for(g=0;g>>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})(); diff --git a/src/sunstone/public/vendor/crypto-js/core-min.js b/src/sunstone/public/vendor/crypto-js/core-min.js new file mode 100644 index 0000000000..65e57cc4f9 --- /dev/null +++ b/src/sunstone/public/vendor/crypto-js/core-min.js @@ -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>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535>>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>>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>>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>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;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>>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>>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>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return i.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/src/sunstone/public/vendor/crypto-js/sha1-min.js b/src/sunstone/public/vendor/crypto-js/sha1-min.js new file mode 100644 index 0000000000..21ac56230e --- /dev/null +++ b/src/sunstone/public/vendor/crypto-js/sha1-min.js @@ -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)})(); diff --git a/src/sunstone/public/vendor/explorercanvas/LICENSE.txt b/src/sunstone/public/vendor/explorercanvas/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/src/sunstone/public/vendor/explorercanvas/LICENSE.txt @@ -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. diff --git a/src/sunstone/public/vendor/explorercanvas/NOTICE b/src/sunstone/public/vendor/explorercanvas/NOTICE new file mode 100644 index 0000000000..734f4d1efc --- /dev/null +++ b/src/sunstone/public/vendor/explorercanvas/NOTICE @@ -0,0 +1,8 @@ +THIRD-PARTY SOFTWARE + + * Authors: Emil A Eklund + Erik Arvidsson + Glen Murphy + * Info: http://code.google.com/p/explorercanvas/ + * Copyright: Copyright 2006 Google Inc. + * License: Apache 2 License. See LICENSE file. diff --git a/src/sunstone/public/vendor/explorercanvas/excanvas.compiled.js b/src/sunstone/public/vendor/explorercanvas/excanvas.compiled.js new file mode 100644 index 0000000000..a34ca1da34 --- /dev/null +++ b/src/sunstone/public/vendor/explorercanvas/excanvas.compiled.js @@ -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','","");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.x)g.x=e.x;if(h.y==null||e.yg.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')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");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})(); diff --git a/src/sunstone/templates/login.html b/src/sunstone/templates/login.html index c708ec0ea5..690afc7c93 100644 --- a/src/sunstone/templates/login.html +++ b/src/sunstone/templates/login.html @@ -7,14 +7,16 @@ + - -