You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/10/23 21:51:17 UTC
git commit: updated refs/heads/master to 5133812
Updated Branches:
refs/heads/master c3ddd3bf0 -> 5133812c8
CLOUDSTACK-4649: UI > (1) detailView widget: pass $detailView property in action.action({}).
(2) Edit Template action: make 'XenServer Tools Version 6.1+' field editable and use addResourceDetail API to update it.
(3) Edit Instance action: make 'XenServer Tools Version 6.1+' field editable and use addResourceDetail API to update it.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5133812c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5133812c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5133812c
Branch: refs/heads/master
Commit: 5133812c8505ae479b5dcd28b854e953bd60c808
Parents: c3ddd3b
Author: Jessica Wang <je...@apache.org>
Authored: Tue Oct 22 16:14:07 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Oct 23 12:51:08 2013 -0700
----------------------------------------------------------------------
ui/scripts/instances.js | 22 ++++++++++++++++++++--
ui/scripts/templates.js | 19 +++++++++++++++++++
ui/scripts/ui/widgets/detailView.js | 1 +
3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5133812c/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index a791ec0..80f1b90 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -796,13 +796,11 @@
isdynamicallyscalable: (args.data.isdynamicallyscalable == "on"),
ostypeid: args.data.guestosid
};
-
if (args.data.displayname != args.context.instances[0].displayname) {
$.extend(data, {
displayName: args.data.displayname
});
}
-
$.ajax({
url: createURL('updateVirtualMachine'),
data: data,
@@ -813,6 +811,26 @@
});
}
});
+
+
+ //***** addResourceDetail *****
+ //XenServer only (starts here)
+ if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) {
+ $.ajax({
+ url: createURL('addResourceDetail'),
+ data: {
+ resourceType: 'uservm',
+ resourceId: 3,
+ 'details[0].key': 'hypervisortoolsversion',
+ 'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56'
+ },
+ success: function(json) {
+ //do nothing
+ }
+ });
+ }
+ //XenServer only (ends here)
+
}
},
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5133812c/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index d5228c3..2fedd98 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -657,6 +657,25 @@
}
});
+
+ //***** addResourceDetail *****
+ //XenServer only (starts here)
+ if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) {
+ $.ajax({
+ url: createURL('addResourceDetail'),
+ data: {
+ resourceType: 'template',
+ resourceId: 1,
+ 'details[0].key': 'hypervisortoolsversion',
+ 'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56'
+ },
+ success: function(json) {
+ //do nothing
+ }
+ });
+ }
+ //XenServer only (ends here)
+
//***** listTemplates *****
//So, we call listTemplates API to get a complete template object
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5133812c/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 7cbed22..7bb0e13 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -496,6 +496,7 @@
action.action({
data: data,
_custom: $detailView.data('_custom'),
+ $detailView: $detailView,
context: $detailView.data('view-args').context,
response: {
success: function(args) {