From 15e2f025bc0f72bb0d2d03cf4325a8c4323f18a7 Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Mon, 6 May 2013 10:31:13 +0530 Subject: [PATCH] Cluster/Pod/Host Explicit Dedication front end UI --- ui/scripts/docs.js | 17 +++++ ui/scripts/system.js | 144 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 160 insertions(+), 1 deletion(-) diff --git a/ui/scripts/docs.js b/ui/scripts/docs.js index 4a70ca1df7f..48db443f7a8 100755 --- a/ui/scripts/docs.js +++ b/ui/scripts/docs.js @@ -16,6 +16,23 @@ // under the License. cloudStack.docs = { + //Dedicate Resource + + helpDedicateResource:{ + + desc:'Check this box to dedicate the resources to specific domain/account', + externalLink:'' + + }, + + helpAccountForDedication:{ + + desc:'Please enter an account name which belongs to the above selected domain in order to dedicate this resource to this account', + externalLink:'' + + }, + + //Delete/archive events helpEventsDeleteType:{ diff --git a/ui/scripts/system.js b/ui/scripts/system.js index f2017cd948f..8a2be83354a 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7982,7 +7982,54 @@ label: 'label.end.reserved.system.IP', docID: 'helpPodEndIP', validation: { required: false } + }, + + isDedicated:{ + label:'Dedicate', + isBoolean:true, + isChecked:false, + docID:'helpDedicateResource' + + + }, + + domainId:{ + label:'Domain', + isHidden:true, + validation:{required:true}, + dependsOn:'isDedicated', + select:function(args){ + $.ajax({ + url:createURL("listDomains&listAll=true"), + dataType:"json", + async:false, + success: function(json) { + var domainObjs= json.listdomainsresponse.domain; + var items=[]; + + $(domainObjs).each(function() { + items.push({id:this.id ,description:this.name }); + }); + + args.response.success({ + data: items + }); + } + + + }); + } + }, + + accountId:{ + label:'Account', + isHidden:true, + dependsOn:'isDedicated', + docID:'helpAccountForDedication', + validation:{required:false} + } + } }, @@ -8480,8 +8527,55 @@ }, - //hypervisor==VMWare begins here + + isDedicated:{ + label:'Dedicate', + isBoolean:true, + isChecked:false, + docID:'helpDedicateResource' + + }, + + domainId:{ + label:'Domain', + isHidden:true, + validation:{required:true}, + dependsOn:'isDedicated', + select:function(args){ + $.ajax({ + url:createURL("listDomains&listAll=true"), + dataType:"json", + async:false, + success: function(json) { + var domainObjs= json.listdomainsresponse.domain; + var items=[]; + + $(domainObjs).each(function() { + items.push({id:this.id ,description:this.name }); + }); + + args.response.success({ + data: items + }); + } + + + }); + } + }, + + accountId:{ + label:'Account', + isHidden:true, + dependsOn:'isDedicated', + docID:'helpAccountForDedication', + validation:{required:false} + + }, + + //hypervisor==VMWare begins here + vCenterHost: { label: 'label.vcenter.host', docID: 'helpClustervCenterHost', @@ -9469,7 +9563,55 @@ validation: { required: true }, isHidden: true, isPassword: true + }, + + isDedicated:{ + label:'Dedicate', + isBoolean:true, + isChecked:false, + docID:'helpDedicateResource' + + + }, + + domainId:{ + label:'Domain', + isHidden:true, + validation:{required:true}, + dependsOn:'isDedicated', + select:function(args){ + $.ajax({ + url:createURL("listDomains&listAll=true"), + dataType:"json", + async:false, + success: function(json) { + var domainObjs= json.listdomainsresponse.domain; + var items=[]; + + $(domainObjs).each(function() { + items.push({id:this.id ,description:this.name }); + }); + + args.response.success({ + data: items + }); + } + + + }); + + } + }, + + accountId:{ + label:'Account', + isHidden:true, + dependsOn:'isDedicated', + docID:'helpAccountForDedication', + validation:{required:false} + }, + //input_group="general" ends here //input_group="VMWare" starts here