mirror of https://github.com/apache/cloudstack.git
Add domainpath to listnetwork and UI network tab (#7386)
This commit is contained in:
parent
0c14e4603d
commit
3486a3c310
|
|
@ -163,6 +163,10 @@ public class NetworkResponse extends BaseResponseWithAssociatedNetwork implement
|
||||||
@Param(description = "the domain name of the network owner")
|
@Param(description = "the domain name of the network owner")
|
||||||
private String domain;
|
private String domain;
|
||||||
|
|
||||||
|
@SerializedName(ApiConstants.DOMAIN_PATH)
|
||||||
|
@Param(description = "path of the Domain the network belongs to", since = "4.19.0.0")
|
||||||
|
private String domainPath;
|
||||||
|
|
||||||
@SerializedName("isdefault")
|
@SerializedName("isdefault")
|
||||||
@Param(description = "true if network is default, false otherwise")
|
@Param(description = "true if network is default, false otherwise")
|
||||||
private Boolean isDefault;
|
private Boolean isDefault;
|
||||||
|
|
@ -420,6 +424,10 @@ public class NetworkResponse extends BaseResponseWithAssociatedNetwork implement
|
||||||
this.domain = domain;
|
this.domain = domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDomainPath(String domainPath) {
|
||||||
|
this.domainPath = domainPath;
|
||||||
|
}
|
||||||
|
|
||||||
public void setNetworkOfferingAvailability(String networkOfferingAvailability) {
|
public void setNetworkOfferingAvailability(String networkOfferingAvailability) {
|
||||||
this.networkOfferingAvailability = networkOfferingAvailability;
|
this.networkOfferingAvailability = networkOfferingAvailability;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2572,6 +2572,10 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||||
Domain domain = ApiDBUtils.findDomainById(domainNetworkDetails.first());
|
Domain domain = ApiDBUtils.findDomainById(domainNetworkDetails.first());
|
||||||
if (domain != null) {
|
if (domain != null) {
|
||||||
response.setDomainId(domain.getUuid());
|
response.setDomainId(domain.getUuid());
|
||||||
|
|
||||||
|
StringBuilder domainPath = new StringBuilder("ROOT");
|
||||||
|
(domainPath.append(domain.getPath())).deleteCharAt(domainPath.length() - 1);
|
||||||
|
response.setDomainPath(domainPath.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response.setSubdomainAccess(domainNetworkDetails.second());
|
response.setSubdomainAccess(domainNetworkDetails.second());
|
||||||
|
|
|
||||||
|
|
@ -34,20 +34,20 @@ export default {
|
||||||
permission: ['listNetworks'],
|
permission: ['listNetworks'],
|
||||||
resourceType: 'Network',
|
resourceType: 'Network',
|
||||||
columns: () => {
|
columns: () => {
|
||||||
var fields = ['name', 'state', 'type', 'vpcname', 'cidr', 'ip6cidr', 'broadcasturi', 'account', 'domain', 'zonename']
|
var fields = ['name', 'state', 'type', 'vpcname', 'cidr', 'ip6cidr', 'broadcasturi', 'domainpath', 'account', 'zonename']
|
||||||
if (!isAdmin()) {
|
if (!isAdmin()) {
|
||||||
fields = fields.filter(function (e) { return e !== 'broadcasturi' })
|
fields = fields.filter(function (e) { return e !== 'broadcasturi' })
|
||||||
}
|
}
|
||||||
return fields
|
return fields
|
||||||
},
|
},
|
||||||
details: () => {
|
details: () => {
|
||||||
var fields = ['name', 'id', 'description', 'type', 'traffictype', 'vpcid', 'vlan', 'broadcasturi', 'cidr', 'ip6cidr', 'netmask', 'gateway', 'aclname', 'ispersistent', 'restartrequired', 'reservediprange', 'redundantrouter', 'networkdomain', 'egressdefaultpolicy', 'zonename', 'account', 'domain', 'associatednetwork', 'associatednetworkid', 'ip6firewall', 'ip6routing', 'ip6routes', 'dns1', 'dns2', 'ip6dns1', 'ip6dns2', 'publicmtu', 'privatemtu']
|
var fields = ['name', 'id', 'description', 'type', 'traffictype', 'vpcid', 'vlan', 'broadcasturi', 'cidr', 'ip6cidr', 'netmask', 'gateway', 'aclname', 'ispersistent', 'restartrequired', 'reservediprange', 'redundantrouter', 'networkdomain', 'egressdefaultpolicy', 'zonename', 'account', 'domainpath', 'associatednetwork', 'associatednetworkid', 'ip6firewall', 'ip6routing', 'ip6routes', 'dns1', 'dns2', 'ip6dns1', 'ip6dns2', 'publicmtu', 'privatemtu']
|
||||||
if (!isAdmin()) {
|
if (!isAdmin()) {
|
||||||
fields = fields.filter(function (e) { return e !== 'broadcasturi' })
|
fields = fields.filter(function (e) { return e !== 'broadcasturi' })
|
||||||
}
|
}
|
||||||
return fields
|
return fields
|
||||||
},
|
},
|
||||||
filters: ['all', 'account', 'domain', 'shared'],
|
filters: ['all', 'account', 'domainpath', 'shared'],
|
||||||
searchFilters: ['keyword', 'zoneid', 'domainid', 'account', 'type', 'tags'],
|
searchFilters: ['keyword', 'zoneid', 'domainid', 'account', 'type', 'tags'],
|
||||||
related: [{
|
related: [{
|
||||||
name: 'vm',
|
name: 'vm',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue