diff --git a/src/sunstone/models/OpenNebulaJSON/ZoneJSON.rb b/src/sunstone/models/OpenNebulaJSON/ZoneJSON.rb
index fd9f7fa1ec..4959ac90b0 100644
--- a/src/sunstone/models/OpenNebulaJSON/ZoneJSON.rb
+++ b/src/sunstone/models/OpenNebulaJSON/ZoneJSON.rb
@@ -22,11 +22,14 @@ module OpenNebulaJSON
def create(template_json)
zone_hash = parse_json(template_json, 'zone')
+
if OpenNebula.is_error?(zone_hash)
return zone_hash
end
- self.allocate(zone_hash['name'])
+ template = template_to_str(zone_hash)
+
+ self.allocate(template)
end
def perform_action(template_json)
diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js
index 6a4f10aa0d..a5d7f6716e 100644
--- a/src/sunstone/public/js/plugins/clusters-tab.js
+++ b/src/sunstone/public/js/plugins/clusters-tab.js
@@ -1462,7 +1462,7 @@ $(document).ready(function(){
var tab_name = "clusters-tab"
if (Config.isTabEnabled(tab_name)) {
- //prepare host datatabl
+ //prepare clusters datatable
dataTable_clusters = $("#datatable_clusters",main_tabs_context).dataTable({
"aoColumnDefs": [
{ "bSortable": false, "aTargets": ["check"] },
diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js
index 4a7dc13ec2..30144f435c 100644
--- a/src/sunstone/public/js/plugins/users-tab.js
+++ b/src/sunstone/public/js/plugins/users-tab.js
@@ -146,7 +146,7 @@ var user_creation_div =
var create_user_tmpl =
'
\
\
- \
+ \
\
\
';
var zones_tab_content = '\
@@ -90,6 +124,7 @@ var zones_tab_content = '\
| \
' + tr("ID") + ' | \
' + tr("Name") + ' | \
+ ' + tr("Endpoint") + ' | \
\
\
\
@@ -101,7 +136,7 @@ var zones_select="";
var dataTable_zones;
var $create_zone_dialog;
-// TODO: Some methods are not yet implemented in oned (rename, update)
+// TODO: Some methods are not yet implemented in oned (eg, rename)
//Setup actions
var zone_actions = {
@@ -111,9 +146,6 @@ var zone_actions = {
call: OpenNebula.Zone.create,
callback: function(request, response){
Sunstone.runAction('Zone.list');
-
- //Sunstone.runAction('Zone.list');
- // Sunstone.runAction('Zone.show',response.ZONE.ID);
},
error: onError,
notify: true
@@ -197,10 +229,10 @@ var zone_actions = {
error: onError
},
- "Zone.update_dialog" : {
- type: "single",
- call: popUpUpdateZoneDialog
- },
+ // "Zone.update_dialog" : {
+ // type: "single",
+ // call: popUpUpdateZoneDialog
+ // },
"Zone.rename" : {
type: "single",
@@ -225,12 +257,12 @@ var zone_buttons = {
type: "create_dialog",
layout: "create"
},
- "Zone.update_dialog" : {
- type : "action",
- layout: "main",
- text : tr("Update"),
- alwaysActive: true
- },
+ // "Zone.update_dialog" : {
+ // type : "action",
+ // layout: "main",
+ // text : tr("Update"),
+ // alwaysActive: true
+ // },
"Zone.delete" : {
type: "confirm",
layout: "del",
@@ -270,7 +302,8 @@ function zoneElementArray(element_json){
return [
'',
element.ID,
- element.NAME
+ element.NAME,
+ element.TEMPLATE.ENDPOINT
];
}
@@ -281,6 +314,7 @@ function updateZoneSelect(){
zones_select += makeSelectOptions(dataTable_zones,
1,//id_col
2,//name_col
+ 3,//endpoint_col
[],//status_cols
[],//bad_st
true
@@ -418,7 +452,7 @@ $(document).ready(function(){
var tab_name = "zones-tab"
if (Config.isTabEnabled(tab_name)) {
- //prepare zone datatabl
+ //prepare zone datatable
dataTable_zones = $("#datatable_zones",main_tabs_context).dataTable({
"aoColumnDefs": [
{ "bSortable": false, "aTargets": ["check"] },