diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml
index 7c60956313..7c582db228 100644
--- a/src/sunstone/etc/sunstone-views/admin.yaml
+++ b/src/sunstone/etc/sunstone-views/admin.yaml
@@ -101,6 +101,8 @@ tabs:
vdcs-tab:
panel_tabs:
vdc_info_tab: true
+ vdc_groups_tab: true
+ vdc_resources_tab: true
table_columns:
- 0 # Checkbox
- 1 # ID
diff --git a/src/sunstone/public/js/plugins/vdcs-tab.js b/src/sunstone/public/js/plugins/vdcs-tab.js
index 0e57a0fd3f..873f51533b 100644
--- a/src/sunstone/public/js/plugins/vdcs-tab.js
+++ b/src/sunstone/public/js/plugins/vdcs-tab.js
@@ -397,6 +397,14 @@ var vdc_info_panel = {
"vdc_info_tab" : {
title: tr("Virtual Data Center information"),
content: ""
+ },
+ "vdc_groups_tab" : {
+ title: tr("Groups"),
+ content: ""
+ },
+ "vdc_resources_tab" : {
+ title: tr("Resources"),
+ content: ""
}
}
@@ -533,9 +541,212 @@ function updateVdcInfo(request,vdc){
content: info_tab_content
};
+ var groups_tab = {
+ title : tr("Groups"),
+ icon: "fa-users",
+ content: vdc_group_tab_content(vdc_info)
+ };
+
+ var resources_tab = {
+ title : tr("Resources"),
+ icon: "fa-th",
+ content : vdc_resources_tab_content(vdc_info)
+ };
+
Sunstone.updateInfoPanelTab("vdc_info_panel","vdc_info_tab",info_tab);
+ Sunstone.updateInfoPanelTab("vdc_info_panel","vdc_groups_tab",groups_tab);
+ Sunstone.updateInfoPanelTab("vdc_info_panel","vdc_resources_tab",resources_tab);
Sunstone.popUpInfoPanel("vdc_info_panel", "vdcs-tab");
+
+ setup_vdc_group_tab_content(vdc_info);
+ setup_vdc_resources_tab_content(vdc_info);
+}
+
+function vdc_group_tab_content(vdc_info){
+
+ var html =
+ '
';
+
+ return html;
+}
+
+function setup_vdc_group_tab_content(vdc_info){
+
+ var groups = [];
+
+ if (vdc_info.GROUPS.ID != undefined){
+ var groups = vdc_info.GROUPS.ID;
+
+ if (!$.isArray(groups)){
+ groups = [groups];
+ }
+ }
+
+ var opts = {
+ read_only: true,
+ fixed_ids: groups
+ }
+
+ setupGroupTableSelect($("#vdc_info_panel"), "vdc_group_list", opts);
+
+ refreshGroupTableSelect($("#vdc_info_panel"), "vdc_group_list");
+}
+
+function vdc_resources_tab_content(vdc_info){
+
+ var clusters_array = [];
+ var hosts_array = [];
+ var vnets_array = [];
+ var datastores_array = [];
+
+ if (vdc_info.CLUSTERS.CLUSTER){
+ clusters_array = vdc_info.CLUSTERS.CLUSTER;
+
+ if (!$.isArray(clusters_array)){
+ clusters_array = [clusters_array];
+ }
+ }
+
+ if (vdc_info.HOSTS.HOST){
+ hosts_array = vdc_info.HOSTS.HOST;
+
+ if (!$.isArray(hosts_array)){
+ hosts_array = [hosts_array];
+ }
+ }
+
+ if (vdc_info.VNETS.VNET){
+ vnets_array = vdc_info.VNETS.VNET;
+
+ if (!$.isArray(vnets_array)){
+ vnets_array = [vnets_array];
+ }
+ }
+
+ if (vdc_info.DATASTORES.DATASTORE){
+ datastores_array = vdc_info.DATASTORES.DATASTORE;
+
+ if (!$.isArray(datastores_array)){
+ datastores_array = [datastores_array];
+ }
+ }
+
+ var html =
+ '\
+
\
+
\
+ \
+ \
+ | ' + tr("Zone ID") + ' | \
+ ' + tr("Cluster ID") + ' | \
+
\
+ \
+ ';
+
+ $.each(clusters_array, function(i,e){
+ html +=
+ '\
+ | ' + e.ZONE_ID + ' | \
+ ' + e.CLUSTER_ID + ' | \
+
';
+ });
+
+ html +=
+ '\
+
\
+
\
+
\
+ \
+
\
+
\
+ \
+ \
+ | ' + tr("Zone ID") + ' | \
+ ' + tr("Host ID") + ' | \
+
\
+ \
+ ';
+
+ $.each(hosts_array, function(i,e){
+ html +=
+ '\
+ | ' + e.ZONE_ID + ' | \
+ ' + e.HOST_ID + ' | \
+
';
+ });
+
+ html +=
+ '\
+
\
+
\
+
\
+ \
+
\
+
\
+ \
+ \
+ | ' + tr("Zone ID") + ' | \
+ ' + tr("VNet ID") + ' | \
+
\
+ \
+ ';
+
+ $.each(vnets_array, function(i,e){
+ html +=
+ '\
+ | ' + e.ZONE_ID + ' | \
+ ' + e.VNET_ID + ' | \
+
';
+ });
+
+ html +=
+ '\
+
\
+
\
+
\
+ \
+
\
+
\
+ \
+ \
+ | ' + tr("Zone ID") + ' | \
+ ' + tr("Datastore ID") + ' | \
+
\
+ \
+ ';
+
+ $.each(datastores_array, function(i,e){
+ html +=
+ '\
+ | ' + e.ZONE_ID + ' | \
+ ' + e.DATASTORE_ID + ' | \
+
';
+ });
+
+ html +=
+ '\
+
\
+
\
+
'
+
+ return html;
+}
+
+function setup_vdc_resources_tab_content(vdc_info){
}
function initialize_create_vdc_dialog(dialog) {