mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
new UI - implement DetachISO action
This commit is contained in:
parent
dd880b62f8
commit
f714fb82a1
@ -240,7 +240,7 @@
|
|||||||
<div class="midmenu_panel">
|
<div class="midmenu_panel">
|
||||||
<div class="midmenu_box" id="midmenu_container">
|
<div class="midmenu_box" id="midmenu_container">
|
||||||
|
|
||||||
|
<!--
|
||||||
<div class="midmenu_list">
|
<div class="midmenu_list">
|
||||||
<div class="midmenu_content">
|
<div class="midmenu_content">
|
||||||
<div class="midmenu_icons"><img src="images/status_green.png" alt="Running" /></div>
|
<div class="midmenu_icons"><img src="images/status_green.png" alt="Running" /></div>
|
||||||
@ -251,6 +251,7 @@
|
|||||||
<div class="midmenu_defaultloader"></div>
|
<div class="midmenu_defaultloader"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
<div class="midmenu_list">
|
<div class="midmenu_list">
|
||||||
<div class="midmenu_content">
|
<div class="midmenu_content">
|
||||||
@ -579,6 +580,16 @@
|
|||||||
<div class="poweredby_box">
|
<div class="poweredby_box">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Dialogs -->
|
||||||
|
<div id="dialog_confirmation" title="Confirmation" style="display:none"></div>
|
||||||
|
<div id="dialog_info" title="Info" style="display:none"></div>
|
||||||
|
<div id="dialog_alert" title="Alert" style="display:none"></div>
|
||||||
|
<div id="dialog_error" title="Error" style="display:none"></div>
|
||||||
|
<div id="dialog_session_expired" title="Session Expired" style="display:none">
|
||||||
|
<p>Your session has expired. Please click 'OK' to return to the login screen.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- templates starts here-->
|
<!-- templates starts here-->
|
||||||
<div class="leftmenu_content" id="leftmenu_instance_group_template" style="display: none">
|
<div class="leftmenu_content" id="leftmenu_instance_group_template" style="display: none">
|
||||||
<div class="leftmenu_thirdindent">
|
<div class="leftmenu_thirdindent">
|
||||||
|
|||||||
@ -597,7 +597,7 @@
|
|||||||
<!-- Attach ISO Dialog -->
|
<!-- Attach ISO Dialog -->
|
||||||
<div id="dialog_attach_iso" title="Attach ISO" style="display:none">
|
<div id="dialog_attach_iso" title="Attach ISO" style="display:none">
|
||||||
<p>
|
<p>
|
||||||
Please specify the ISO you wish to attach to your Virtual Instance: <b><span id="vm_name">
|
Please specify the ISO you wish to attach to your Virtual Instance(s)
|
||||||
</span></b>.</p>
|
</span></b>.</p>
|
||||||
<div class="dialog_formcontent">
|
<div class="dialog_formcontent">
|
||||||
<form action="#" method="post" id="form_acquire">
|
<form action="#" method="post" id="form_acquire">
|
||||||
|
|||||||
@ -15,68 +15,61 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
|
|
||||||
var noGroupName = "(no group name)";
|
var noGroupName = "(no group name)";
|
||||||
|
|
||||||
|
var listAPIMap = {
|
||||||
|
API: "listVirtualMachines",
|
||||||
|
APIResponse: "listvirtualmachinesresponse",
|
||||||
|
APIResponseObj: "virtualmachine"
|
||||||
|
};
|
||||||
|
|
||||||
var actionMap = {
|
var actionMap = {
|
||||||
stopVirtualMachine: {
|
stopVirtualMachine: {
|
||||||
label: "Stop Instance",
|
label: "Stop Instance",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "stopvirtualmachineresponse",
|
asyncJobResponse: "stopvirtualmachineresponse",
|
||||||
afterActionSeccessFn: updateVirtualMachineStateInMidMenu,
|
afterActionSeccessFn: updateVirtualMachineStateInMidMenu
|
||||||
listAPI: "listVirtualMachines",
|
|
||||||
listAPIResponse: "listvirtualmachinesresponse",
|
|
||||||
listAPIResponseObj: "virtualmachine"
|
|
||||||
},
|
},
|
||||||
startVirtualMachine: {
|
startVirtualMachine: {
|
||||||
label: "Start Instance",
|
label: "Start Instance",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "startvirtualmachineresponse",
|
asyncJobResponse: "startvirtualmachineresponse",
|
||||||
afterActionSeccessFn: updateVirtualMachineStateInMidMenu,
|
afterActionSeccessFn: updateVirtualMachineStateInMidMenu
|
||||||
listAPI: "listVirtualMachines",
|
|
||||||
listAPIResponse: "listvirtualmachinesresponse",
|
|
||||||
listAPIResponseObj: "virtualmachine"
|
|
||||||
},
|
},
|
||||||
rebootVirtualMachine: {
|
rebootVirtualMachine: {
|
||||||
label: "Reboot Instance",
|
label: "Reboot Instance",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "rebootvirtualmachineresponse",
|
asyncJobResponse: "rebootvirtualmachineresponse",
|
||||||
afterActionSeccessFn: updateVirtualMachineStateInMidMenu,
|
afterActionSeccessFn: updateVirtualMachineStateInMidMenu
|
||||||
listAPI: "listVirtualMachines",
|
|
||||||
listAPIResponse: "listvirtualmachinesresponse",
|
|
||||||
listAPIResponseObj: "virtualmachine"
|
|
||||||
},
|
},
|
||||||
destroyVirtualMachine: {
|
destroyVirtualMachine: {
|
||||||
label: "Destroy Instance",
|
label: "Destroy Instance",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "destroyvirtualmachineresponse",
|
asyncJobResponse: "destroyvirtualmachineresponse",
|
||||||
afterActionSeccessFn: updateVirtualMachineStateInMidMenu,
|
afterActionSeccessFn: updateVirtualMachineStateInMidMenu
|
||||||
listAPI: "listVirtualMachines",
|
|
||||||
listAPIResponse: "listvirtualmachinesresponse",
|
|
||||||
listAPIResponseObj: "virtualmachine"
|
|
||||||
},
|
},
|
||||||
recoverVirtualMachine: {
|
recoverVirtualMachine: {
|
||||||
label: "Restore Instance",
|
label: "Restore Instance",
|
||||||
isAsyncJob: false,
|
isAsyncJob: false,
|
||||||
afterActionSeccessFn: updateVirtualMachineStateInMidMenu,
|
afterActionSeccessFn: updateVirtualMachineStateInMidMenu
|
||||||
listAPI: "listVirtualMachines",
|
|
||||||
listAPIResponse: "listvirtualmachinesresponse",
|
|
||||||
listAPIResponseObj: "virtualmachine"
|
|
||||||
},
|
},
|
||||||
attachIso: {
|
attachIso: {
|
||||||
label: "Attach ISO",
|
label: "Attach ISO",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "attachisoresponse",
|
asyncJobResponse: "attachisoresponse",
|
||||||
afterActionSeccessFn: function(){
|
afterActionSeccessFn: function(){},
|
||||||
//debugger;
|
dialogBeforeActionFn : doAttachISO
|
||||||
},
|
},
|
||||||
dialogBeforeActionFn : doAttachISO,
|
detachIso: {
|
||||||
listAPI: "listVirtualMachines",
|
label: "Detach ISO",
|
||||||
listAPIResponse: "listvirtualmachinesresponse",
|
isAsyncJob: true,
|
||||||
listAPIResponseObj: "virtualmachine"
|
asyncJobResponse: "detachisoresponse",
|
||||||
|
afterActionSeccessFn: function(){},
|
||||||
|
dialogBeforeActionFn : doDetachISO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function doAttachISO($t, selectedItemIds) {
|
function doAttachISO($t, selectedItemIds, listAPIMap) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=listIsos&isReady=true&response=json"),
|
data: createURL("command=listIsos&isReady=true"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -90,20 +83,37 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//$("#dialog_attach_iso").find("#vm_name").text(vmName);
|
|
||||||
$("#dialog_attach_iso")
|
$("#dialog_attach_iso")
|
||||||
.dialog('option', 'buttons', {
|
.dialog('option', 'buttons', {
|
||||||
"Confirm": function() {
|
"Confirm": function() {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
var isoId = $("#dialog_attach_iso #attach_iso_select").val();
|
var isoId = $("#dialog_attach_iso #attach_iso_select").val();
|
||||||
if (isoId == "none") {
|
if (isoId == "none") {
|
||||||
$("#dialog_alert").html("<p>There is no ISO file to attach to the virtual machine.</p>")
|
$("#dialog_alert").html("<p>There is no ISO file to attach to the virtual machine.</p>");
|
||||||
$("#dialog_alert").dialog("open");
|
$("#dialog_alert").dialog("open");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for(var id in selectedItemIds) {
|
for(var id in selectedItemIds) {
|
||||||
var apiCommand = "command=attachIso&virtualmachineid="+id+"&id="+isoId+"&response=json";
|
var apiCommand = "command=attachIso&virtualmachineid="+id+"&id="+isoId;
|
||||||
doAction(id, $t, apiCommand);
|
doAction(id, $t, apiCommand, listAPIMap);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Cancel": function() {
|
||||||
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
|
}).dialog("open");
|
||||||
|
}
|
||||||
|
|
||||||
|
function doDetachISO($t, selectedItemIds, listAPIMap) {
|
||||||
|
$("#dialog_confirmation")
|
||||||
|
.html("<p>Please confirm you want to detach an ISO from the virtual machine(s)</p>")
|
||||||
|
.dialog('option', 'buttons', {
|
||||||
|
"Confirm": function() {
|
||||||
|
$(this).dialog("close");
|
||||||
|
for(var id in selectedItemIds) {
|
||||||
|
var apiCommand = "command=detachIso&virtualmachineid="+id;
|
||||||
|
doAction(id, $t, apiCommand, listAPIMap);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Cancel": function() {
|
"Cancel": function() {
|
||||||
@ -206,7 +216,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
$arrowIcon.removeClass("close").addClass("open");
|
$arrowIcon.removeClass("close").addClass("open");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache: false,
|
cache: false,
|
||||||
data: createURL("command=listVirtualMachines&response=json"),
|
data: createURL("command=listVirtualMachines"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var instanceGroupMap = {};
|
var instanceGroupMap = {};
|
||||||
@ -238,7 +248,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache: false,
|
cache: false,
|
||||||
data: createURL("command=listVirtualMachines&response=json"),
|
data: createURL("command=listVirtualMachines"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var instances = json.listvirtualmachinesresponse.virtualmachine;
|
var instances = json.listvirtualmachinesresponse.virtualmachine;
|
||||||
@ -272,21 +282,18 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
$link.data("asyncJobResponse", apiInfo.asyncJobResponse);
|
$link.data("asyncJobResponse", apiInfo.asyncJobResponse);
|
||||||
$link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn);
|
$link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn);
|
||||||
$link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn);
|
$link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn);
|
||||||
$link.data("listAPI", apiInfo.listAPI);
|
|
||||||
$link.data("listAPIResponse", apiInfo.listAPIResponse);
|
|
||||||
$link.data("listAPIResponseObj", apiInfo.listAPIResponseObj);
|
|
||||||
$link.bind("click", function(event) {
|
$link.bind("click", function(event) {
|
||||||
$actionMenu.hide();
|
$actionMenu.hide();
|
||||||
var $t = $(this);
|
var $t = $(this);
|
||||||
var dialogBeforeActionFn = $t.data("dialogBeforeActionFn");
|
var dialogBeforeActionFn = $t.data("dialogBeforeActionFn");
|
||||||
if(dialogBeforeActionFn == null) {
|
if(dialogBeforeActionFn == null) {
|
||||||
for(var id in selectedItemIds) {
|
for(var id in selectedItemIds) {
|
||||||
var apiCommand = "command="+$t.data("api")+"&id="+id+"&response=json";
|
var apiCommand = "command="+$t.data("api")+"&id="+id;
|
||||||
doAction(id, $t, apiCommand);
|
doAction(id, $t, apiCommand, listAPIMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dialogBeforeActionFn($t, selectedItemIds);
|
dialogBeforeActionFn($t, selectedItemIds, listAPIMap);
|
||||||
}
|
}
|
||||||
selectedItemIds = {}; //clear selected items for action
|
selectedItemIds = {}; //clear selected items for action
|
||||||
return false;
|
return false;
|
||||||
@ -321,7 +328,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
$("#add_link").unbind("click").bind("click", function(event) {
|
$("#add_link").unbind("click").bind("click", function(event) {
|
||||||
vmWizardOpen();
|
vmWizardOpen();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=listZones&available=true&response=json"),
|
data: createURL("command=listZones&available=true"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var zones = json.listzonesresponse.zone;
|
var zones = json.listzonesresponse.zone;
|
||||||
@ -336,7 +343,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=listServiceOfferings&response=json"),
|
data: createURL("command=listServiceOfferings"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -369,7 +376,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=listDiskOfferings&domainid=1&response=json"),
|
data: createURL("command=listDiskOfferings&domainid=1"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -561,14 +568,14 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
var searchInput = $vmPopup.find("#search_input").val();
|
var searchInput = $vmPopup.find("#search_input").val();
|
||||||
if (selectedTemplateTypeInVmPopup != "blank") {
|
if (selectedTemplateTypeInVmPopup != "blank") {
|
||||||
if (searchInput != null && searchInput.length > 0)
|
if (searchInput != null && searchInput.length > 0)
|
||||||
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup+"&response=json";
|
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup;
|
||||||
else
|
else
|
||||||
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup+"&response=json";
|
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup;
|
||||||
} else {
|
} else {
|
||||||
if (searchInput != null && searchInput.length > 0)
|
if (searchInput != null && searchInput.length > 0)
|
||||||
commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup+"&response=json";
|
commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup;
|
||||||
else
|
else
|
||||||
commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup+"&response=json";
|
commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
var loading = $vmPopup.find("#wiz_template_loading").show();
|
var loading = $vmPopup.find("#wiz_template_loading").show();
|
||||||
@ -841,7 +848,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
$("#midmenu_container").append($t.show());
|
$("#midmenu_container").append($t.show());
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=deployVirtualMachine"+moreCriteria.join("")+"&response=json"),
|
data: createURL("command=deployVirtualMachine"+moreCriteria.join("")),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var jobId = json.deployvirtualmachineresponse.jobid;
|
var jobId = json.deployvirtualmachineresponse.jobid;
|
||||||
@ -854,7 +861,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
timerKey,
|
timerKey,
|
||||||
function() {
|
function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=queryAsyncJobResult&jobId="+jobId+"&response=json"),
|
data: createURL("command=queryAsyncJobResult&jobId="+jobId),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var result = json.queryasyncjobresultresponse;
|
var result = json.queryasyncjobresultresponse;
|
||||||
|
|||||||
@ -21,15 +21,15 @@
|
|||||||
// Version: @VERSION@
|
// Version: @VERSION@
|
||||||
|
|
||||||
//var jobIdMap;
|
//var jobIdMap;
|
||||||
function doAction(id, $t, apiCommand) {
|
function doAction(id, $t, apiCommand, listAPIMap) {
|
||||||
var api = $t.data("api");
|
var api = $t.data("api");
|
||||||
var label = $t.data("label");
|
var label = $t.data("label");
|
||||||
var isAsyncJob = $t.data("isAsyncJob");
|
var isAsyncJob = $t.data("isAsyncJob");
|
||||||
var asyncJobResponse = $t.data("asyncJobResponse");
|
var asyncJobResponse = $t.data("asyncJobResponse");
|
||||||
var afterActionSeccessFn = $t.data("afterActionSeccessFn");
|
var afterActionSeccessFn = $t.data("afterActionSeccessFn");
|
||||||
var listAPI = $t.data("listAPI");
|
var listAPI = listAPIMap["listAPI"];
|
||||||
var listAPIResponse = $t.data("listAPIResponse");
|
var listAPIResponse = listAPIMap["listAPIResponse"];
|
||||||
var listAPIResponseObj = $t.data("listAPIResponseObj");
|
var listAPIResponseObj = listAPIMap["listAPIResponseObj"];
|
||||||
|
|
||||||
var $midmenuItem = $("#midmenuItemVm_"+id);
|
var $midmenuItem = $("#midmenuItemVm_"+id);
|
||||||
$midmenuItem.find("#content").removeClass("selected").addClass("inaction");
|
$midmenuItem.find("#content").removeClass("selected").addClass("inaction");
|
||||||
@ -49,7 +49,7 @@ function doAction(id, $t, apiCommand) {
|
|||||||
timerKey,
|
timerKey,
|
||||||
function() {
|
function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=queryAsyncJobResult&jobId="+jobId+"&response=json"),
|
data: createURL("command=queryAsyncJobResult&jobId="+jobId),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var result = json.queryasyncjobresultresponse;
|
var result = json.queryasyncjobresultresponse;
|
||||||
@ -67,7 +67,7 @@ function doAction(id, $t, apiCommand) {
|
|||||||
//Before Bug 6041 get fixed, use the temporary solution below.
|
//Before Bug 6041 get fixed, use the temporary solution below.
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache: false,
|
cache: false,
|
||||||
data: createURL("command="+listAPI+"&id="+id+"&response=json"),
|
data: createURL("command="+listAPI+"&id="+id),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -110,7 +110,7 @@ function doAction(id, $t, apiCommand) {
|
|||||||
//Sync job (begin) *****
|
//Sync job (begin) *****
|
||||||
else {
|
else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command="+api+"&id="+id+"&response=json"),
|
data: createURL("command="+api+"&id="+id),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -121,11 +121,17 @@ function doAction(id, $t, apiCommand) {
|
|||||||
//Before Bug 6037 get fixed, use the temporary solution below.
|
//Before Bug 6037 get fixed, use the temporary solution below.
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache: false,
|
cache: false,
|
||||||
data: createURL("command="+listAPI+"&id="+id+"&response=json"),
|
data: createURL("command="+listAPI+"&id="+id),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
|
$midmenuItem.find("#info_icon").removeClass("error").show();
|
||||||
|
$midmenuItem.data("afterActionInfo", (label + " action succeeded."));
|
||||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
|
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
|
||||||
|
},
|
||||||
|
error: function(XMLHttpResponse) {
|
||||||
|
$midmenuItem.find("#info_icon").addClass("error").show();
|
||||||
|
$midmenuItem.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||||
@ -136,7 +142,9 @@ function doAction(id, $t, apiCommand) {
|
|||||||
//Sync job (end) *****
|
//Sync job (end) *****
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createURL(url) {
|
||||||
|
return url +"&response=json&sessionkey=" + g_sessionKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -217,10 +225,6 @@ function isDomainAdmin() {
|
|||||||
return (g_role == 2);
|
return (g_role == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createURL(url) {
|
|
||||||
return url + "&sessionkey=" + g_sessionKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setDateField(dateValue, dateField, htmlMarkup) {
|
function setDateField(dateValue, dateField, htmlMarkup) {
|
||||||
if (dateValue != null && dateValue.length > 0) {
|
if (dateValue != null && dateValue.length > 0) {
|
||||||
var disconnected = new Date();
|
var disconnected = new Date();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user