1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Sunstone: minor bugfixes. Show host tab for regular users.

This commit is contained in:
Hector Sanjuan 2012-03-26 12:06:00 +02:00
parent 97550f806c
commit 447bc1849d
5 changed files with 20 additions and 13 deletions

View File

@ -54,10 +54,9 @@
:user:
:group:
- plugins/hosts-tab.js:
:ALL: false
:ALL: true
:user:
:group:
oneadmin: true
- plugins/datastores-tab.js:
:ALL: true
:user:

View File

@ -453,7 +453,7 @@ function removeClusterMenus(){
// Sunstone.removeMainTab('cluster_vnets_tab_n',true);
// Sunstone.removeMainTab('cluster_datastores_tab_n',true);
// Sunstone.removeMainTab('cluster_hosts_tab_n',true);
Sunstone.removeMainTab('cluster_tab_n',true);
Sunstone.removeMainTab('cluster_tab_-',true);
for (var i=0; i < data.length; i++){
var id = data[i][1];

View File

@ -271,7 +271,8 @@ var datastore_buttons = {
"Datastore.update_dialog" : {
type: "action",
text: tr("Update properties"),
alwaysActive: true
alwaysActive: true,
condition: mustBeAdmin,
},
"Datastore.addtocluster" : {
type: "confirm_with_select",
@ -296,7 +297,8 @@ var datastore_buttons = {
},
"Datastore.delete" : {
type: "confirm",
text: tr("Delete")
text: tr("Delete"),
condition: mustBeAdmin
}
}
@ -443,7 +445,7 @@ function updateDatastoreInfo(request,ds){
</tr>\
<tr>\
<td class="key_td">'+tr("Cluster")+'</td>\
<td class="value_td">'+(element.CLUSTER.length ? element.CLUSTER : "-")+'</td>\
<td class="value_td">'+(info.CLUSTER.length ? info.CLUSTER : "-")+'</td>\
</tr>\
<tr>\
<td class="key_td">'+tr("DS Mad")+'</td>\

View File

@ -271,30 +271,36 @@ var host_buttons = {
},
"Host.create_dialog" : {
type: "create_dialog",
text: tr("+ New")
text: tr("+ New"),
condition: mustBeAdmin
},
"Host.update_dialog" : {
type: "action",
text: tr("Update a template"),
alwaysActive: true
alwaysActive: true,
condition: mustBeAdmin
},
"Host.addtocluster" : {
type: "confirm_with_select",
text: tr("Select cluster"),
select: clusters_sel,
tip: tr("Select the destination cluster:"),
condition: mustBeAdmin
},
"Host.enable" : {
type: "action",
text: tr("Enable")
text: tr("Enable"),
condition: mustBeAdmin
},
"Host.disable" : {
type: "action",
text: tr("Disable")
text: tr("Disable"),
condition: mustBeAdmin
},
"Host.delete" : {
type: "confirm",
text: tr("Delete host")
text: tr("Delete host"),
condition: mustBeAdmin
}
};
@ -475,7 +481,7 @@ function updateHostInfo(request,host){
</tr>\
<tr>\
<td class="key_td">' + tr("Cluster") + '</td>\
<td class="value_td">'+(host.CLUSTER.length ? host.CLUSTER : "-")+'</td>\
<td class="value_td">'+(host_info.CLUSTER.length ? host_info.CLUSTER : "-")+'</td>\
</tr>\
<tr>\
<td class="key_td">' + tr("State") + '</td>\

View File

@ -566,7 +566,7 @@ function updateVNetworkInfo(request,vn){
</tr>\
<tr>\
<td class="key_td">'+tr("Cluster")+'</td>\
<td class="value_td">'+(network.CLUSTER.length ? network.CLUSTER : "-")+'</td>\
<td class="value_td">'+(vn_info.CLUSTER.length ? vn_info.CLUSTER : "-")+'</td>\
</tr>\
<tr>\
<td class="key_td">'+tr("Owner")+'</td>\