Feature #4363: Fix dashboard styles

This commit is contained in:
Daniel Molina committed 2016-03-18 19:13:41 +01:00
1 parent c38e10e5cc
commit ea645a2d7a
16 files changed
+208 -251

No files matched your search

+2 -2
View File
@@ -18,7 +18,7 @@ define(function(require) {
require('jquery');
require('foundation');
Foundation.Dropdown.defaults.positionClass = 'bottom';
Foundation.Dropdown.defaults.positionClass = 'left';
Foundation.Dropdown.defaults.closeOnClick = true;
Foundation.DropdownMenu.defaults.closeOnClick = true;
Foundation.DropdownMenu.defaults.disableHover = true;
@@ -161,7 +161,7 @@ define(function(require) {
});
$(".user-zone-info a.configuration").click(function() {
$(document).foundation('dropdown', 'closeall');
//$(document).foundation('dropdown', 'closeall');
Sunstone.showTab(SETTINGS_TAB_ID);
});
}
+7 -7
View File
@@ -514,28 +514,28 @@ define(function(require) {
var _showRighList = function(tabName) {
var tab = $('#' + tabName);
$(".tab").hide();
tab.show();
tab.fadeIn();
$(".right-info", tab).hide();
$(".right-form", tab).hide();
$(".right-list", tab).show();
$(".right-list", tab).fadeIn();
$(".only-right-info", tab).hide();
$(".only-right-form", tab).hide();
$(".only-right-list", tab).show();
$(".only-right-list", tab).fadeIn();
$('.action_blocks', tab).removeClass('large-12').addClass('large-9');
};
var _showRighInfo = function(tabName) {
var tab = $('#' + tabName);
$(".tab").hide();
tab.show();
tab.fadeIn();
$(".right-list", tab).hide();
$(".right-form", tab).hide();
$(".right-info", tab).show();
$(".right-info", tab).fadeIn();
$(".only-right-list", tab).hide();
$(".only-right-form", tab).hide();
$(".only-right-info", tab).show();
$(".only-right-info", tab).fadeIn();
$('.action_blocks', tab).removeClass('large-9').addClass('large-12');
}
@@ -938,7 +938,7 @@ define(function(require) {
$(".right-form-title", context).text(formPanelInstance.title());
$(".submit_button", context).text(formPanelInstance.buttonText());
$("div[form-panel-id="+formPanelInstance.formPanelId+"]", context).show();
$("div[form-panel-id="+formPanelInstance.formPanelId+"]", context).fadeIn();
}
}
+2 -4
View File
@@ -14,7 +14,6 @@
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div>
<span>
{{#unless customContext}}
<span id="{{customId}}back_button" class=" only-right-info only-right-form">
@@ -35,7 +34,7 @@
<span id="{{customId}}create_buttons" class=" only-right-list"></span>
<span id="{{customId}}refresh_buttons" class=" only-right-info only-right-list"></span>
</span>
<span style="margin-left: 2rem">
<span>
<span id="{{customId}}main_buttons" class="only-right-info only-right-list"></span>
<span id="{{customId}}vmsplay_buttons" class='only-right-info only-right-list'></span>
@@ -61,7 +60,7 @@
<ul id='{{customId}}vmsplanification_buttons' class='only-right-info only-right-list dropdown-pane menu vertical' data-dropdown></ul>
</span>
<span style="margin-left: 2rem">
<span>
<button type='button' data-toggle='{{customId}}more_buttons' class='only-right-info only-right-list top_button button secondary dropdown'>
<i class='fa fa-ellipsis-v'/>
</button>
@@ -88,5 +87,4 @@
</li>
</ul>
</span>
</div>
@@ -14,7 +14,7 @@
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<ul class="dropdown menu" data-dropdown-menu>
<ul class="dropdown menu" data-dropdown-menu data-alignment="right">
<li>
<a class="thin-font" href="#">
<i class="fa fa-user fa-fw header-icon"></i>
@@ -238,7 +238,6 @@ define(function(require) {
resource: 'Dashboard',
title: Locale.tr("Dashboard"),
listHeader: Locale.tr("Dashboard"),
buttons: _buttons,
actions: _actions,
content: _html()
};
@@ -14,61 +14,38 @@
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div class="row totals-info">
<div class="small-12 medium-6 large-3 columns centered">
<div class="small-12 large-12 columns text-center">
<h2 class="">
<small>{{tr "HOSTs"}}</small>
<br>
<span class="total_hosts "/>
<small><i class="fa fa-fw fa-lg fa-hdd-o"></i></small>
</h2>
</div>
<div class="small-4 large-4 columns text-center">
<h5 class="">
<span class="on_hosts success-color"/>
<br>
<small class="success-color">{{tr "ON"}}</small>
</h5>
</div>
<div class="small-4 large-4 columns text-center">
<h5 class="">
<span class="off_hosts "/>
<br>
<small>{{tr "OFF"}}</small>
</h5>
</div>
<div class="small-4 large-4 columns text-center">
<h5 class="">
<span class="error_hosts alert-color"/>
<br>
<small class="alert-color">{{tr "ERROR"}}</small>
</h5>
</div>
<div class="small-12 large-12 columns text-center">
<br>
<a class="button secondary radius tiny show_hosts_tab"> <i class="fa fa-lg fa-list fa-fw"></i>
</a>
<a class="button secondary radius tiny show_create_host">
<i class="fa fa-lg fa-plus fa-fw"></i><i class="fa fa-fw fa-lg fa-hdd-o"></i>
</a>
</div>
</div>
<div class="small-12 medium-6 large-9 columns">
<div class="row">
<div class="small-12 large-6 columns">
<div id="dashboard_host_allocated_cpu" style="padding: 0px 40px"></div>
<br>
<div id="dashboard_host_real_cpu" style="padding: 0px 40px"></div>
<div class="totals-info">
<fieldset class="large-font">
<legend>
<ul class="menu simple">
<li>
{{tr "Hosts"}} <span class=" total_hosts"></span>
</li>
<li></li>
<li><span>{{tr "ON"}}</span> <span class=" on_hosts success-color"></span></li>
<li><span>{{tr "OFF"}}</span> <span class=" off_hosts"></span></li>
<li><span>{{tr "ERROR"}}</span> <span class=" error_hosts alert-color"></span></li>
<li></li>
<li>
<button class="button radius small show_hosts_tab"> <i class="fa fa-lg fa-list fa-fw"></i></button>
<button class="button success radius small show_create_host"> <i class="fa fa-lg fa-plus fa-fw"></i></button>
</li>
</ul>
</legend>
<div class="row" id="dashboard_vm_accounting">
<input style="display:none;" value="vm" id="acct_group_by"/>
<div class="small-12 large-3 columns">
<div id="dashboard_host_allocated_cpu"></div>
</div>
<div class="small-12 large-6 columns">
<div id="dashboard_host_allocated_mem" style="padding: 0px 40px"></div>
<br>
<div id="dashboard_host_real_mem" style="padding: 0px 40px"></div>
<div class="small-12 large-3 columns">
<div id="dashboard_host_allocated_mem"></div>
</div>
<div class="small-12 large-3 columns">
<div id="dashboard_host_real_cpu"></div>
</div>
<div class="small-12 large-3 columns">
<div id="dashboard_host_real_mem"></div>
</div>
</div>
</div>
</div>
<div class="row dashboard-widget-footer">
<div class="small-3 large-3 columns text-center"></div>
</fieldset>
</div>
@@ -13,29 +13,21 @@
{{! See the License for the specific language governing permissions and }}
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div class="row totals-info dashboard-widget-footer">
<div class="small-12 large-12 columns text-center">
<h2 class="">
<small>{{tr "VNETs"}}</small>
<br>
<span class="total_vnets "></span>
<small><i class="fa fa-fw fa-sitemap"></i> </small>
</h2>
</div>
<div class="small-12 large-12 columns text-center">
<h5 class="">
<span class="addresses_vnets "></span>
<br>
<small>{{tr "USED IPs"}}</small>
</h5>
</div>
<div class="small-12 large-12 columns text-center">
<br>
<a class="button secondary radius tiny show_vnets_tab"> <i class="fa fa-lg fa-list fa-fw"></i>
</a>
<a class="button secondary radius tiny show_create_vnet">
<i class="fa fa-lg fa-plus fa-fw"></i><i class="fa fa-fw fa-lg fa-sitemap"></i>
</a>
</div>
</div>
<div class="totals-info">
<fieldset class="large-font">
<legend>
<ul class="menu simple">
<li>
{{tr "Virtual Networks"}} <span class=" total_vnets"></span>
</li>
<li></li>
<li><span>{{tr "USED IPs"}}</span> <span class="addresses_vnets"></span></li>
<li></li>
<li>
<button class="button radius small show_vnets_tab"> <i class="fa fa-lg fa-list fa-fw"></i></button>
<button class="button success radius small show_create_vnet"> <i class="fa fa-lg fa-plus fa-fw"></i></button>
</li>
</ul>
</legend>
</fieldset>
</div>
@@ -13,29 +13,21 @@
{{! See the License for the specific language governing permissions and }}
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div class="row totals-info dashboard-widget-footer">
<div class="small-12 large-12 columns text-center">
<h2 class="">
<small>{{tr "IMAGES"}}</small>
<br>
<span class="total_images "></span>
<small><i class="fa fa-fw fa-upload"></i> </small>
</h2>
</div>
<div class="small-12 large-12 columns text-center">
<h5 class="">
<span class="size_images "></span>
<br>
<small>{{tr "USED"}}</small>
</h5>
</div>
<div class="small-12 large-12 columns text-center">
<br>
<a class="button secondary radius tiny show_images_tab"> <i class="fa fa-lg fa-list fa-fw"></i>
</a>
<a class="button secondary radius tiny show_create_image">
<i class="fa fa-lg fa-plus fa-fw"></i><i class="fa fa-fw fa-lg fa-upload"></i>
</a>
</div>
<div class="totals-info">
<fieldset class="large-font">
<legend>
<ul class="menu simple">
<li>
{{tr "Images"}} <span class=" total_images"></span>
</li>
<li></li>
<li><span>{{tr "USED"}}</span> <span class="size_images"></span></li>
<li></li>
<li>
<button class="button radius small show_images_tab"> <i class="fa fa-lg fa-list fa-fw"></i></button>
<button class="button success radius small show_create_image"> <i class="fa fa-lg fa-plus fa-fw"></i></button>
</li>
</ul>
</legend>
</fieldset>
</div>
@@ -14,45 +14,41 @@
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div class="row totals-info">
<div class="large-3 medium-6 small-12 columns">
<br>
<div class="small-12 large-12 columns text-center">
<h2 class="">
<small>{{tr "USERS"}}</small>
<br>
<span class=" total_users">-</span>
<small><i class="fa fa-fw fa-user"></i> </small>
</h2>
<div class="totals-info">
<fieldset class="large-font">
<legend>
<ul class="menu simple">
<li>
{{tr "Users"}} <span class=" total_users"></span>
</li>
<li></li>
<li>
<button class="button radius small show_users_tab"> <i class="fa fa-lg fa-list fa-fw"></i></button>
<button class="button success radius small show_create_user"> <i class="fa fa-lg fa-plus fa-fw"></i></button>
</li>
</ul>
</legend>
<div class="row" id="dashboard_vdc_user_accounting">
<input style="display:none;" value="user" id="acct_group_by"/>
<div class="small-12 large-4 columns">
<h5>
<small>{{tr "CPU hours"}}</small>
</h5>
<div class="large-12 columns centered graph text-center" id="acct_cpu_graph">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-4 columns">
<h5>
<small>{{tr "Memory GB hours"}}</small>
</h5>
<div class="large-12 columns centered graph text-center" id="acct_mem_graph">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-4 columns">
<h5>
<small>{{tr "Disk MB hours"}}</small>
</h5>
<div class="large-12 columns centered graph text-center" id="acct_disk_graph">{{> ./empty-graph}}</div>
</div>
</div>
<div class="small-12 large-12 columns text-center" style="margin-top: 20px">
<a class="button secondary radius tiny show_users_tab"> <i class="fa fa-lg fa-list fa-fw"></i></a>
<a class="button secondary radius tiny show_create_user">
<i class="fa fa-lg fa-plus fa-fw"></i><i class="fa fa-fw fa-lg fa-user"></i></a>
</div>
</div>
<div class="large-9 medium-6 small-12 columns text-center" id="dashboard_vdc_user_accounting">
<input style="display:none;" value="user" id="acct_group_by"/>
<div class="small-12 large-6 columns">
<h4 class="" style="margin-bottom: 0px">
<small>{{tr "CPU hours"}}</small>
</h4>
<div class="large-12 columns centered graph text-center" id="acct_cpu_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-6 columns">
<h4 class="" style="margin-bottom: 0px">
<small>{{tr "Memory GB hours"}}</small>
</h4>
<div class="large-12 columns centered graph text-center" id="acct_mem_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-6 left columns">
<h4 class="" style="margin-bottom: 0px">
<small>{{tr "Disk MB hours"}}</small>
</h4>
<div class="large-12 columns centered graph text-center" id="acct_disk_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
</div>
</div>
<div class="row dashboard-widget-footer">
<div class="small-3 large-3 columns text-center"></div>
</fieldset>
</div>
@@ -14,68 +14,44 @@
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div class="row totals-info">
<div class="small-12 medium-6 large-3 columns">
<br>
<div class="small-12 large-12 columns text-center">
<h2 class="">
<small>{{tr "VMs"}}</small>
<br>
<span class=" total_vms"></span>
<small><i class="fa fa-fw fa-th"></i></small>
</h2>
<div class="totals-info">
<fieldset class="large-font">
<legend>
<ul class="menu simple">
<li>
{{tr "VMs"}} <span class=" total_vms"></span>
</li>
<li></li>
<li><span>{{tr "ACTIVE"}}</span> <span class=" active_vms success-color"></span></li>
<li><span>{{tr "PENDING"}}</span> <span class=" pending_vms"></span></li>
<li><span>{{tr "FAILED"}}</span> <span class=" failed_vms alert-color"></span></li>
<li></li>
<li>
<button class="button radius small show_vms_tab"> <i class="fa fa-lg fa-list fa-fw"></i></button>
<button class="button success radius small show_create_vm"> <i class="fa fa-lg fa-plus fa-fw"></i></button>
</li>
</ul>
</legend>
<div class="row" id="dashboard_vm_accounting">
<input style="display:none;" value="vm" id="acct_group_by"/>
<div class="small-12 large-4 columns">
<h5>
<small>{{tr "CPU hours"}}</small>
</h5>
<div class="large-12 columns centered graph text-center" id="acct_cpu_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-4 columns">
<h5>
<small>{{tr "Memory GB hours"}}</small>
</h5>
<div class="large-12 columns centered graph text-center" id="acct_mem_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-4 columns">
<h5>
<small>{{tr "Disk MB hours"}}</small>
</h5>
<div class="large-12 columns centered graph text-center" id="acct_disk_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
</div>
<div class="small-4 large-4 columns text-center">
<h5 class="">
<span class=" active_vms success-color"></span>
<br>
<small class="success-color">{{tr "ACTIVE"}}</small>
</h5>
</div>
<div class="small-4 large-4 columns text-center">
<h5 class="">
<span class=" pending_vms"></span>
<br>
<small>{{tr "PENDING"}}</small>
</h5>
</div>
<div class="small-4 large-4 columns text-center">
<h5 class="">
<span class=" failed_vms alert-color"></span>
<br>
<small class="alert-color">{{tr "FAILED"}}</small>
</h5>
</div>
<div class="small-12 large-12 columns text-center" style="margin-top: 20px">
<a class="button secondary radius tiny show_vms_tab"> <i class="fa fa-lg fa-list fa-fw"></i>
</a>
<a class="button secondary radius tiny show_create_vm">
<i class="fa fa-lg fa-plus fa-fw"></i><i class="fa fa-fw fa-lg fa-th"></i></a>
<br>
</div>
</div>
<div class="large-9 medium-6 small-12 columns text-center" id="dashboard_vm_accounting">
<input style="display:none;" value="vm" id="acct_group_by"/>
<div class="small-12 large-6 columns">
<h4 class="" style="margin-bottom: 0px">
<small>{{tr "CPU hours"}}</small>
</h4>
<div class="large-12 columns centered graph text-center" id="acct_cpu_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-6 columns">
<h4 class="" style="margin-bottom: 0px">
<small>{{tr "Memory GB hours"}}</small>
</h4>
<div class="large-12 columns centered graph text-center" id="acct_mem_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
<div class="small-12 large-6 left columns">
<h4 class="" style="margin-bottom: 0px">
<small>{{tr "Disk MB hours"}}</small>
</h4>
<div class="large-12 columns centered graph text-center" id="acct_disk_graph" style="height: 100px;">{{> ./empty-graph}}</div>
</div>
</div>
</div>
<div class="row dashboard-widget-footer">
<div class="small-3 large-3 columns text-center"></div>
</div>
</fieldset>
</div>
@@ -200,8 +200,8 @@ define(function(require) {
$("#dashboard_host_allocated_cpu").html(quotaDashboard(
"dashboard_host_allocated_cpu",
Locale.tr("Allocated CPU"),
"30px",
"14px",
"1.2rem",
"1rem",
{"percentage": ratio_allocated_cpu, "str": info_str})
);
@@ -216,8 +216,8 @@ define(function(require) {
$("#dashboard_host_real_cpu").html(quotaDashboard(
"dashboard_host_real_cpu",
Locale.tr("Real CPU"),
"30px",
"14px",
"1.2rem",
"1rem",
{"percentage": ratio_real_cpu, "str": info_str})
);
@@ -232,8 +232,8 @@ define(function(require) {
$("#dashboard_host_allocated_mem").html(quotaDashboard(
"dashboard_host_allocated_mem",
Locale.tr("Allocated Memory"),
"30px",
"14px",
"1.2rem",
"1rem",
{"percentage": ratio_allocated_mem, "str": info_str})
);
@@ -248,8 +248,8 @@ define(function(require) {
$("#dashboard_host_real_mem").html(quotaDashboard(
"dashboard_host_real_mem",
Locale.tr("Real Memory"),
"30px",
"14px",
"1.2rem",
"1rem",
{"percentage": ratio_real_mem, "str": info_str})
);
@@ -259,23 +259,20 @@ define(function(require) {
var percentage = quota.percentage > 100 ? 100 : quota.percentage;
return '<div class="row">' +
'<div class="large-12 columns text-center" style="margin-bottom: 5px">' +
'<h4 class="subheader">'+
'<div class="large-12 columns">' +
'<h5 class="subheader">'+
'<small>'+ legend +'</small>'+
'</h4>'+
'</h5>'+
'</div>' +
'</div>' +
'<div class="row">' +
'<div class="large-12 columns text-center">' +
'<div class="progress large radius">' +
' <span id="' + html_tag + '_meter" class="meter" style="width: ' + percentage + '%"></span>' +
'</div>' +
'<div class="large-12 columns">' +
' <meter id="' + html_tag + '_meter" min="0" low="33" high="66" optimum="0" max="100" value="' + percentage + '"></meter>' +
'</div>' +
'</div>' +
'<div class="row">' +
'<div class="large-12 columns text-center">' +
'<span id="' + html_tag + '_percentage" class="left" style="font-size:' + font_small_size + ';">' + quota.percentage + ' %</span>' +
'<span id="' + html_tag + '_str" class="right" style="color: #999; font-size: ' + font_small_size + ';">' + quota.str + '</span>' +
'<div class="large-12 columns">' +
'<span id="' + html_tag + '_str" class="right">' + quota.str + '</span>' +
'</div>' +
'</div>';
}
+19 -5
View File
@@ -2,23 +2,37 @@ fieldset {
padding: 1rem 2rem;
legend {
font-weight: normal;
font-size: 1.2rem;
border-bottom: rem-calc(1px) solid $primary-color;
//position: relative;
padding: 0.5rem 1rem 0.5rem 0rem;
padding: 0rem 1rem 0.5rem 0rem;
margin-left: -2rem;
i {
color: $dark-gray;
}
span {
font-size: 1rem;
color: $dark-gray;
}
}
&.large-font {
legend {
font-weight: 300;
font-size: 1.5rem;
span {
font-weight: 300;
font-size: 1.2rem;
}
}
.button {
color: $white;
}
}
//& > div:first-of-type {
// padding: 2rem;
// //border-top: rem-calc(1px) solid $light-gray;
+2
View File
@@ -1,4 +1,6 @@
#menu {
margin-top: 3rem;
li {
position: relative;
text-overflow: ellipsis;
+1 -1
View File
@@ -401,7 +401,7 @@ $menu-icon-spacing: 0.25rem;
// 23. Meter
// ---------
$meter-height: 1rem;
$meter-height: 0.5rem;
$meter-radius: $global-radius;
$meter-background: $medium-gray;
$meter-fill-good: $success-color;
+13 -1
View File
@@ -1,5 +1,5 @@
#top-row {
padding: 1rem 0;
padding: 1rem 0 0 0;
.opennebula-img {
height: 1rem;
@@ -14,3 +14,15 @@
.header-title {
margin-bottom: 2rem;
}
.action_blocks {
& > span {
padding-right: 2rem;
}
}
.vm-action-disabled {
//color: #cfcfcf !important;
cursor: default !important;
opacity: 0.25;
}
+4 -2
View File
@@ -11,6 +11,7 @@
@include foundation-everything;
@include foundation-progress-element;
@include foundation-meter-element;
@mixin thin-font {
font-weight: 300;
@@ -51,8 +52,9 @@ h6 {
}
.thin-font {
@include thin-font;
@include thin-font-size;
//@include thin-font;
//@include thin-font-size;
color: $light-black;
}
a {