From 45a927b3d53bc6490089606a67a5c0fd8b7efecf Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 11 Aug 2011 14:51:43 -0700 Subject: [PATCH] bug 11070: cloudStack - delete cluster/host/network/pod/primaryStorage/secondaryStorage/zone - fix a bug that an API error showed after account was deleted ("listxxxxxxx&id=N") --- ui/scripts/cloud.core.cluster.js | 12 +++++------- ui/scripts/cloud.core.host.js | 12 +++++------- ui/scripts/cloud.core.network.js | 12 +++++------- ui/scripts/cloud.core.pod.js | 14 +++++++------- ui/scripts/cloud.core.primarystorage.js | 12 +++++------- ui/scripts/cloud.core.secondarystorage.js | 12 +++++------- ui/scripts/cloud.core.zone.js | 12 +++++------- 7 files changed, 37 insertions(+), 49 deletions(-) diff --git a/ui/scripts/cloud.core.cluster.js b/ui/scripts/cloud.core.cluster.js index de832fdf357..a11f36617f9 100644 --- a/ui/scripts/cloud.core.cluster.js +++ b/ui/scripts/cloud.core.cluster.js @@ -173,13 +173,11 @@ var clusterActionMap = { dialogBeforeActionFn : doDeleteCluster, inProcessText: "label.action.delete.cluster.processing", afterActionSeccessFn: function(json, $midmenuItem1, id) { - $midmenuItem1.slideUp("slow", function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - clusterClearRightPanel(); - } - }); + $midmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + clusterClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.host.js b/ui/scripts/cloud.core.host.js index 25ac7f9c8c3..14aa8ecc215 100644 --- a/ui/scripts/cloud.core.host.js +++ b/ui/scripts/cloud.core.host.js @@ -586,13 +586,11 @@ var hostActionMap = { dialogBeforeActionFn: doRemoveHost, inProcessText: "label.action.remove.host.processing", afterActionSeccessFn: function(json, $midmenuItem1, id) { - $midmenuItem1.slideUp("slow", function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - hostClearRightPanel(); - } - }); + $midmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + hostClearRightPanel(); + } } }, "label.action.update.OS.preference": { diff --git a/ui/scripts/cloud.core.network.js b/ui/scripts/cloud.core.network.js index cb607b2d41a..5ff507ba9fa 100644 --- a/ui/scripts/cloud.core.network.js +++ b/ui/scripts/cloud.core.network.js @@ -1519,13 +1519,11 @@ var directNetworkActionMap = { dialogBeforeActionFn : doDeleteDirectNetwork, inProcessText: "label.action.delete.network.processing", afterActionSeccessFn: function(json, $midmenuItem1, id) { - $midmenuItem1.slideUp("slow", function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#direct_network_page").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - directNetworkClearRightPanel(); - } - }); + $midmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#direct_network_page").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + directNetworkClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js index c5f977773b0..a24722bf075 100644 --- a/ui/scripts/cloud.core.pod.js +++ b/ui/scripts/cloud.core.pod.js @@ -350,6 +350,8 @@ function podClearDetailsTab() { $thisTab.find("#gateway").text(""); $thisTab.find("#gateway_edit").val(""); + + $thisTab.find("#allocationstate").text(""); } function getIpRange(startip, endip) { @@ -1132,13 +1134,11 @@ var podActionMap = { dialogBeforeActionFn : doDeletePod, inProcessText: "label.action.delete.pod.processing", afterActionSeccessFn: function(json, $midmenuItem1, id) { - $midmenuItem1.slideUp("slow", function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - podClearRightPanel(); - } - }); + $midmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + podClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.primarystorage.js b/ui/scripts/cloud.core.primarystorage.js index df91c424f57..84523293ab1 100644 --- a/ui/scripts/cloud.core.primarystorage.js +++ b/ui/scripts/cloud.core.primarystorage.js @@ -278,13 +278,11 @@ var primarystorageActionMap = { dialogBeforeActionFn: doDeletePrimaryStorage, inProcessText: "label.action.delete.primary.storage.processing", afterActionSeccessFn: function(json, $midmenuItem1, id) { - $midmenuItem1.slideUp("slow", function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - primarystorageClearRightPanel(); - } - }); + $midmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + primarystorageClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.secondarystorage.js b/ui/scripts/cloud.core.secondarystorage.js index 117dc9a3b8c..29c9fdae366 100644 --- a/ui/scripts/cloud.core.secondarystorage.js +++ b/ui/scripts/cloud.core.secondarystorage.js @@ -168,13 +168,11 @@ var secondaryStorageActionMap = { dialogBeforeActionFn: doDeleteSecondaryStorage, inProcessText: "label.action.delete.secondary.storage.processing", afterActionSeccessFn: function(json, $midmenuItem1, id) { - $midmenuItem1.slideUp("slow", function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - secondaryStorageClearRightPanel(); - } - }); + $midmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + secondaryStorageClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.zone.js b/ui/scripts/cloud.core.zone.js index 97c517a08e9..9cc5a7c17cf 100644 --- a/ui/scripts/cloud.core.zone.js +++ b/ui/scripts/cloud.core.zone.js @@ -396,13 +396,11 @@ var zoneActionMap = { dialogBeforeActionFn : doDeleteZone, inProcessText: "label.action.delete.zone.processing", afterActionSeccessFn: function(json, $leftmenuItem1, id) { - $leftmenuItem1.slideUp(function() { - $(this).remove(); - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - clearRightPanel(); - zoneJsonClearRightPanel(); - } - }); + $leftmenuItem1.remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + zoneJsonClearRightPanel(); + } } } }