diff --git a/src/cli/one_helper/onegroup_helper.rb b/src/cli/one_helper/onegroup_helper.rb index 6d5fa07275..523c395401 100644 --- a/src/cli/one_helper/onegroup_helper.rb +++ b/src/cli/one_helper/onegroup_helper.rb @@ -217,7 +217,7 @@ class OneGroupHelper < OpenNebulaHelper::OneHelper end column :"CLUSTER", "", :right, :size=>7 do |d| - d['CLUSTER_ID'] + d['CLUSTER_ID'] == '10' ? 'ALL' : d['CLUSTER_ID'] end end.show([providers].flatten, {}) end diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index ad338c8279..a84b771dce 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -677,10 +677,11 @@ function fromJSONtoProvidersTable(providers_array){ } $.each(providers_array, function(index, provider){ + var cluster_id = (provider.CLUSTER_ID == "10") ? tr("All") : provider.CLUSTER_ID; str += '\ ' + provider.ZONE_ID + '\ - ' + provider.CLUSTER_ID + '\ + ' + cluster_id + '\ '; }); @@ -1073,7 +1074,11 @@ function setupCreateGroupDialog(){ var resource_selection = $("input[name='"+str_zone_tab_id+"']:checked").val(); switch (resource_selection){ case "all": - // TODO + // 10 is the special ID for ALL, see ClusterPool.h + group_json['group']['resource_providers'].push( + {"zone_id" : zone_id, "cluster_id" : 10} + ); + break; case "cluster": $.each(selected_group_clusters[zone_id], function(key, value) { @@ -1084,7 +1089,7 @@ function setupCreateGroupDialog(){ break; default: // "none" - // TODO + } });