Feature #2565, #2570: Resource provider 10 is shown as ALL in CLI and Sunstone

This commit is contained in:
Carlos Martín committed 2013-12-20 17:32:05 +01:00
1 parent 402eee32ef
commit 29a7205888
2 files changed
+9 -4

No files matched your search

+1 -1
View File
@@ -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
+8 -3
View File
@@ -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 +=
'<tr>\
<td>' + provider.ZONE_ID + '</td>\
<td>' + provider.CLUSTER_ID + '</td>\
<td>' + cluster_id + '</td>\
</tr>';
});
@@ -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
}
});