From 2756b0fdcc1b810fbc4c674b9673ec0e94db482e Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 8 Feb 2012 19:43:05 -0800 Subject: [PATCH] bug 13461: deployVM wizard - select ISO step - split one tab (All ISOs) to three tabs (Featured ISOs, Community ISOs, My ISOs) --- ui/index.jsp | 25 ++++++++++++++-- ui/scripts/instances.js | 41 ++++++++++++++++++++++++-- ui/scripts/ui-custom/instanceWizard.js | 8 +++-- 3 files changed, 66 insertions(+), 8 deletions(-) diff --git a/ui/index.jsp b/ui/index.jsp index 93a4b16148d..9eb2d2c6d46 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -139,15 +139,34 @@ You can also choose to upload your own iso as well.

-
-
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index ef574c0d727..66a5e8aee4d 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1,6 +1,6 @@ (function($, cloudStack) { - var zoneObjs, hypervisorObjs, featuredTemplateObjs, communityTemplateObjs, myTemplateObjs, isoObjs, serviceOfferingObjs, diskOfferingObjs, networkOfferingObjs; + var zoneObjs, hypervisorObjs, featuredTemplateObjs, communityTemplateObjs, myTemplateObjs, featuredIsoObjs, communityIsoObjs, myIsoObjs, serviceOfferingObjs, diskOfferingObjs, networkOfferingObjs; var selectedZoneObj, selectedTemplateObj, selectedHypervisor, selectedDiskOfferingObj; var step5ContainerType = 'nothing-to-select'; //'nothing-to-select', 'select-network', 'select-security-group' @@ -110,6 +110,36 @@ } }); + //??? + $.ajax({ + url: createURL("listIsos&isofilter=featured&zoneid="+args.currentData.zoneid), + dataType: "json", + async: false, + success: function(json) { + featuredIsoObjs = json.listisosresponse.iso; + } + }); + + $.ajax({ + url: createURL("listIsos&isofilter=community&zoneid="+args.currentData.zoneid), + dataType: "json", + async: false, + success: function(json) { + communityIsoObjs = json.listisosresponse.iso; + } + }); + + $.ajax({ + url: createURL("listIsos&isofilter=selfexecutable&zoneid="+args.currentData.zoneid), + dataType: "json", + async: false, + success: function(json) { + myIsoObjs = json.listisosresponse.iso; + } + }); + //??? + + /* $.ajax({ url: createURL("listIsos&isReady=true&bootable=true&isofilter=executable&zoneid="+args.currentData.zoneid), dataType: "json", @@ -118,7 +148,8 @@ isoObjs = json.listisosresponse.iso; } }); - + */ + args.response.success({ hypervisor: { idField: 'name', @@ -129,7 +160,11 @@ featuredtemplates: featuredTemplateObjs, communitytemplates: communityTemplateObjs, mytemplates: myTemplateObjs, - isos: isoObjs + + featuredisos: featuredIsoObjs, + communityisos: communityIsoObjs, + myisos: myIsoObjs //??? + //isos: isoObjs }, hypervisors: hypervisorObjs } diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index 68bac444b8c..49943f3044c 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -218,7 +218,7 @@ 'wizard-field': 'template' }); - if (type == 'isos') { + if (type == 'featuredisos' || type == 'communityisos' || type == 'myisos') { // Create hypervisor select $selects.find('input').bind('click', function() { var $select = $(this).closest('.select'); @@ -251,7 +251,11 @@ ['featuredtemplates', 'instance-wizard-featured-templates'], ['communitytemplates', 'instance-wizard-community-templates'], ['mytemplates', 'instance-wizard-my-templates'], - ['isos', 'instance-wizard-all-isos'] + + ['featuredisos', 'instance-wizard-featured-isos'], + ['communityisos', 'instance-wizard-community-isos'], + ['myisos', 'instance-wizard-my-isos'] + //['isos', 'instance-wizard-all-isos'] ] ).each(function() { var item = this;