Skip to content

Commit 18ce415

Browse files
committed
UI: Add domain column to list views and fix VPC/network form issues
1 parent c76c01e commit 18ce415

14 files changed

Lines changed: 108 additions & 28 deletions

File tree

‎api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayByAdminCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class CreatePrivateGatewayByAdminCmd extends CreatePrivateGatewayCmd impl
4747
description = "The Physical Network ID the network belongs to")
4848
private Long physicalNetworkId;
4949

50-
@Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The network implementation uri for the private gateway")
50+
@Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The network implementation uri for the private gateway. Can't be specified along with associatednetworkid")
5151
private String broadcastUri;
5252

5353
@Parameter(name = ApiConstants.BYPASS_VLAN_OVERLAP_CHECK, type = CommandType.BOOLEAN, description = "When true bypasses VLAN id/range overlap check during private gateway creation")

‎ui/src/config/section/compute.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ export default {
8383
fields.splice(2, 0, 'instancename')
8484
fields.push('hostname')
8585
fields.push('account')
86+
fields.push('domain')
8687
} else if (store.getters.userInfo.roletype === 'DomainAdmin') {
8788
fields.push('account')
89+
fields.push('domain')
8890
} else {
8991
fields.push('serviceofferingname')
9092
}
@@ -582,6 +584,7 @@ export default {
582584
var fields = ['name', 'state', 'clustertype', 'size', 'cpunumber', 'memory', 'kubernetesversionname']
583585
if (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) {
584586
fields.push('account')
587+
fields.push('domain')
585588
}
586589
if (store.listAllProjects) {
587590
fields.push('project')
@@ -897,6 +900,9 @@ export default {
897900
searchFilters: ['name', 'zoneid', 'domainid', 'account'],
898901
columns: (store) => {
899902
var fields = ['name', 'state', 'associatednetworkname', 'publicip', 'publicport', 'privateport', 'minmembers', 'maxmembers', 'availablevirtualmachinecount', 'account']
903+
if (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) {
904+
fields.push('domain')
905+
}
900906
if (store.listAllProjects) {
901907
fields.push('project')
902908
}

‎ui/src/config/section/image.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default {
4848
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
4949
fields.push('size')
5050
fields.push('account')
51+
fields.push('domain')
5152
}
5253
if (store.getters.listAllProjects) {
5354
fields.push('project')
@@ -225,6 +226,7 @@ export default {
225226
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
226227
fields.push('size')
227228
fields.push('account')
229+
fields.push('domain')
228230
}
229231
if (store.getters.listAllProjects) {
230232
fields.push('project')

‎ui/src/config/section/storage.js‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ export default {
5454
if (store.getters.userInfo.roletype === 'Admin') {
5555
fields.push('storage')
5656
fields.push('account')
57+
fields.push('domain')
5758
} else if (store.getters.userInfo.roletype === 'DomainAdmin') {
5859
fields.push('account')
60+
fields.push('domain')
5961
}
6062
if (store.getters.listAllProjects) {
6163
fields.push('project')
@@ -625,7 +627,18 @@ export default {
625627
title: 'label.buckets',
626628
icon: 'funnel-plot-outlined',
627629
permission: ['listBuckets'],
628-
columns: ['name', 'state', 'objectstore', 'size', 'account'],
630+
columns: () => {
631+
var fields = ['name', 'state', 'objectstore', 'size', 'account']
632+
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
633+
if (store.getters.listAllProjects) {
634+
fields.push('project')
635+
}
636+
fields.push('domain')
637+
} else if (store.getters.listAllProjects) {
638+
fields.push('project')
639+
}
640+
return fields
641+
},
629642
details: ['id', 'name', 'state', 'objectstore', 'size', 'url', 'accesskey', 'usersecretkey', 'account', 'domain', 'created', 'quota', 'encryption', 'versioning', 'objectlocking', 'policy'],
630643
tabs: [
631644
{
@@ -695,8 +708,10 @@ export default {
695708
if (store.getters.userInfo.roletype === 'Admin') {
696709
fields.push('storage')
697710
fields.push('account')
711+
fields.push('domain')
698712
} else if (store.getters.userInfo.roletype === 'DomainAdmin') {
699713
fields.push('account')
714+
fields.push('domain')
700715
}
701716
if (store.getters.listAllProjects) {
702717
fields.push('project')

‎ui/src/style/ant-overwrite/ant-form.less‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@
2626
.ant-select-open .ant-select-arrow .ant-select-suffix:not(.anticon-search) svg {
2727
transform: rotateZ(-180deg);
2828
}
29+
30+
// Wrap long option labels instead of truncating them with an ellipsis
31+
.ant-select-dropdown.select-wrap-options .ant-select-item-option-content {
32+
white-space: normal;
33+
word-break: break-word;
34+
}

‎ui/src/views/network/CreateIsolatedNetworkForm.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@
9191
}"
9292
:loading="networkOfferingLoading"
9393
:placeholder="apiParams.networkofferingid.description"
94+
dropdownClassName="select-wrap-options"
9495
@change="val => { handleNetworkOfferingChange(networkOfferings[val]) }">
95-
<a-select-option v-for="(opt, optIndex) in networkOfferings" :key="optIndex" :label="opt.displaytext || opt.name || opt.description">
96+
<a-select-option v-for="(opt, optIndex) in networkOfferings" :key="optIndex" :label="opt.displaytext || opt.name || opt.description" :title="opt.displaytext || opt.name || opt.description">
9697
{{ opt.displaytext || opt.name || opt.description }}
9798
</a-select-option>
9899
</a-select>

‎ui/src/views/network/CreateL2NetworkForm.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@
8787
}"
8888
:loading="networkOfferingLoading"
8989
:placeholder="apiParams.networkofferingid.description"
90+
dropdownClassName="select-wrap-options"
9091
@change="val => { handleNetworkOfferingChange(networkOfferings[val]) }">
91-
<a-select-option v-for="(opt, optIndex) in networkOfferings" :key="optIndex" :label="opt.displaytext || opt.name || opt.description">
92+
<a-select-option v-for="(opt, optIndex) in networkOfferings" :key="optIndex" :label="opt.displaytext || opt.name || opt.description" :title="opt.displaytext || opt.name || opt.description">
9293
{{ opt.displaytext || opt.name || opt.description }}
9394
</a-select-option>
9495
</a-select>

‎ui/src/views/network/CreateSharedNetworkForm.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@
234234
}"
235235
:loading="networkOfferingLoading"
236236
:placeholder="apiParams.networkofferingid.description"
237+
dropdownClassName="select-wrap-options"
237238
@change="val => { handleNetworkOfferingChange(networkOfferings[val]) }">
238-
<a-select-option v-for="(opt, optIndex) in networkOfferings" :key="optIndex" :label="opt.displaytext || opt.name || opt.description">
239+
<a-select-option v-for="(opt, optIndex) in networkOfferings" :key="optIndex" :label="opt.displaytext || opt.name || opt.description" :title="opt.displaytext || opt.name || opt.description">
239240
{{ opt.displaytext || opt.name || opt.description }}
240241
</a-select-option>
241242
</a-select>

‎ui/src/views/network/CreateVpc.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@
102102
:filterOption="(input, option) => {
103103
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
104104
}"
105+
dropdownClassName="select-wrap-options"
105106
@change="handleVpcOfferingChange" >
106-
<a-select-option :value="offering.id" v-for="offering in vpcOfferings" :key="offering.id" :label="offering.name">
107+
<a-select-option :value="offering.id" v-for="offering in vpcOfferings" :key="offering.id" :label="offering.name" :title="offering.name">
107108
{{ offering.name }}
108109
</a-select-option>
109110
</a-select>

‎ui/src/views/network/PortForwarding.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
</router-link>
125125
</template>
126126
<template v-if="column.key === 'vm'">
127-
<div><desktop-outlined/>
127+
<div><desktop-outlined/>&nbsp;
128128
<router-link
129129
:to="{ path: '/vm/' + record.virtualmachineid }">
130130
{{ record.virtualmachinename }}</router-link> ({{ record.vmguestip }})</div>

0 commit comments

Comments
 (0)