mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Small oZones fixes
This patch improves the login screen and adjust some visual elements in oZones: - Login form submission is handled in a nicer way - Login failure message fade in on top of the login box - Login screen compacts in screens with small resolutions - Some column widths in the tables are adjusted
This commit is contained in:
parent
73a6c317fb
commit
6d66dac27b
@ -135,7 +135,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;
|
||||
|
@ -25,11 +25,11 @@ function auth_error(req, error){
|
||||
switch (status){
|
||||
case 401:
|
||||
$("#one_error").hide();
|
||||
$("#auth_error").show();
|
||||
$("#auth_error").fadeIn("slow");
|
||||
break;
|
||||
case 500:
|
||||
$("#auth_error").hide();
|
||||
$("#one_error").show();
|
||||
$("#one_error").fadeIn("slow");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -47,25 +47,18 @@ function authenticate(){
|
||||
});
|
||||
}
|
||||
|
||||
function logout(){
|
||||
oZones.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");
|
||||
};
|
||||
|
||||
$("#logout_btn").click(function () {
|
||||
logout();
|
||||
});
|
||||
|
||||
$("input#username.box").get(0).focus();
|
||||
$("input#username.box").focus();
|
||||
});
|
||||
|
@ -555,7 +555,8 @@ $(document).ready(function(){
|
||||
"bAutoWidth":false,
|
||||
"aoColumnDefs": [
|
||||
{ "sWidth": "35px", "aTargets": [0,2] },
|
||||
{ "sWidth": "100px", "aTargets": [1,3,4,5,10] }
|
||||
{ "sWidth": "60px", "aTargets": [7,8] },
|
||||
{ "sWidth": "100px", "aTargets": [1,3,4,6,10] }
|
||||
]
|
||||
});
|
||||
|
||||
@ -579,7 +580,7 @@ $(document).ready(function(){
|
||||
"aoColumnDefs": [
|
||||
{ "sWidth": "60px", "aTargets": [10] },
|
||||
{ "sWidth": "35px", "aTargets": [0,2,8,9,11] },
|
||||
{ "sWidth": "100px", "aTargets": [1,3,4,5,7] }
|
||||
{ "sWidth": "100px", "aTargets": [1,3,4,6,7] }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -139,9 +139,6 @@ var dashboard_tab_content =
|
||||
<div class="panel">\
|
||||
<h3>\
|
||||
<a href="#images_tab">Images</a>\
|
||||
<div class="new-resource">\
|
||||
<a class="action_button" href="#images_tab" value="Image.create_dialog">+</a>\
|
||||
</div>\
|
||||
</h3>\
|
||||
<div class="panel_info">\
|
||||
<table class="info_table">\
|
||||
|
@ -463,7 +463,8 @@ function updateZoneInfo(req,zone_json){
|
||||
"bAutoWidth":false,
|
||||
"aoColumnDefs": [
|
||||
{ "sWidth": "35px", "aTargets": [0] },
|
||||
{ "sWidth": "100px", "aTargets": [1,2,3,4] }
|
||||
{ "sWidth": "60px", "aTargets": [5,6] },
|
||||
{ "sWidth": "100px", "aTargets": [1,2,4,8] }
|
||||
]
|
||||
});
|
||||
|
||||
@ -488,7 +489,7 @@ function updateZoneInfo(req,zone_json){
|
||||
"aoColumnDefs": [
|
||||
{ "sWidth": "60px", "aTargets": [8] },
|
||||
{ "sWidth": "35px", "aTargets": [0,6,7,9] },
|
||||
{ "sWidth": "100px", "aTargets": [1,2,3,5] }
|
||||
{ "sWidth": "100px", "aTargets": [1,2,4,5] }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>oZones Admin Console</title>
|
||||
<title>OpenNebula oZones</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
<!-- Vendor Libraries -->
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>oZones Admin Console Login</title>
|
||||
<title>OpenNebula oZones Login</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/login.css" />
|
||||
|
||||
<!-- Vendor Libraries -->
|
||||
@ -23,6 +23,14 @@
|
||||
<div id="wrapper">
|
||||
<div id="logo_sunstone">
|
||||
</div>
|
||||
|
||||
<div id="auth_error" class="error_message">
|
||||
Invalid username or password
|
||||
</div>
|
||||
<div id="one_error" class="error_message">
|
||||
OpenNebula is not running
|
||||
</div>
|
||||
|
||||
<form id="login_form">
|
||||
<div class="border" id="login">
|
||||
<div class="content">
|
||||
@ -33,18 +41,10 @@
|
||||
<br />
|
||||
<input type="checkbox" id="check_remember">
|
||||
<label id="label_remember" for="check_remember">Remember me</label>
|
||||
<input type="button" id="login_btn" value="" />
|
||||
<input type="submit" id="login_btn" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="auth_error" class="error_message">
|
||||
Invalid username or password
|
||||
</div>
|
||||
<div id="one_error" class="error_message">
|
||||
OpenNebula is not running
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user