mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2844: VPC UI: Disable LB links if not supported on tier
This commit is contained in:
parent
bea3f44144
commit
5c6017e2ec
|
|
@ -154,6 +154,15 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.vpc-network-chart .tier-item .content .dashboard-item.disabled {
|
||||
/*+opacity:50%;*/
|
||||
filter: alpha(opacity=50);
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
|
||||
-moz-opacity: 0.5;
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.vpc-network-chart .tier-item .content .dashboard-item:hover {
|
||||
background-color: #DBEDFE;
|
||||
/*+box-shadow:inset 0px 1px 2px #000000;*/
|
||||
|
|
@ -271,6 +280,8 @@
|
|||
float: left;
|
||||
/*+placement:shift 10px 176px;*/
|
||||
position: relative;
|
||||
left: 10px;
|
||||
top: 176px;
|
||||
left: 0px;
|
||||
top: 237px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,15 @@
|
|||
$dashboardItem.append($total, $name);
|
||||
$dashboardItem.appendTo($dashboard);
|
||||
|
||||
if (dashboardItem._disabled) {
|
||||
$dashboardItem.addClass('disabled');
|
||||
}
|
||||
|
||||
$dashboardItem.click(function() {
|
||||
if ($dashboardItem.is('.disabled')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var section = cloudStack.vpc.sections[id];
|
||||
var $section = $('<div>');
|
||||
var $loading = $('<div>').addClass('loading-overlay');
|
||||
|
|
|
|||
|
|
@ -3482,17 +3482,41 @@
|
|||
}
|
||||
).length ? tier._highlighted = true : tier._highlighted = false;
|
||||
|
||||
// Get LB capabilities
|
||||
var lbSchemes = $.grep(
|
||||
$.grep(
|
||||
tier.service,
|
||||
function(service) {
|
||||
return service.name == 'Lb';
|
||||
}
|
||||
)[0].capability,
|
||||
function(capability) {
|
||||
return capability.name == 'LbSchemes';
|
||||
}
|
||||
);
|
||||
|
||||
var hasLbScheme = function(schemeVal) {
|
||||
return $.grep(
|
||||
lbSchemes,
|
||||
function(scheme) {
|
||||
return scheme.value == schemeVal;
|
||||
}
|
||||
).length ? true : false;
|
||||
};
|
||||
|
||||
return $.extend(tier, {
|
||||
_dashboardItems: [
|
||||
{
|
||||
id: 'internalLoadBalancers',
|
||||
name: 'Internal LB',
|
||||
total: internalLoadBalancers.count
|
||||
total: internalLoadBalancers.count,
|
||||
_disabled: !hasLbScheme('Internal')
|
||||
},
|
||||
{
|
||||
id: 'publicLbIps',
|
||||
name: 'Public LB IP',
|
||||
total: publicLbIps.count
|
||||
total: publicLbIps.count,
|
||||
_disabled: !hasLbScheme('Public')
|
||||
},
|
||||
{
|
||||
id: 'tierStaticNATs',
|
||||
|
|
|
|||
Loading…
Reference in New Issue