You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/11/28 14:54:32 UTC
[1/2] git commit: updated refs/heads/4.6 to 399d052
Repository: cloudstack
Updated Branches:
refs/heads/4.6 48ade0537 -> 399d052f8
Add select template dropdown when reinstall VM
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6e5a05d5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6e5a05d5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6e5a05d5
Branch: refs/heads/4.6
Commit: 6e5a05d5c97f96afa656596016fb11df6c222dfb
Parents: 7a77ddc
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Fri Jan 16 13:53:19 2015 +0100
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Sat Nov 21 21:36:09 2015 +0100
----------------------------------------------------------------------
ui/scripts/instances.js | 48 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e5a05d5/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 5096297..56d05a0 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -858,10 +858,56 @@
return null;
}
},
+ createForm: {
+ title: 'label.reinstall.vm',
+ desc: 'message.reinstall.vm',
+ isWarning: true,
+ fields: {
+ template: {
+ label: 'label.select.a.template',
+ select: function(args) {
+ var data = {
+ templatefilter: 'featured'
+ };
+ $.ajax({
+ url: createURL('listTemplates'),
+ data: data,
+ async: false,
+ success: function(json) {
+ var templates = json.listtemplatesresponse.template;
+ var items = [{
+ id: -1,
+ description: ''
+ }];
+ $(templates).each(function() {
+ items.push({
+ id: this.id,
+ description: this.name
+ });
+ });
+ args.response.success({
+ data: items
+ });
+ }
+ });
+ }
+ }
+ }
+ },
action: function(args) {
+ var dataObj = {
+ virtualmachineid: args.context.instances[0].id
+ };
+ if (args.data.template != -1) {
+ $.extend(dataObj, {
+ templateid: args.data.template
+ });
+ }
+
$.ajax({
- url: createURL("restoreVirtualMachine&virtualmachineid=" + args.context.instances[0].id),
+ url: createURL("restoreVirtualMachine"),
+ data: dataObj,
dataType: "json",
async: true,
success: function(json) {
[2/2] git commit: updated refs/heads/4.6 to 399d052
Posted by re...@apache.org.
Merge pull request #1101 from ustcweizhou/add-select-template-dropdown
[4.6] Add select template dropdown when reinstall VM
* pr/1101:
Add select template dropdown when reinstall VM
Signed-off-by: Remi Bergsma <gi...@remi.nl>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/399d052f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/399d052f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/399d052f
Branch: refs/heads/4.6
Commit: 399d052f8d9cfe2dcdb73e92d538a79583ea271a
Parents: 48ade05 6e5a05d
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Nov 28 14:54:10 2015 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Nov 28 14:54:11 2015 +0100
----------------------------------------------------------------------
ui/scripts/instances.js | 48 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------