diff --git a/src/sunstone/public/css/app.css b/src/sunstone/public/css/app.css index a89f34c8aa..aea314a90e 100644 --- a/src/sunstone/public/css/app.css +++ b/src/sunstone/public/css/app.css @@ -6676,3 +6676,86 @@ small { a.footer.button { margin: 5px; } + +/* line 689, ../sass/app.scss */ +.user-login { + float: right; +} + +/* line 693, ../sass/app.scss */ +.user-login i.header-icon { + color: #6f6f6f; + font-weight: 300; + font-size: 23px; +} + +/* line 699, ../sass/app.scss */ +.user-login .button { + color: #6f6f6f; + font-size: 60%; + line-height: 0; +} + +/* line 705, ../sass/app.scss */ +.user-login .button.secondary { + background: #f2f2f2; + border: 0px; + margin-right: 0px; + font-weight: 300; +} + +/* line 713, ../sass/app.scss */ +.user-login .button.secondary:hover, .user-login .button.secondary:focus { + background-color: #d0d0d0; + color: #6f6f6f; +} + +/* line 718, ../sass/app.scss */ +.user-login .button.dropdown.tiny::after { + border: solid 5px; + border-color: #b6b6b6 transparent transparent transparent; + right: 7px; +} + +/* line 724, ../sass/app.scss */ +.header-resource { + text-align: center; +} + +/* line 728, ../sass/app.scss */ +.header-resource { + float: left; +} + +/* line 732, ../sass/app.scss */ +.header { + text-align: center; +} + +/* line 736, ../sass/app.scss */ +.button.dropdown.tiny ul.no-hover.show-dropdown { + top: 34px !important; +} + +/* line 740, ../sass/app.scss */ +.graph_legend table { + background: #f2f2f2; + border: 0px; + width: 100%; +} + +/* line 746, ../sass/app.scss */ +.graph_legend .subheader { + margin-bottom: 5px; +} + +/* line 750, ../sass/app.scss */ +.dashboard hr { + margin: 0; + margin-bottom: 8px; +} + +/* line 755, ../sass/app.scss */ +.graph { + margin-bottom: 15px !important; +} diff --git a/src/sunstone/public/js/plugins/acls-tab.js b/src/sunstone/public/js/plugins/acls-tab.js index aa4e938bf7..7eb193ea9c 100644 --- a/src/sunstone/public/js/plugins/acls-tab.js +++ b/src/sunstone/public/js/plugins/acls-tab.js @@ -23,7 +23,16 @@ var acls_tab_content = '\
\
\
\ -

'+tr("Access Control Lists")+'

\ +

\ + \ + '+tr("Access Control Lists")+'\ + \ + \ +  \ + \ + \ +

\
\
\
\ diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js index ec86c9668e..f7e08b0c9e 100644 --- a/src/sunstone/public/js/plugins/clusters-tab.js +++ b/src/sunstone/public/js/plugins/clusters-tab.js @@ -899,7 +899,16 @@ var clusters_tab_content = '\
\
\
\ -

'+tr("Clusters")+'

\ +

\ + \ + '+tr("Clusters")+'\ + \ + \ +  \ + \ + \ +

\
\
\
\ diff --git a/src/sunstone/public/js/plugins/dashboard-tab.js b/src/sunstone/public/js/plugins/dashboard-tab.js index 88a857317f..0c52364e4e 100644 --- a/src/sunstone/public/js/plugins/dashboard-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-tab.js @@ -182,47 +182,62 @@ var dashboard_tab_content = var dashboard_tab_content = '\
\ -
\ -
\ +
\ +
\ +
\ +

\ + \ + '+tr("Dashboard")+'\ + \ + \ +  \ + \ + \ +

\
\ +
\ +
\
\
\
\
\ -

'+tr("Hosts")+'

\ +
'+tr("Hosts")+'
\
\
\ -
\ -

\ -

'+tr("TOTAL")+'

\ -
\ -
\ -

\ -

'+tr("ON")+'

\ -
\ -
\ -

\ -

'+tr("OFF")+'

\ -
\ -
\ -

\ -

'+tr("ERROR")+'

\ +
\ +

\ + \ + '+tr("TOTAL")+' \ + \ + '+tr("ON")+' \ + \ + '+tr("OFF")+' \ + \ + '+tr("ERROR")+'\ +

\
\
\ -
\ -
\ -
\ +
\ +
\ +

'+tr("CPU")+'

\
\
\ -
\ +
\
\
\ -
\ -
\ -
\ +
\ +
\ +
\ +
\ +

'+tr("MEMORY")+'

\
\
\ -
\ +
\ +
\ +
\ +
\ +
\
\
\
\ @@ -230,40 +245,48 @@ var dashboard_tab_content = '\
\
\
\ -

'+tr("Virtual Machines")+'

\ +
'+tr("Virtual Machines")+'
\
\
\ -
\ -

\ -

'+tr("TOTAL")+'

\ +
\ +

\ + \ + '+tr("TOTAL")+' \ + \ + '+tr("ACTIVE")+' \ + \ + '+tr("PENDING")+' \ +

\
\ -
\ -

\ -

'+tr("ACTIVE")+'

\ +
\ +
\ +
\ +

\ + \ + '+tr("STOPPED")+' \ + \ + '+tr("FAILED")+'\ +

\
\ -
\ -

\ -

'+tr("PENDING")+'

\ +
\ +
\ +
\ +

'+tr("NET DOWNLOAD SLEEP")+'

\ +
\
\ -
\ -

\ -

'+tr("FAILED")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\ +

'+tr("NET UPLOAD SLEEP")+'

\ +
\
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ +
\ +
\ +
\
\
\
\ @@ -273,16 +296,16 @@ var dashboard_tab_content = '\
\
\
\ -

'+tr("Storage")+'

\ +
'+tr("Storage")+'
\
\
\ -
\ -

\ -

'+tr("IMAGES")+'

\ -
\ -
\ -

\ -

'+tr("SIZE")+'

\ +
\ +

\ + \ + '+tr("IMAGES")+' \ + \ + '+tr("USED")+'\ +

\
\
\
\ @@ -290,16 +313,16 @@ var dashboard_tab_content = '\
\
\
\ -

'+tr("Users")+'

\ +
'+tr("Users")+'
\
\
\ -
\ -

\ -

'+tr("USERS")+'

\ -
\ -
\ -

297

\ -

'+tr("GROUPS")+'

\ +
\ +

\ + \ + '+tr("USERS")+' \ + \ + '+tr("GROUPS")+'\ +

\
\
\
\ @@ -307,16 +330,16 @@ var dashboard_tab_content = '\
\
\
\ -

'+tr("Network")+'

\ +
'+tr("Network")+'
\
\
\ -
\ -

\ -

'+tr("VNETS")+'

\ -
\ -
\ -

\ -

'+tr("ADDRESSES")+'

\ +
\ +

\ + \ + '+tr("VNETS")+' \ + \ + '+tr("ADDRESSES")+'\ +

\
\
\
\ @@ -341,4 +364,4 @@ function dashboardQuotasHTML(){} $(document).ready(function(){ $dashboard = $('#dashboard_tab', main_tabs_context); -}); \ No newline at end of file +}); diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js index 65972755d6..5d1ddaf7e6 100644 --- a/src/sunstone/public/js/plugins/datastores-tab.js +++ b/src/sunstone/public/js/plugins/datastores-tab.js @@ -22,7 +22,16 @@ var datastores_tab_content = '\
\
\
\ -

'+tr("Datastores")+'

\ +

\ + \ + '+tr("Datastores")+'\ + \ + \ +  \ + \ + \ +

\
\
\
\ @@ -665,7 +674,7 @@ function updateDatastoreInfo(request,ds){ ' + insert_extended_template_table(info.TEMPLATE, "Datastore", - info.ID) + + info.ID) + '
\
' + insert_permissions_table("Datastore", diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index c5eeb42c49..90235899fa 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -42,15 +42,17 @@ var groups_tab_content = '\
\
\
\ -
\ -

'+tr("Groups")+'

\ -
\ -
\ -
\ -
\ -

'+tr("TOTAL")+'

\ -
\ -
\ +
\ +

\ + \ + '+tr("Groups")+'\ + \ + \ + '+tr("TOTAL")+'\ + \ + \ +

\
\
\
\ diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 7ecd437325..4ab9a9ee10 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -22,15 +22,20 @@ var hosts_tab_content = '\ \
\
\ -
\ -

'+tr("Hosts")+'

\ -
\ -
\ -
\ -
\ -

'+tr("TOTAL")+'  '+tr("ON")+'  '+tr("OFF")+'  '+tr("ERROR")+'

\ -
\ -
\ +
\ +

\ + \ + '+tr("Hosts")+'\ + \ + \ + '+tr("TOTAL")+' \ + '+tr("ON")+' \ + '+tr("OFF")+' \ + '+tr("ERROR")+'\ + \ + \ +

\
\
\
\ @@ -320,14 +325,14 @@ var host_actions = { var host_dashboard_graphs = [ { monitor_resources : "HOST_SHARE/CPU_USAGE,HOST_SHARE/USED_CPU,HOST_SHARE/MAX_CPU", - labels : "Allocated CPU,Real CPU,Total CPU", + labels : "Allocated,Real,Total", humanize_figures : false, div_graph : $("#dash_host_cpu_graph", $dashboard), div_legend : $("#dash_host_cpu_legend", $dashboard) }, { monitor_resources : "HOST_SHARE/MEM_USAGE,HOST_SHARE/USED_MEM,HOST_SHARE/MAX_MEM", - labels : "Allocated MEM,Real MEM,Total MEM", + labels : "Allocated,Real,Total", humanize_figures : true, div_graph : $("#dash_host_mem_graph", $dashboard), div_legend : $("#dash_host_mem_legend", $dashboard) @@ -701,7 +706,7 @@ function hostElementArray(host_json){ break; default: break; - } + } return [ '', @@ -871,7 +876,7 @@ function updateHostInfo(request,host){ \ \
\ -
' +
' + insert_extended_template_table(host_info.TEMPLATE, "Host", host_info.ID) + diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index 5e32935ddc..07b32d6d2e 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -20,15 +20,18 @@ var images_tab_content = '\ \
\
\ -
\ -

'+tr("Images")+'

\ -
\ -
\ -
\ -
\ -

'+tr("TOTAL")+'  '+tr("SIZE")+'

\ -
\ -
\ +
\ +

\ + \ + '+tr("Images")+'\ + \ + \ + '+tr("TOTAL")+' \ + '+tr("SIZE")+'\ + \ + \ +

\
\
\
\ @@ -630,7 +633,7 @@ function updateImagesView(request, images_list){ updateVResDashboard("images",images_list); var size = humanize_size_from_mb(size_images) - + $("#total_images", $dashboard).text(images_list.length); $("#size_images", $dashboard).text(size); @@ -722,7 +725,7 @@ function updateImageInfo(request,img){ img_info.GID) + insert_extended_template_table(img_info.TEMPLATE, "Image", - img_info.ID) + + img_info.ID) + '
\
' } diff --git a/src/sunstone/public/js/plugins/marketplace-tab.js b/src/sunstone/public/js/plugins/marketplace-tab.js index 1610e70937..cd7e590f15 100644 --- a/src/sunstone/public/js/plugins/marketplace-tab.js +++ b/src/sunstone/public/js/plugins/marketplace-tab.js @@ -102,7 +102,16 @@ var marketplace_tab_content = '\
\
\
\ -

'+tr("OpenNebula Marketplace")+'

\ +

\ + \ + '+tr("OpenNebula Marketplace")+'\ + \ + \ +  \ + \ + \ +

\
\
\
\ @@ -227,7 +236,7 @@ function updateMarketInfo(request,app){ Sunstone.updateInfoPanelTab("marketplace_info_panel", "marketplace_info_tab", info_tab); Sunstone.popUpInfoPanel("marketplace_info_panel"); }; - + function infoListenerMarket(dataTable){ $('tbody tr',dataTable).live("click",function(e){ @@ -241,7 +250,7 @@ function updateMarketInfo(request,app){ popDialogLoading(); Sunstone.runAction("Marketplace.showinfo",id); - // Take care of the coloring business + // Take care of the coloring business // (and the checking, do not forget the checking) $('tbody input.check_item',$(this).parents('table')).removeAttr('checked'); $('.check_item',this).click(); @@ -313,4 +322,4 @@ $(document).ready(function(){ infoListenerMarket(dataTable_marketplace); Sunstone.runAction('Marketplace.list'); -}); \ No newline at end of file +}); diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 1b0e81fc09..3143065a2f 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -21,7 +21,16 @@ var templates_tab_content = '\
\
\
\ -

'+tr("Templates")+'

\ +

\ + \ + '+tr("Templates")+'\ + \ + \ +  \ + \ + \ +

\
\
\
\ @@ -65,7 +74,7 @@ var templates_tab_content = '\
\ '; - + var create_template_tmpl = '
'+ '

'+tr("Create VM Template")+'

'+ '
'+ @@ -622,7 +631,7 @@ function setupCreateTemplateDialog(){ remove = true; else if (value.length > 0) { - value = jQuery.grep(value, function (n) { + value = jQuery.grep(value, function (n) { var obj_length = 0; for (e in n) obj_length += 1; @@ -724,7 +733,7 @@ function setupCreateTemplateDialog(){ '
'+ '
'+tr("Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.")+'
'+ '
'+ - '
'+ + '
'+ '
'+ ''+ '
'+ @@ -747,7 +756,7 @@ function setupCreateTemplateDialog(){ '
'+ '
'+tr("Amount of RAM required for the VM, in Megabytes.")+'
'+ '
'+ - '
'+ + '
'+ '
'+ '

'+tr("Advanced options")+'

'+ '
'+ @@ -765,7 +774,7 @@ function setupCreateTemplateDialog(){ '
'+ '
'+tr("Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.")+'
'+ '
'+ - '
'+ + '
'+ '
'+ '' @@ -1005,7 +1014,7 @@ function setupCreateTemplateDialog(){ '
'+ ' Volatile Disk '+ '
'+ - '
'+ + '
'+ '
'+ '
'+ '
'+ @@ -1084,7 +1093,7 @@ function setupCreateTemplateDialog(){ '
'+ ''+ '
'+ - '
'+ + '
'+ ' Select Clusters '+ '
'+ - '
'+ - '
'+ + '
'+ + '
'+ '
'+ '
'+ '
'+ @@ -2610,7 +2619,7 @@ function setupCreateTemplateDialog(){ '
'+ '
'+tr("Maximize the resources available to VMs in a node")+'
'+ '
'+ - '
'+ + '
'+ '
'+ '
'+ '
'+ @@ -2662,7 +2671,7 @@ function setupCreateTemplateDialog(){ //addElement([spinner,'','','','','','','','','','','',''],dataTable_template_hosts); OpenNebula.Host.list({ - timeout: true, + timeout: true, success: function (request, host_list){ var host_list_array = []; @@ -2672,7 +2681,7 @@ function setupCreateTemplateDialog(){ }); updateView(host_list_array, dataTable_template_hosts); - }, + }, error: onError }); @@ -2764,7 +2773,7 @@ function setupCreateTemplateDialog(){ //addElement([spinner,'','','','',''],dataTable_template_clusters); OpenNebula.Cluster.list({ - timeout: true, + timeout: true, success: function (request, cluster_list){ var list_array = []; @@ -2774,7 +2783,7 @@ function setupCreateTemplateDialog(){ }); updateView(list_array,dataTable_template_clusters); - }, + }, error: onError }); @@ -2842,7 +2851,7 @@ function setupCreateTemplateDialog(){ generate_requirements(); }); - // Select Image or Volatile disk. The div is hidden depending on the selection, and the + // Select Image or Volatile disk. The div is hidden depending on the selection, and the // vm_param class is included to be computed when the template is generated. $("input[name='req_select']").change(function(){ if ($("input[name='req_select']:checked").val() == "host_select") { @@ -2866,11 +2875,11 @@ function setupCreateTemplateDialog(){ var generate_requirements = function() { var req_string=[]; - $.each(selected_hosts, function(key, value) { + $.each(selected_hosts, function(key, value) { req_string.push('ID=\\"'+key+'\\"'); }); - $.each(selected_clusters, function(key, value) { + $.each(selected_clusters, function(key, value) { req_string.push('CLUSTER_ID=\\"'+key+'\\"'); }); @@ -2881,7 +2890,7 @@ function setupCreateTemplateDialog(){ /************************************************************************** OTHER TAB - + **************************************************************************/ var add_otherTab = function() { @@ -2926,17 +2935,17 @@ function setupCreateTemplateDialog(){ var tabs = $( "#template_create_tabs", dialog)//.tabs().addClass("ui-tabs-vertical"); - //$('#wizard_next').click(function(){ + //$('#wizard_next').click(function(){ // var selected = tabs.tabs('option', 'active'); // tabs.tabs("option", "active", selected+1); //}); // - //$('#wizard_previous').click(function(){ + //$('#wizard_previous').click(function(){ // var selected = tabs.tabs('option', 'active'); // tabs.tabs("option", "active", selected-1); //}); - $('#template_template_reset_button').click(function(){ + $('#template_template_reset_button').click(function(){ $create_template_dialog.trigger("reveal:close") $create_template_dialog.empty(); setupCreateTemplateDialog(); @@ -3159,7 +3168,7 @@ function setupCreateTemplateDialog(){ //Reset form - empty boxes $('button#reset_vm_form',dialog).click(function(){ - $('select#disks_box option',section_disks).remove(); + $('select#disks_box option',section_disks).remove(); $('select#nics_box option',section_networks).remove(); $('select#inputs_box option',section_inputs).remove(); $('select#custom_var_box option',section_custom_var).remove(); @@ -3177,7 +3186,7 @@ function popUpUpdateTemplateDialog(){ function popUpCreateTemplateDialog(){ $('button#create_template_form_easy', $create_template_dialog).show(); $('button#template_template_update_button', $create_template_dialog).hide(); - + $create_template_dialog.reveal(); }; @@ -3247,13 +3256,13 @@ function setupTemplateTemplateUpdateDialog(){ function popUpTemplateTemplateUpdateDialog(){ var selected_nodes = getSelectedNodes(dataTable_templates); - + if ( selected_nodes.length != 1 ) { notifyMessage("Please select one (and just one) template to update."); return false; } - + // Get proper cluster_id var template_id = ""+selected_nodes[0]; @@ -3324,7 +3333,7 @@ function fillTemplatePopUp(request, response){ // // GENERAL // - + var capacity_section = $('li#capacityTab', $create_template_dialog); autoFillInputs(template, capacity_section); @@ -3332,7 +3341,7 @@ function fillTemplatePopUp(request, response){ // // DISKS // - + var number_of_disks = 0; function fillDiskTab(disk) { @@ -3347,7 +3356,7 @@ function fillTemplatePopUp(request, response){ // TODO updateView should not be required. Currently the dataTable // is filled twice. OpenNebula.Image.list({ - timeout: true, + timeout: true, success: function (request, images_list){ var image_list_array = []; @@ -3375,10 +3384,10 @@ function fillTemplatePopUp(request, response){ 'IMAGE: '+ disk.IMAGE_ID + tr(" does not exists any more") + ' ×'+ '
'; - - $(".dataTables_wrapper", disk_section).append(alert); + + $(".dataTables_wrapper", disk_section).append(alert); } - }, + }, error: onError }); @@ -3412,7 +3421,7 @@ function fillTemplatePopUp(request, response){ // // NICS // - + var number_of_nics = 0; function fillNicTab(nic) { @@ -3424,7 +3433,7 @@ function fillTemplatePopUp(request, response){ // TODO updateView should not be required. Currently the dataTable // is filled twice. OpenNebula.Network.list({ - timeout: true, + timeout: true, success: function (request, networks_list){ var network_list_array = []; @@ -3451,11 +3460,11 @@ function fillTemplatePopUp(request, response){ 'NETWORK: '+ nic.NETWORK_ID + tr(" does not exists any more") + ' ×'+ '
'; - - $(".dataTables_wrapper", nic_section).append(alert); + + $(".dataTables_wrapper", nic_section).append(alert); } } - }, + }, error: onError }); @@ -3484,7 +3493,7 @@ function fillTemplatePopUp(request, response){ // // OS // - + var os = template.OS; var os_section = $('li#osTab', $create_template_dialog); @@ -3498,7 +3507,7 @@ function fillTemplatePopUp(request, response){ // TODO updateView should not be required. Currently the dataTable // is filled twice. OpenNebula.Image.list({ - timeout: true, + timeout: true, success: function (request, list){ var list_array = []; @@ -3527,10 +3536,10 @@ function fillTemplatePopUp(request, response){ 'KERNEL: '+ match[1] + tr(" does not exists any more") + ' ×'+ '
'; - - $("#tabs-kernel .dataTables_wrapper", os_section).append(alert); + + $("#tabs-kernel .dataTables_wrapper", os_section).append(alert); } - }, + }, error: onError }); } @@ -3547,7 +3556,7 @@ function fillTemplatePopUp(request, response){ // TODO updateView should not be required. Currently the dataTable // is filled twice. OpenNebula.Image.list({ - timeout: true, + timeout: true, success: function (request, list){ var list_array = []; @@ -3576,10 +3585,10 @@ function fillTemplatePopUp(request, response){ 'RAMDISK: '+ match[1] + tr(" does not exists any more") + ' ×'+ '
'; - - $("#tabs-ramdisk .dataTables_wrapper", os_section).append(alert); + + $("#tabs-ramdisk .dataTables_wrapper", os_section).append(alert); } - }, + }, error: onError }); } @@ -3614,7 +3623,7 @@ function fillTemplatePopUp(request, response){ inputs = [inputs]; } - $.each(inputs, function(){ + $.each(inputs, function(){ var table = $('#input_table', inputs_section)[0]; var rowCount = table.rows.length; var row = table.insertRow(rowCount); @@ -3656,14 +3665,14 @@ function fillTemplatePopUp(request, response){ var net_flag = false; var files = []; - $.each(context, function(key, value){ + $.each(context, function(key, value){ if (ssh_regexp.test(key)) { $("#ssh_context", context_section).click(); if (!publickey_regexp.test(value)) { $("input#ssh_puclic_key").val(value); } - + } else if (net_regexp.test(key)) { if (!net_flag) { @@ -3682,7 +3691,7 @@ function fillTemplatePopUp(request, response){ // TODO updateView should not be required. Currently the dataTable // is filled twice. OpenNebula.Image.list({ - timeout: true, + timeout: true, success: function (request, list){ var list_array = []; @@ -3712,11 +3721,11 @@ function fillTemplatePopUp(request, response){ tr('The following FILES: ') + files.join(', ') + tr(" do not exist any more") + ' ×'+ '
'; - - $(".dataTables_wrapper", context_section).append(alert); + + $(".dataTables_wrapper", context_section).append(alert); } - }, + }, error: onError }); } @@ -3773,7 +3782,7 @@ function fillTemplatePopUp(request, response){ var dataTable_template_hosts = $("#datatable_template_hosts").dataTable(); OpenNebula.Host.list({ - timeout: true, + timeout: true, success: function (request, host_list){ var host_list_array = []; @@ -3803,10 +3812,10 @@ function fillTemplatePopUp(request, response){ tr('The following HOSTs: [') + hosts.join(', ') + '] ' + tr(" do not exist any more") + ' ×'+ '
'; - - $("#datatable_template_hosts_wrapper", req_section).append(alert); + + $("#datatable_template_hosts_wrapper", req_section).append(alert); } - }, + }, error: onError }); } @@ -3817,7 +3826,7 @@ tr('The following HOSTs: [') + hosts.join(', ') + '] ' + tr(" do not exist any m var dataTable_template_clusters = $("#datatable_template_clusters").dataTable(); OpenNebula.Cluster.list({ - timeout: true, + timeout: true, success: function (request, cluster_list){ var cluster_list_array = []; @@ -3847,10 +3856,10 @@ tr('The following HOSTs: [') + hosts.join(', ') + '] ' + tr(" do not exist any m tr('The following CLUSTERs: [') + clusters.join(', ') + '] ' + tr("do not exist any more") + ' ×'+ '
'; - - $("#datatable_template_clusters_wrapper", req_section).append(alert); + + $("#datatable_template_clusters_wrapper", req_section).append(alert); } - }, + }, error: onError }); } diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index 6fc6538151..aaa78f4506 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -45,15 +45,17 @@ var users_tab_content = '\
\
\
\ -
\ -

'+tr("Users")+'

\ -
\ -
\ -
\ -
\ -

'+tr("TOTAL")+'

\ -
\ -
\ +
\ +

\ + \ + '+tr("Users")+'\ + \ + \ + '+tr("TOTAL")+'\ + \ + \ +

\
\
\
\ diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 9ddccdb6e1..ff705be7b0 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -38,15 +38,21 @@ var vms_tab_content = '\ \
\
\ -
\ -

'+tr("Virtual Machines")+'

\ -
\ -
\ -
\ -
\ -

'+tr("TOTAL")+'  '+tr("ACTIVE")+'  '+tr("OFF")+'  '+tr("PENDING")+'  '+tr("FAILED")+'

\ -
\ -
\ +
\ +

\ + \ + '+tr("Virtual Machines")+'\ + \ + \ + '+tr("TOTAL")+' \ + '+tr("ACTIVE")+' \ + '+tr("OFF")+' \ + '+tr("PENDING")+' \ + '+tr("FAILED")+'\ + \ + \ +

\
\
\
\ @@ -925,13 +931,13 @@ function vMachineElementArray(vm_json){ break; default: break; - } - + } + if (state == tr("ACTIVE")) { state = OpenNebula.Helper.resource_state("vm_lcm",vm.LCM_STATE); }; - + return [ '', vm.ID, @@ -995,6 +1001,7 @@ function updateVMachinesView(request, vmachine_list){ $("#active_vms", $dashboard).text(active_vms); $("#pending_vms", $dashboard).text(pending_vms); $("#failed_vms", $dashboard).text(failed_vms); + $("#off_vms", $dashboard).text(off_vms); var form = $("#virtualMachine_list"); diff --git a/src/sunstone/public/js/plugins/vnets-tab.js b/src/sunstone/public/js/plugins/vnets-tab.js index 86825fe855..a3cc2484bb 100644 --- a/src/sunstone/public/js/plugins/vnets-tab.js +++ b/src/sunstone/public/js/plugins/vnets-tab.js @@ -20,15 +20,18 @@ var vnets_tab_content = '\ \
\
\ -
\ -

'+tr("Virtual Networks")+'

\ -
\ -
\ -
\ -
\ -

'+tr("TOTAL")+'  '+tr("ADDRESSES")+'

\ -
\ -
\ +
\ +

\ + \ + '+tr("Virtual Networks")+'\ + \ + \ + '+tr("TOTAL")+' \ + '+tr("ADDRESSES")+'\ + \ + \ +

\
\
\
\ diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index 669484b1ad..ce6716a61a 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -825,9 +825,11 @@ function plot_totals(response, info) { humanize_size : function(val){ return val }; var options = { -// colors: [ "#cdebf5", "#2ba6cb", "#6f6f6f" ] + //colors: [ "#2ba6cb", "#cdebf5", "#6f6f6f" ], + colors: [ "#8DDAE4", "#707D85", "#AC5A62" ], legend : { show : (info.div_legend != undefined), - noColumns: attributes.length+1, + noColumns: attributes.length, + backgroundColor: "black", container: info.div_legend }, xaxis : { diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js index 907338afd5..1b8fcaeaef 100644 --- a/src/sunstone/public/js/sunstone.js +++ b/src/sunstone/public/js/sunstone.js @@ -302,8 +302,7 @@ $(document).ready(function(){ plots_context = $('div#plots'); info_panels_context = $('div#info_panels'); - readCookie(); - setLogin(); + //Insert the tabs in the DOM and their buttons. insertTabs(); @@ -319,6 +318,9 @@ $(document).ready(function(){ //This dialog is shared to update templates setupTemplateUpdateDialog(); + readCookie(); + setLogin(); + //Listen for .action_buttons //An action buttons runs a predefined action. If it has type //"multiple" it runs that action on the elements of a datatable. @@ -422,10 +424,19 @@ function setLogin(){ break; }; + var user_login_content = ''; - $("div#menu span#user").html(username); - $("div#menu a#logout").click(function(){ + + $("span.user-login").html(user_login_content); + + $("span.user-login a.logout").click(function(){ redirect = function(){window.location.href = "login";}; switch(whichUI()){ case "sunstone": @@ -559,8 +570,8 @@ function insertButtonsInTab(tab_name){ "
"+ "
"+ "
"+ - '
'+ - '
    '+ + '
    '+ + '
      '+ '
    • '+ "
      "+ "
        "+ @@ -576,7 +587,7 @@ function insertButtonsInTab(tab_name){ "
      "+ '
    • '+ '
    '+ - '
      '+ + '
        '+ '
      • '+ "
        "+ " - +