Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x

This commit is contained in:
Vijayendra Bhamidipati 2012-07-26 18:27:55 -04:00
commit 1e9c5c54df
3 changed files with 35 additions and 5 deletions

View File

@ -378,10 +378,12 @@ public class RulesManagerImpl implements RulesManager, RulesService, Manager {
}
@Override
@ActionEvent(eventType = EventTypes.EVENT_ENABLE_STATIC_NAT, eventDescription = "enabling static nat")
public boolean enableStaticNat(long ipId, long vmId, long networkId, boolean isSystemVm)
throws NetworkRuleConflictException, ResourceUnavailableException {
UserContext ctx = UserContext.current();
Account caller = ctx.getCaller();
UserContext.current().setEventDetails("Ip Id: " + ipId);
Object vmIdentity = null;
// Verify input parameters
@ -1170,6 +1172,7 @@ public class RulesManagerImpl implements RulesManager, RulesService, Manager {
}
@Override
@ActionEvent(eventType = EventTypes.EVENT_DISABLE_STATIC_NAT, eventDescription = "disabling static nat", async=true)
public boolean disableStaticNat(long ipId) throws ResourceUnavailableException, NetworkRuleConflictException, InsufficientAddressCapacityException {
UserContext ctx = UserContext.current();
Account caller = ctx.getCaller();

View File

@ -9473,17 +9473,22 @@ div.panel.ui-dialog div.list-view div.fixed-header {
.vpc-chart li.tier .vm-count .loading-overlay {
display: none;
width: 18px;
height: 18px;
width: 24px;
height: 24px;
position: absolute;
left: 94px;
top: 9px;
left: 15px;
top: 7px;
/*+border-radius:12px;*/
-moz-border-radius: 12px;
-webkit-border-radius: 12px;
-khtml-border-radius: 12px;
border-radius: 12px;
background-image: url(../images/ajax-loader-small.gif);
/*+opacity:100%;*/
filter: alpha(opacity=100);
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
-moz-opacity: 1;
opacity: 1;
}
.vpc-chart li.tier.loading .vm-count .loading-overlay {

View File

@ -160,6 +160,23 @@
sectionSelect: {
preFilter: function(args) {
var havingSecurityGroupNetwork = false;
var havingBasicZones = false;
// Get basic zones
$.ajax({
url: createURL('listZones'),
async: false,
success: function(json) {
var zones = json.listzonesresponse.zone ?
json.listzonesresponse.zone : [];
var basicZones = $.grep(zones, function(zone) {
return zone.networktype == 'Basic';
});
havingBasicZones = basicZones.length ? true : false;
}
});
$.ajax({
url: createURL('listNetworks', { ignoreProject: true }),
data: {
@ -174,7 +191,12 @@
}
});
var sectionsToShow = ['networks', 'vpc', 'vpnCustomerGateway'];
var sectionsToShow = ['networks', 'vpnCustomerGateway'];
if (!havingBasicZones) {
sectionsToShow.push('vpc');
}
if(havingSecurityGroupNetwork == true)
sectionsToShow.push('securityGroups');