bug 13461: deployVM wizard - select ISO step - split one tab (All ISOs) to three tabs (Featured ISOs, Community ISOs, My ISOs)

This commit is contained in:
Jessica Wang 2012-02-08 19:43:05 -08:00
parent 05af078358
commit 2756b0fdcc
3 changed files with 66 additions and 8 deletions

View File

@ -139,15 +139,34 @@
You can also choose to upload your own iso as well.
</p>
</div>
<div class="iso-select content tab-view">
<ul>
<div class="iso-select content tab-view">
<ul>
<li class="first"><a href="#instance-wizard-featured-isos">Featured</a></li>
<li><a href="#instance-wizard-community-isos">Community</a></li>
<li class="last"><a href="#instance-wizard-my-isos">My ISO</a></li>
</ul>
<div id="instance-wizard-featured-isos">
<div class="select-container">
</div>
</div>
<div id="instance-wizard-community-isos">
<div class="select-container">
</div>
</div>
<div id="instance-wizard-my-isos">
<div class="select-container">
</div>
</div>
<!--
<ul>
<li class="first last"><a href="#instance-wizard-all-isos">All ISOs</a></li>
</ul>
<div id="instance-wizard-all-isos">
<div class="select-container">
</div>
</div>
-->
</div>
</div>
</div>

View File

@ -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
}

View File

@ -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;