Updated Branches: refs/heads/ui-ucs 7d1c46baa -> b5fd39c0e
CLOUDSTACK - UCS - UI - add Associate Profile to Blade action in listView of blades. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b5fd39c0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b5fd39c0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b5fd39c0 Branch: refs/heads/ui-ucs Commit: b5fd39c0e4e8d47b101c9ce9f0da3dfd99da19cd Parents: 7d1c46b Author: Jessica Wang <jessicaw...@apache.org> Authored: Fri May 17 16:25:00 2013 -0700 Committer: Jessica Wang <jessicaw...@apache.org> Committed: Fri May 17 16:25:00 2013 -0700 ---------------------------------------------------------------------- ui/scripts/system.js | 61 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 60 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b5fd39c0/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index bcbab75..85686b4 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -11009,8 +11009,67 @@ { fieldA: 'fieldA2', fieldB: 'fieldB2' } ] }); + }, + actions: { + associateProfileToBlade: { + label: 'associate profile to blade', + messages: { + notification: function(args) { + return 'associate profile to blade'; + } + }, + createForm: { + title: 'associate profile to blade', + fields: { + profiledn: { + label: 'profile', + select: function(args) { + var items = []; + + /* + $.ajax({ + url: createURL('listUcsProfile'), + data: { + ucsmanagerid: args.context.ucsManagers[0].id + }, + success: function(json) { + + } + }); + */ + + items.push({id: 'aaa', description: 'aaa'}); + items.push({id: 'bbb', description: 'bbb'}); + args.response.success({data: items}); + }, + validation: { required: true } + } + } + }, + action: function(args) { + /* + $.ajax({ + url: createURL('associatesUscProfileToBlade'), + data: { + ucsmanagerid: args.context.ucsManagers[0].id, + profiledn: args.data.profiledn, + bladeid: '1234567890' //to change later + }, + success: function(json) { + + } + }); + */ + args.response.success(); + }, + notification: { + poll: function(args) { + args.complete(); + } + } + } }, - + detailView: { name: 'blade details', actions: {