Add CIDR next to the network name (#729)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Hoang Nguyen 2020-09-21 18:31:23 +07:00 committed by Rohit Yadav
parent 1ecd6dc3df
commit 8e870f6b58
1 changed files with 5 additions and 2 deletions

View File

@ -277,11 +277,14 @@
]"
:placeholder="nic.networkDescription"
:filterOption="(input, option) => {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
return option.componentOptions.children[0].children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}"
>
<a-select-option v-for="opt in options.networks" :key="opt.id">
{{ opt.name || opt.description }}
<span v-if="opt.type!=='L2'">
{{ opt.name || opt.description }} ({{ `${$t('label.cidr')}: ${opt.cidr}` }})
</span>
<span v-else>{{ opt.name || opt.description }}</span>
</a-select-option>
</a-select>
</a-form-item>