From d9190f8949b2587587cb7f3e03f75d8ff08ef0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 10 Jun 2016 12:08:19 +0200 Subject: [PATCH] Bug #4541: Fix vcenter layout problems --- src/sunstone/public/app/utils/vcenter/clusters.js | 6 +++--- .../public/app/utils/vcenter/clusters/html.hbs | 2 +- src/sunstone/public/app/utils/vcenter/datastores.js | 6 +++--- .../public/app/utils/vcenter/datastores/html.hbs | 2 +- src/sunstone/public/app/utils/vcenter/images.js | 12 +++--------- .../public/app/utils/vcenter/images/html.hbs | 2 +- src/sunstone/public/app/utils/vcenter/networks.js | 6 +++--- .../public/app/utils/vcenter/networks/html.hbs | 2 +- src/sunstone/public/app/utils/vcenter/templates.js | 6 +++--- .../public/app/utils/vcenter/templates/html.hbs | 2 +- 10 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/sunstone/public/app/utils/vcenter/clusters.js b/src/sunstone/public/app/utils/vcenter/clusters.js index a4678899c2..b5f6a4c66c 100644 --- a/src/sunstone/public/app/utils/vcenter/clusters.js +++ b/src/sunstone/public/app/utils/vcenter/clusters.js @@ -70,7 +70,7 @@ define(function(require) { "X_VCENTER_HOST": opts.vcenter_host }, success: function(response){ - $(".content", context).html(""); + $(".vcenter_datacenter_list", context).html(""); $.each(response, function(datacenter_name, clusters) { var content; @@ -91,7 +91,7 @@ define(function(require) { '' + ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); } else { var tableId = "vcenter_network_table_" + datacenter_name; content = @@ -114,7 +114,7 @@ define(function(require) { ''; ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); var tbody = $('#vcenter_cluster_table_' + datacenter_name, context); diff --git a/src/sunstone/public/app/utils/vcenter/clusters/html.hbs b/src/sunstone/public/app/utils/vcenter/clusters/html.hbs index 4651a293aa..0893d61e32 100644 --- a/src/sunstone/public/app/utils/vcenter/clusters/html.hbs +++ b/src/sunstone/public/app/utils/vcenter/clusters/html.hbs @@ -14,7 +14,7 @@ {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -
+
diff --git a/src/sunstone/public/app/utils/vcenter/datastores.js b/src/sunstone/public/app/utils/vcenter/datastores.js index 3cc7afdb8d..627b9c2d9c 100644 --- a/src/sunstone/public/app/utils/vcenter/datastores.js +++ b/src/sunstone/public/app/utils/vcenter/datastores.js @@ -75,7 +75,7 @@ define(function(require) { "X_VCENTER_HOST": opts.vcenter_host }, success: function(response){ - $(".content", context).html(""); + $(".vcenter_datacenter_list", context).html(""); $.each(response, function(datacenter_name, datastores){ var content; @@ -96,7 +96,7 @@ define(function(require) { '' + ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); } else { var tableId = "vcenter_network_table_" + datacenter_name; content = @@ -136,7 +136,7 @@ define(function(require) { '
'; ''; - var newdiv = $(content).appendTo($(".content", context)); + var newdiv = $(content).appendTo($(".vcenter_datacenter_list", context)); var tbody = $('#vcenter_datastore_table_' + datacenter_name + ' tbody', context); $.each(datastores, function(id, datastore){ diff --git a/src/sunstone/public/app/utils/vcenter/datastores/html.hbs b/src/sunstone/public/app/utils/vcenter/datastores/html.hbs index 4651a293aa..0893d61e32 100644 --- a/src/sunstone/public/app/utils/vcenter/datastores/html.hbs +++ b/src/sunstone/public/app/utils/vcenter/datastores/html.hbs @@ -14,7 +14,7 @@ {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -
+
diff --git a/src/sunstone/public/app/utils/vcenter/images.js b/src/sunstone/public/app/utils/vcenter/images.js index 81ff03c9ef..48050db60f 100644 --- a/src/sunstone/public/app/utils/vcenter/images.js +++ b/src/sunstone/public/app/utils/vcenter/images.js @@ -73,7 +73,7 @@ define(function(require) { "X_VCENTER_HOST": opts.vcenter_host }, success: function(response) { - $(".content", context).html(""); + $(".vcenter_datacenter_list", context).html(""); if (response.length == 0) { content = @@ -92,7 +92,7 @@ define(function(require) { '' + ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); } else { var tableId = "vcenter_image_table_" + opts.vcenter_datastore; content = @@ -102,12 +102,6 @@ define(function(require) { '
  • ' + opts.vcenter_datastore + ' ' + Locale.tr("Datastore") + '
  • ' + - '
  • ' + - '' + - '
  • ' + '
  • ' + '
  • '; ''; - var newdiv = $(content).appendTo($(".content", context)); + var newdiv = $(content).appendTo($(".vcenter_datacenter_list", context)); var tbody = $('#' + tableId + ' tbody', context); $.each(response, function(id, image) { diff --git a/src/sunstone/public/app/utils/vcenter/images/html.hbs b/src/sunstone/public/app/utils/vcenter/images/html.hbs index 4651a293aa..0893d61e32 100644 --- a/src/sunstone/public/app/utils/vcenter/images/html.hbs +++ b/src/sunstone/public/app/utils/vcenter/images/html.hbs @@ -14,7 +14,7 @@ {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -
    +
    diff --git a/src/sunstone/public/app/utils/vcenter/networks.js b/src/sunstone/public/app/utils/vcenter/networks.js index e173aca91b..56908d3f7a 100644 --- a/src/sunstone/public/app/utils/vcenter/networks.js +++ b/src/sunstone/public/app/utils/vcenter/networks.js @@ -74,7 +74,7 @@ define(function(require) { "X_VCENTER_HOST": opts.vcenter_host }, success: function(response) { - $(".content", context).html(""); + $(".vcenter_datacenter_list", context).html(""); $.each(response, function(datacenter_name, networks) { var content; @@ -95,7 +95,7 @@ define(function(require) { '' + ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); } else { var tableId = "vcenter_network_table_" + datacenter_name; content = @@ -141,7 +141,7 @@ define(function(require) { '
    '; ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); var preDrawCallback = function (settings) { $('#' + tableId).html(EmptyTableTemplate()); diff --git a/src/sunstone/public/app/utils/vcenter/networks/html.hbs b/src/sunstone/public/app/utils/vcenter/networks/html.hbs index dbe373004e..de44dbe7fe 100644 --- a/src/sunstone/public/app/utils/vcenter/networks/html.hbs +++ b/src/sunstone/public/app/utils/vcenter/networks/html.hbs @@ -14,7 +14,7 @@ {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -
    +
    diff --git a/src/sunstone/public/app/utils/vcenter/templates.js b/src/sunstone/public/app/utils/vcenter/templates.js index af95b10ac8..8c38ec8e6f 100644 --- a/src/sunstone/public/app/utils/vcenter/templates.js +++ b/src/sunstone/public/app/utils/vcenter/templates.js @@ -75,7 +75,7 @@ define(function(require) { "X_VCENTER_HOST": opts.vcenter_host }, success: function(response){ - $(".content", context).html(""); + $(".vcenter_datacenter_list", context).html(""); $.each(response, function(datacenter_name, templates){ var content; @@ -96,7 +96,7 @@ define(function(require) { '' + ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); } else { var tableId = "vcenter_template_table_" + datacenter_name; content = @@ -142,7 +142,7 @@ define(function(require) { '
    '; ''; - $(".content", context).append(content); + $(".vcenter_datacenter_list", context).append(content); var preDrawCallback = function (settings) { $('#' + tableId).html(EmptyTableTemplate()); diff --git a/src/sunstone/public/app/utils/vcenter/templates/html.hbs b/src/sunstone/public/app/utils/vcenter/templates/html.hbs index a17f14ead3..a23eb391b5 100644 --- a/src/sunstone/public/app/utils/vcenter/templates/html.hbs +++ b/src/sunstone/public/app/utils/vcenter/templates/html.hbs @@ -14,7 +14,7 @@ {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -
    +