ui: fix suitable shared network not showing while import (#7016)

In import VM form, shared network is not showing when it is in Setup state which should not be the case.
This PR fixes that.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2022-12-23 14:17:54 +05:30 committed by GitHub
parent 08881d69c7
commit 2bb6439793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ export default {
for (const item of this.items) {
this.validNetworks[item.id] = this.networks
if (this.filterUnimplementedNetworks) {
this.validNetworks[item.id] = this.validNetworks[item.id].filter(x => x.state === 'Implemented')
this.validNetworks[item.id] = this.validNetworks[item.id].filter(x => (x.state === 'Implemented' || (x.state === 'Setup' && x.type === 'Shared')))
}
if (this.filterMatchKey) {
this.validNetworks[item.id] = this.validNetworks[item.id].filter(x => x[this.filterMatchKey] === item[this.filterMatchKey])