mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-03 13:47:01 +03:00
Feature #1302: Sunstone support for IE
* Fix javascript for IE 7 * Add explorer canvas library so graphs are painted in IE 7,8 * Add warnings to IE users (cherry picked from commit 692fdbe3ce9d2c693ef71e1cad06d6882fe7ff31)
This commit is contained in:
parent
d84ce02d44
commit
621e35658b
@ -266,6 +266,7 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \
|
||||
$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 \
|
||||
@ -489,6 +490,7 @@ INSTALL_SUNSTONE_FILES=(
|
||||
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
|
||||
@ -1345,6 +1347,11 @@ 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"
|
||||
|
@ -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);
|
||||
|
@ -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%">\
|
||||
|
202
src/sunstone/public/vendor/explorercanvas/LICENSE.txt
vendored
Normal file
202
src/sunstone/public/vendor/explorercanvas/LICENSE.txt
vendored
Normal file
@ -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.
|
8
src/sunstone/public/vendor/explorercanvas/NOTICE
vendored
Normal file
8
src/sunstone/public/vendor/explorercanvas/NOTICE
vendored
Normal file
@ -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.
|
35
src/sunstone/public/vendor/explorercanvas/excanvas.compiled.js
vendored
Normal file
35
src/sunstone/public/vendor/explorercanvas/excanvas.compiled.js
vendored
Normal 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 -->
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user