diff --git a/src/sunstone/public/css/login.css b/src/sunstone/public/css/login.css index b4236d267f..4843efacf9 100644 --- a/src/sunstone/public/css/login.css +++ b/src/sunstone/public/css/login.css @@ -52,8 +52,7 @@ div#logo_sunstone { top: 80px; margin-left: auto; margin-right: auto; - background: url(../images/opennebula-sunstone-big.png) no-repeat center ; - + background: url(../images/opennebula-sunstone-big.png) no-repeat center; vertical-align: center; } @@ -135,7 +134,7 @@ div#login input#login_btn:hover { .error_message { display: none; position: relative; - top: 150px; + top: 80px; font-family: Arial, Helvetica, sans-serif; color:red; font-size:1.6em; diff --git a/src/sunstone/public/js/login.js b/src/sunstone/public/js/login.js index 99cfb9d856..608ea609e5 100644 --- a/src/sunstone/public/js/login.js +++ b/src/sunstone/public/js/login.js @@ -23,15 +23,15 @@ function auth_error(req, error){ var status = error.error.http_status; switch (status){ - case 401: - $("#one_error").hide(); - $("#auth_error").show(); - break; - case 500: - $("#auth_error").hide(); - $("#one_error").show(); - break; - } + case 401: + $("#one_error").hide(); + $("#auth_error").fadeIn("slow"); + break; + case 500: + $("#auth_error").hide(); + $("#one_error").fadeIn("slow"); + break; + }; } function authenticate(){ @@ -47,21 +47,18 @@ function authenticate(){ }); } -function logout(){ - OpenNebula.Auth.logout(); -} - - $(document).ready(function(){ - $("#login_btn").click(function () { + $("#login_form").submit(function (){ authenticate(); + return false; }); - $("input").keydown(function (e){ - if (e.keyCode == 13) { - authenticate(); - } - }); + //compact login elements according to screen height + if (screen.height <= 600){ + $('div#logo_sunstone').css("top","15px"); + $('div#login').css("top","10px"); + $('.error_message').css("top","10px"); + }; - $("input#username.box").get(0).focus(); + $("input#username.box").focus(); }); diff --git a/src/sunstone/public/js/plugins/dashboard-tab.js b/src/sunstone/public/js/plugins/dashboard-tab.js index 56b2b475e8..92a38ba49c 100644 --- a/src/sunstone/public/js/plugins/dashboard-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-tab.js @@ -46,7 +46,7 @@ var dashboard_tab_content = '\ \
\ -\ +
\ \
\
\ diff --git a/src/sunstone/public/js/plugins/dashboard-users-tab.js b/src/sunstone/public/js/plugins/dashboard-users-tab.js index b05de8be29..1c5aa7f386 100644 --- a/src/sunstone/public/js/plugins/dashboard-users-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-users-tab.js @@ -46,7 +46,7 @@ var dashboard_tab_content = '\ \
\ -\ +
\ \ \ \ \ - \ + \ \ \ \ @@ -750,9 +750,10 @@ $(document).ready(function(){ "sPaginationType": "full_numbers", "aoColumnDefs": [ { "bSortable": false, "aTargets": ["check"] }, - { "sWidth": "60px", "aTargets": [0,3] }, - { "sWidth": "35px", "aTargets": [1] }, - { "sWidth": "100px", "aTargets": [2,3,4] } + { "sWidth": "60px", "aTargets": [0,2,3,5,7,8,9] }, + { "sWidth": "35px", "aTargets": [1,10] }, + { "sWidth": "100px", "aTargets": [9] }, + { "sWidth": "150px", "aTargets": [6] } ] }); diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index abdaa9e914..cd7db8af35 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -1259,15 +1259,35 @@ function setupCreateTemplateDialog(){ //Toggles the icon when a section is folded/unfolded var iconToggle = function(){ - $('.icon_right',dialog).toggle( - function(e){ - $('span',e.currentTarget).removeClass("ui-icon-plusthick"); - $('span',e.currentTarget).addClass("ui-icon-minusthick"); - },function(e){ - $('span',e.currentTarget).removeClass("ui-icon-minusthick"); - $('span',e.currentTarget).addClass("ui-icon-plusthick"); + $('.icon_left',$create_template_dialog).click(function(e){ + if ($('span',e.currentTarget).hasClass("ui-icon-plus")){ + $('span',e.currentTarget).removeClass("ui-icon-plus"); + $('span',e.currentTarget).addClass("ui-icon-minus"); + } else { + $('span',e.currentTarget).removeClass("ui-icon-minus"); + $('span',e.currentTarget).addClass("ui-icon-plus"); + }; + }); + }; + + //Fold/unfold all sections button + var foldUnfoldToggle = function() { + $('#fold_unfold_vm_params',$create_template_dialog).toggle( + function(){ + $('.vm_section fieldset',$create_template_dialog).show(); + $('.icon_left span',$create_template_dialog).removeClass("ui-icon-plus"); + $('.icon_left span',$create_template_dialog).addClass("ui-icon-minus"); + return false; + }, + function(){ + $('.vm_section fieldset',$create_template_dialog).hide(); + //Show capacity opts + $('.vm_section fieldset',$create_template_dialog).first().show(); + $('.icon_left span',$create_template_dialog).removeClass("ui-icon-minus"); + $('.icon_left span',$create_template_dialog).addClass("ui-icon-plus"); + return false; }); - } + }; // Set ups the capacity section var capacity_setup = function(){ @@ -1795,18 +1815,7 @@ filled in"); vmTabChange(0,{index : 0}); //enable kvm - //Fold/unfold all sections button - $('#fold_unfold_vm_params',dialog).toggle( - function(){ - $('.vm_section fieldset',$create_template_dialog).show(); - return false; - }, - function(){ - $('.vm_section fieldset',$create_template_dialog).hide(); - //Show capacity opts - $('.vm_section fieldset',$create_template_dialog).first().show(); - return false; - }); + foldUnfoldToggle(); //initialise all sections capacity_setup(); @@ -1969,9 +1978,10 @@ $(document).ready(function(){ "sPaginationType": "full_numbers", "aoColumnDefs": [ { "bSortable": false, "aTargets": ["check"] }, - { "sWidth": "60px", "aTargets": [0] }, + { "sWidth": "60px", "aTargets": [0,6] }, { "sWidth": "35px", "aTargets": [1] }, - { "sWidth": "100px", "aTargets": [2,3,4] } + { "sWidth": "150px", "aTargets": [5] }, + { "sWidth": "100px", "aTargets": [2,3] } ] }); diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index f05696bf17..062c1e7e6f 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -1075,9 +1075,10 @@ $(document).ready(function(){ "bAutoWidth":false, "aoColumnDefs": [ { "bSortable": false, "aTargets": ["check"] }, - { "sWidth": "60px", "aTargets": [0] }, - { "sWidth": "35px", "aTargets": [1,9] }, - { "sWidth": "100px", "aTargets": [2,3,4] } + { "sWidth": "60px", "aTargets": [0,6,7] }, + { "sWidth": "35px", "aTargets": [1,10] }, + { "sWidth": "150px", "aTargets": [5,9] }, + { "sWidth": "100px", "aTargets": [2,3] } ] }); diff --git a/src/sunstone/public/js/plugins/vnets-tab.js b/src/sunstone/public/js/plugins/vnets-tab.js index f72d58da42..e57afb2abd 100644 --- a/src/sunstone/public/js/plugins/vnets-tab.js +++ b/src/sunstone/public/js/plugins/vnets-tab.js @@ -30,7 +30,7 @@ var vnets_tab_content = \ \ \ - \ + \ \ \ \ diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index a5084ac401..25d1b6af3e 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -511,9 +511,9 @@ function escapeDoubleQuotes(string){ //of plotting comes, we can put the data in the right place. function generateMonitoringDivs(graphs, id_prefix){ var str = ""; - //42% of the width of the screen minus + //43% of the width of the screen minus //129px (left menu size) - var width = ($(window).width()-129)*42/100; + var width = ($(window).width()-129)*40/100; var id_suffix=""; var label=""; var id=""; @@ -614,7 +614,7 @@ function setupTemplateUpdateDialog(){ //Put HTML in place dialog.html( '\ -

Update the template here:

\ +

Please, choose and modify the template you want to update:

\
\ \ \ diff --git a/src/sunstone/templates/login.html b/src/sunstone/templates/login.html index a5bfc6de47..8e1294ca3f 100644 --- a/src/sunstone/templates/login.html +++ b/src/sunstone/templates/login.html @@ -1,7 +1,7 @@ - OpenNebula Admin Console Login + OpenNebula Sunstone Login @@ -24,6 +24,14 @@
+ +
+ Invalid username or password +
+
+ OpenNebula is not running +
+
@@ -32,20 +40,13 @@ Password
- + - + +
- -
- Invalid username or password -
-
- OpenNebula is not running -
- diff --git a/src/sunstone/views/index.erb b/src/sunstone/views/index.erb index 00d6331d3d..4e70b668e0 100644 --- a/src/sunstone/views/index.erb +++ b/src/sunstone/views/index.erb @@ -1,7 +1,7 @@ - OpenNebula Admin Console + OpenNebula Sunstone: Cloud Operations Center
\
\ diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index cbe5aa87c2..497e585f61 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -594,6 +594,7 @@ $(document).ready(function(){ { "bSortable": false, "aTargets": ["check"] }, { "sWidth": "60px", "aTargets": [0,3] }, { "sWidth": "35px", "aTargets": [1] }, + { "sWidth": "100px", "aTargets": [6] }, { "sWidth": "200px", "aTargets": [4,5] } ] }); diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index 158e8a97e7..d47357002e 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -32,7 +32,7 @@ var images_tab_content =
Registration timePublicPersistentStateStatus#VMS
NameTypeBridgePublic?PublicTotal Leases