mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudStack 3.0 new UI - zone chart - F5 device - implement Delete action.
This commit is contained in:
parent
c3588083f6
commit
c962af67bc
@ -37,7 +37,8 @@ var pollAsyncJobResult = function(args) {
|
|||||||
var result = json.queryasyncjobresultresponse;
|
var result = json.queryasyncjobresultresponse;
|
||||||
if (result.jobstatus == 0) {
|
if (result.jobstatus == 0) {
|
||||||
return; //Job has not completed
|
return; //Job has not completed
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (result.jobstatus == 1) { // Succeeded
|
if (result.jobstatus == 1) { // Succeeded
|
||||||
if(args._custom.getUpdatedItem != null && args._custom.getActionFilter != null) {
|
if(args._custom.getUpdatedItem != null && args._custom.getActionFilter != null) {
|
||||||
args.complete({
|
args.complete({
|
||||||
@ -54,8 +55,9 @@ var pollAsyncJobResult = function(args) {
|
|||||||
args.complete();
|
args.complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (result.jobstatus == 2) { // Failed
|
else if (result.jobstatus == 2) { // Failed
|
||||||
args.error({message:result.jobresult.errortext});
|
var msg = (result.jobresult.errortext == null)? "": result.jobresult.errortext;
|
||||||
|
args.error({message: msg});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1446,7 +1446,44 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
detailView: {
|
detailView: {
|
||||||
name: 'F5 details',
|
name: 'F5 details',
|
||||||
|
actions: {
|
||||||
|
'delete': {
|
||||||
|
label: 'Delete F5',
|
||||||
|
messages: {
|
||||||
|
confirm: function(args) {
|
||||||
|
return 'Are you sure you want to delete this F5?';
|
||||||
|
},
|
||||||
|
success: function(args) {
|
||||||
|
return 'F5 is being deleted.';
|
||||||
|
},
|
||||||
|
notification: function(args) {
|
||||||
|
return 'Deleting F5';
|
||||||
|
},
|
||||||
|
complete: function(args) {
|
||||||
|
return 'F5 has been deleted.';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
action: function(args) {
|
||||||
|
$.ajax({
|
||||||
|
url: createURL("deleteF5LoadBalancer&lbdeviceid=" + args.context.f5Providers[0].lbdeviceid),
|
||||||
|
dataType: "json",
|
||||||
|
async: true,
|
||||||
|
success: function(json) {
|
||||||
|
var jid = json.deletef5loadbalancerresponse.jobid;
|
||||||
|
args.response.success(
|
||||||
|
{_custom:
|
||||||
|
{jobId: jid}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
notification: {
|
||||||
|
poll: pollAsyncJobResult
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
tabs: {
|
tabs: {
|
||||||
details: {
|
details: {
|
||||||
title: 'Details',
|
title: 'Details',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user