Add "action:" section
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c3a09576 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c3a09576 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c3a09576 Branch: refs/heads/sf-plugins Commit: c3a0957689099396b919a25b4570c60139085a98 Parents: 6393542 Author: Mike Tutkowski <[email protected]> Authored: Tue Jul 7 12:40:14 2015 -0600 Committer: Mike Tutkowski <[email protected]> Committed: Fri Sep 18 19:28:18 2015 -0600 ---------------------------------------------------------------------- ui/plugins/sfSharedVolume/sfSharedVolume.js | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3a09576/ui/plugins/sfSharedVolume/sfSharedVolume.js ---------------------------------------------------------------------- diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js index 99ad905..c0d9fbe 100644 --- a/ui/plugins/sfSharedVolume/sfSharedVolume.js +++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js @@ -82,7 +82,30 @@ } } } - } + }, + action: function(args) { + $.ajax({ + url: createURL('createVolume'), + data: data, + success: function(json) { + var jid = json.createvolumeresponse.jobid; + args.response.success({ + _custom: { + jobId: jid, + getUpdatedItem: function(json) { + return json.queryasyncjobresultresponse.jobresult.volume; + }, + getActionFilter: function() { + return volumeActionfilter; + } + } + }); + }, + error: function(json) { + args.response.error(parseXMLHttpResponse(json)); + } + }); + } } }, detailView: {
