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")

This commit is contained in:
Jessica Wang 2011-08-11 14:51:43 -07:00
parent f91d173511
commit 45a927b3d5
7 changed files with 37 additions and 49 deletions

View File

@ -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();
}
}
}
}

View File

@ -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": {

View File

@ -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();
}
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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();
}
}
}
}