mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
new UI - show action in process text
This commit is contained in:
parent
41fc9fd8b0
commit
f1ab608b18
@ -430,6 +430,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
api: "detachVolume",
|
api: "detachVolume",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "detachvolumeresponse",
|
asyncJobResponse: "detachvolumeresponse",
|
||||||
|
inProcessText: "Detaching disk....",
|
||||||
afterActionSeccessFn: function(jsonObj, template){
|
afterActionSeccessFn: function(jsonObj, template){
|
||||||
template.slideUp("slow", function(){
|
template.slideUp("slow", function(){
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
@ -440,6 +441,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "createtemplateresponse",
|
asyncJobResponse: "createtemplateresponse",
|
||||||
dialogBeforeActionFn : doCreateTemplate,
|
dialogBeforeActionFn : doCreateTemplate,
|
||||||
|
inProcessText: "Creating template....",
|
||||||
afterActionSeccessFn: function(){}
|
afterActionSeccessFn: function(){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,8 +181,6 @@ function handleErrorInMidMenu(XMLHttpResponse, $midmenuItem) {
|
|||||||
//***** actions for middle menu (end) **************************************************************************
|
//***** actions for middle menu (end) **************************************************************************
|
||||||
|
|
||||||
//***** actions for right panel (begin) ************************************************************************
|
//***** actions for right panel (begin) ************************************************************************
|
||||||
//var selectedItemsInSingleObject = {};
|
|
||||||
|
|
||||||
function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMap, $singleObject) {
|
function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMap, $singleObject) {
|
||||||
//debugger;
|
//debugger;
|
||||||
var apiInfo = actionMap[label];
|
var apiInfo = actionMap[label];
|
||||||
@ -190,6 +188,7 @@ function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMa
|
|||||||
$actionMenu.find("#action_list").append($listItem.show());
|
$actionMenu.find("#action_list").append($listItem.show());
|
||||||
var $link = $listItem.find("#link").text(label);
|
var $link = $listItem.find("#link").text(label);
|
||||||
$link.data("label", label);
|
$link.data("label", label);
|
||||||
|
$link.data("inProcessText", apiInfo.inProcessText);
|
||||||
$link.data("api", apiInfo.api);
|
$link.data("api", apiInfo.api);
|
||||||
$link.data("isAsyncJob", apiInfo.isAsyncJob);
|
$link.data("isAsyncJob", apiInfo.isAsyncJob);
|
||||||
$link.data("asyncJobResponse", apiInfo.asyncJobResponse);
|
$link.data("asyncJobResponse", apiInfo.asyncJobResponse);
|
||||||
@ -204,15 +203,12 @@ function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMa
|
|||||||
var $actionLink = $(this);
|
var $actionLink = $(this);
|
||||||
var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn");
|
var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn");
|
||||||
if(dialogBeforeActionFn == null) {
|
if(dialogBeforeActionFn == null) {
|
||||||
//for(var id in selectedItemsInSingleObject) {
|
var apiCommand = "command="+$actionLink.data("api")+"&id="+id;
|
||||||
var apiCommand = "command="+$actionLink.data("api")+"&id="+id;
|
doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject);
|
||||||
doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dialogBeforeActionFn($actionLink, listAPIMap, $singleObject);
|
dialogBeforeActionFn($actionLink, listAPIMap, $singleObject);
|
||||||
}
|
}
|
||||||
//selectedItemsInSingleObject = {}; //clear selected items for action
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -220,6 +216,7 @@ function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMa
|
|||||||
function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject) {
|
function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject) {
|
||||||
//debugger;
|
//debugger;
|
||||||
var label = $actionLink.data("label");
|
var label = $actionLink.data("label");
|
||||||
|
var inProcessText = $actionLink.data("inProcessText");
|
||||||
var isAsyncJob = $actionLink.data("isAsyncJob");
|
var isAsyncJob = $actionLink.data("isAsyncJob");
|
||||||
var asyncJobResponse = $actionLink.data("asyncJobResponse");
|
var asyncJobResponse = $actionLink.data("asyncJobResponse");
|
||||||
var afterActionSeccessFn = $actionLink.data("afterActionSeccessFn");
|
var afterActionSeccessFn = $actionLink.data("afterActionSeccessFn");
|
||||||
@ -228,7 +225,7 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single
|
|||||||
var listAPIResponseObj = listAPIMap["listAPIResponseObj"];
|
var listAPIResponseObj = listAPIMap["listAPIResponseObj"];
|
||||||
|
|
||||||
var $spinningWheel = $singleObject.find("#spinning_wheel");
|
var $spinningWheel = $singleObject.find("#spinning_wheel");
|
||||||
$spinningWheel.find("#description").text(label + "....");
|
$spinningWheel.find("#description").text(inProcessText);
|
||||||
$spinningWheel.show();
|
$spinningWheel.show();
|
||||||
|
|
||||||
//Async job (begin) *****
|
//Async job (begin) *****
|
||||||
|
|||||||
@ -46,12 +46,14 @@ var volumeActionMap = {
|
|||||||
api: "detachVolume",
|
api: "detachVolume",
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "detachvolumeresponse",
|
asyncJobResponse: "detachvolumeresponse",
|
||||||
|
inProcessText: "Detaching disk....",
|
||||||
afterActionSeccessFn: function(){}
|
afterActionSeccessFn: function(){}
|
||||||
},
|
},
|
||||||
"Create Template": {
|
"Create Template": {
|
||||||
isAsyncJob: true,
|
isAsyncJob: true,
|
||||||
asyncJobResponse: "createtemplateresponse",
|
asyncJobResponse: "createtemplateresponse",
|
||||||
dialogBeforeActionFn : doCreateTemplate,
|
dialogBeforeActionFn : doCreateTemplate,
|
||||||
|
inProcessText: "Creating template....",
|
||||||
afterActionSeccessFn: function(){}
|
afterActionSeccessFn: function(){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user