mirror of https://github.com/apache/cloudstack.git
new UI - Host page - Enable/Cancel Maintenance API return objects in different structure. This is related UI change.
This commit is contained in:
parent
32a86f5465
commit
dccec784fc
|
|
@ -201,8 +201,9 @@ var hostActionMap = {
|
|||
asyncJobResponse: "preparehostformaintenanceresponse",
|
||||
dialogBeforeActionFn: doEnableMaintenanceMode,
|
||||
inProcessText: "Enabling Maintenance Mode....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
hostToMidmenu(json.queryasyncjobresultresponse.host[0], $midmenuItem1);
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
var item = json.queryasyncjobresultresponse.jobresult.host;
|
||||
hostToMidmenu(item, $midmenuItem1);
|
||||
hostToRightPanel($midmenuItem1);
|
||||
$("#right_panel_content #after_action_info").text("We are actively enabling maintenance on your host. Please refresh periodically for an updated status.");
|
||||
}
|
||||
|
|
@ -212,8 +213,9 @@ var hostActionMap = {
|
|||
asyncJobResponse: "cancelhostmaintenanceresponse",
|
||||
dialogBeforeActionFn: doCancelMaintenanceMode,
|
||||
inProcessText: "Cancelling Maintenance Mode....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
hostToMidmenu(json.queryasyncjobresultresponse.host[0], $midmenuItem1);
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
var item = json.queryasyncjobresultresponse.jobresult.host;
|
||||
hostToMidmenu(item, $midmenuItem1);
|
||||
hostToRightPanel($midmenuItem1);
|
||||
$("#right_panel_content #after_action_info").text("We are actively cancelling your scheduled maintenance. Please refresh periodically for an updated status.");
|
||||
}
|
||||
|
|
@ -224,7 +226,8 @@ var hostActionMap = {
|
|||
dialogBeforeActionFn: doForceReconnect,
|
||||
inProcessText: "Reconnecting....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
hostToMidmenu(json.queryasyncjobresultresponse.jobresult.host, $midmenuItem1);
|
||||
var item = json.queryasyncjobresultresponse.jobresult.host;
|
||||
hostToMidmenu(item, $midmenuItem1);
|
||||
hostToRightPanel($midmenuItem1);
|
||||
$("#right_panel_content #after_action_info").text("We are actively reconnecting your host. Please refresh periodically for an updated status.");
|
||||
}
|
||||
|
|
@ -233,8 +236,10 @@ var hostActionMap = {
|
|||
isAsyncJob: false,
|
||||
dialogBeforeActionFn: doRemoveHost,
|
||||
inProcessText: "Removing Host....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
$midmenuItem1.remove();
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
$midmenuItem1.slideUp("slow", function() {
|
||||
$(this).remove();
|
||||
});
|
||||
clearRightPanel();
|
||||
hostClearRightPanel();
|
||||
}
|
||||
|
|
@ -243,16 +248,10 @@ var hostActionMap = {
|
|||
isAsyncJob: false,
|
||||
dialogBeforeActionFn: doUpdateOSPreference,
|
||||
inProcessText: "Updating OS Preference....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
//call listHosts API before bug 6650 ("updateHost API should return an embedded object like what listHosts API does") is fixed.
|
||||
$.ajax({
|
||||
data: createURL("command=listHosts&id="+id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
hostToMidmenu(json.listhostsresponse.host[0], $midmenuItem1);
|
||||
hostToRightPanel($midmenuItem1);
|
||||
}
|
||||
});
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
var item = json.updatehostresponse.host;
|
||||
hostToMidmenu(item, $midmenuItem1);
|
||||
hostToRightPanel($midmenuItem1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue