1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #3174: Display resource name in header-resource

This commit is contained in:
Daniel Molina 2014-10-24 17:56:33 +02:00
parent 7a2c9f0372
commit 92d2523495
18 changed files with 69 additions and 28 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -661,6 +661,8 @@ function updateClusterInfo(request,cluster){
cluster_info = cluster.CLUSTER;
cluster_template = cluster_info.TEMPLATE;
$(".resource-info-header", $("#clusters-tab")).html(cluster_info.NAME);
//Information tab
var info_tab = {
title : tr("Info"),

View File

@ -650,6 +650,8 @@ function updateDatastoreInfo(request,ds){
datastore_name = info.NAME;
datastore_type = info.TYPE;
$(".resource-info-header", $("#datastores-tab")).html(info.NAME);
switch(info.TYPE)
{
case '0':

View File

@ -463,6 +463,9 @@ function updateFilesView(request, files_list){
// Callback to update the information panel tabs and pop it up
function updateFileInfo(request,file){
var file_info = file.IMAGE;
$(".resource-info-header", $("#files-tab")).html(file_info.NAME);
var info_tab = {
title : tr("Info"),
icon: "fa-info-circle",

View File

@ -652,6 +652,8 @@ function fromJSONtoProvidersTable(group_info){
function updateGroupInfo(request,group){
var info = group.GROUP;
$(".resource-info-header", $("#groups-tab")).html(info.NAME);
var info_tab = {
title: tr("Info"),
icon: "fa-info-circle",

View File

@ -757,6 +757,8 @@ function insert_datastores_capacity_table(host_share) {
function updateHostInfo(request,host){
var host_info = host.HOST;
$(".resource-info-header", $("#hosts-tab")).html(host_info.NAME);
var cpu_bars = generateCPUProgressBar(host_info);
var mem_bars = generateMEMProgressBar(host_info);

View File

@ -607,6 +607,9 @@ function updateImagesView(request, images_list){
// Callback to update the information panel tabs and pop it up
function updateImageInfo(request,img){
var img_info = img.IMAGE;
$(".resource-info-header", $("#images-tab")).html(img_info.NAME);
var info_tab = {
title : tr("Info"),
icon: "fa-info-circle",

View File

@ -409,6 +409,8 @@ function updateMarketInfo(request,app){
var url = app.links.download.href;
url = url.replace(/\/download$/, '');
$(".resource-info-header", $("#marketplace-tab")).html(app.name);
var files_table = '<table id="info_marketplace_table2" class="dataTable">\
<thead>\
<tr><th colspan="2">'+tr("Images")+'</th></tr>\

View File

@ -912,6 +912,8 @@ function updateServiceVMInfo(vmachine_list){
function updateServiceInfo(request,elem){
var elem_info = elem.DOCUMENT;
$(".resource-info-header", $("#oneflow-services")).html(elem_info.NAME);
var info_tab = {
title : tr("Info"),
icon: "fa-info-circle",

View File

@ -718,6 +718,8 @@ function updateServiceTemplatesView(request, service_templates_list){
function updateServiceTemplateInfo(request,elem){
var elem_info = elem.DOCUMENT;
$(".resource-info-header", $("#oneflow-templates")).html(elem_info.NAME);
var network_configuration = "";
if (elem_info.TEMPLATE.BODY['custom_attrs']) {
network_configuration +=

View File

@ -1703,6 +1703,9 @@ function setup_nic_tab_content(nic_section, str_nic_tab_id) {
// Callback to update the information panel tabs and pop it up
function updateTemplateInfo(request,template){
var template_info = template.VMTEMPLATE;
$(".resource-info-header", $("#templates-tab")).html(template_info.NAME);
var info_tab = {
title : tr("Info"),
icon: "fa-info-circle",

View File

@ -537,6 +537,8 @@ function updateUsersView(request,users_list,quotas_list){
function updateUserInfo(request,user){
var info = user.USER;
$(".resource-info-header", $("#users-tab")).html(info.NAME);
var info_tab = {
title : tr("Info"),
icon: "fa-info-circle",

View File

@ -925,7 +925,7 @@ var vms_tab = {
parentTab: 'vresources-tab',
search_input: '<input id="vms_search" type="text" placeholder="'+tr("Search")+'" />',
list_header: '<i class="fa fa-fw fa-th"></i>&emsp;'+tr("Virtual Machines"),
info_header: '<i class="fa fa-fw fa-th"></i>&emsp;'+tr("Virtual Machine"),
info_header: '<i class="fa fa-fw fa-th"></i>&emsp;'+tr("VM"),
subheader: '<span class="total_vms"/> <small>'+tr("TOTAL")+'</small>&emsp;\
<span class="active_vms"/> <small>'+tr("ACTIVE")+'</small>&emsp;\
<span class="off_vms"/> <small>'+tr("OFF")+'</small>&emsp;\
@ -1341,6 +1341,7 @@ function updateVMInfo(request,vm){
else
unshown_values[key]=vm_info.USER_TEMPLATE[key];
$(".resource-info-header", $("#vms-tab")).html(vm_info.NAME);
var info_tab = {
title : tr("Info"),

View File

@ -705,6 +705,8 @@ function updateVNetworksView(request, network_list){
function updateVNetworkInfo(request,vn){
var vn_info = vn.VNET;
$(".resource-info-header", $("#vnets-tab")).html(vn_info.NAME);
var reservation_row = '';
if(vn_info.PARENT_NETWORK_ID.length > 0){

View File

@ -304,6 +304,8 @@ function updateZoneInfo(request,zone){
zone_info = zone.ZONE;
zone_template = zone_info.TEMPLATE;
$(".resource-info-header", $("#zones-tab")).html(zone_info.NAME);
//Information tab
var info_tab = {
title : tr("Info"),

View File

@ -560,23 +560,24 @@ function insertTab(tab_name){
tab_content_str = '<div id="'+tab_name+'" class="tab" style="display:none;">';
if (tab_info.list_header || tab_info.info_header) {
tab_content_str += '<div class="row">\
tab_content_str += '<div class="row header-row">\
<div class="large-12 columns">\
<h3 class="subheader header-title only-right-list">\
<h2 class="subheader header-title only-right-list">\
<span class="header-resource">' +
tab_info.list_header +
'</span>\
</h3>\
<h3 class="subheader header-title only-right-info" hidden>\
</h2>\
<h2 class="subheader header-title only-right-info" hidden>\
<span class="header-resource">' +
tab_info.info_header +
'</span>&emsp;\
<span class="resource-id"></span>\
</h3>\
<h3 class="subheader header-title only-right-form" hidden>\
<span class="resource-id"></span>&emsp;\
<span class="resource-info-header"></span>\
</h2>\
<h2 class="subheader header-title only-right-form" hidden>\
<span class="right-form-title">' +
'</span>\
</h3>\
</h2>\
</div>\
</div>'
}
@ -627,7 +628,7 @@ function insertTab(tab_name){
tab_content_str += '<div class="right-info" hidden>'
tab_content_str += '</div>'
tab_content_str += '<div class="large-10 small-12 right-form" hidden>'+
tab_content_str += '<div class="large-12 small-12 right-form" hidden>'+
'<div class="loadingForm">'+
'<br>'+
'<br>'+
@ -4496,6 +4497,9 @@ function showElement(tabname, info_action, element_id){
return false;
}
$(".resource-id", context).html(element_id);
$(".resource-info-header", context).text("");
showTab(tabname);
var context = $('#'+tabname);
@ -4504,7 +4508,6 @@ function showElement(tabname, info_action, element_id){
var res = SunstoneCfg['tabs'][tabname]['resource'];
Sunstone.runAction(info_action,element_id);
$(".resource-id", context).html(element_id);
//enable action buttons
$('.top_button, .list_button', context).attr('disabled', false);
}
@ -6413,7 +6416,7 @@ function setupResourceTableSelect(section, context_id, options) {
$('#selected_resource_multiple_'+context_id, section).show();
$('#select_resource_multiple_'+context_id, section).hide();
}
$('.alert-box', section).hide();
return true;

View File

@ -67,29 +67,27 @@
}
.left-content {
padding-top: 31px;
padding-top: 40px;
padding-left: 20px;
}
.left-header {
margin-bottom: 10px !important;
img {
height: 30px;
width: 140px;
}
}
.right-content {
padding-top: 20px;
padding-left: 30px;
padding-right: 20px;
padding-top: 10px;
padding-left: 50px;
padding-right: 50px;
}
.right-info {
margin-top: 15px;
}
#menu {
margin-top: 10px;
}
.log-tab {
background: #6f6f6f;
color: #f2f2f2;
@ -206,7 +204,7 @@ input.search {
.topTab {
a {
color: #555 !important;
color: #333 !important;
}
margin-top: 10px;
@ -250,8 +248,18 @@ input.search {
}
}
.header-title {
margin-bottom: 20px;
.header-row {
margin-bottom: 20px !important;
margin-top: 25px !important;
.resource-id {
color: #999;
display: none;
}
.resource-info-header {
color: #777;
}
}
// action block
@ -492,7 +500,7 @@ fieldset {
dd:not(.active) {
a {
color: #999 !important;
color: #777 !important;
background: #fff;
&:hover {
@ -1078,7 +1086,7 @@ hr {
}
#li_support-tab {
background: #efefef;
background: #f7f7f7;
border-radius: 3px;
padding: 5px 0px;
margin-top: 30px;