Skip to content

Commit ca5dd68

Browse files
committed
ui: make arch filter a list
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 7d6af6c commit ca5dd68

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Diff for: ui/src/components/view/SearchView.vue

+19-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ export default {
316316
}
317317
if (['zoneid', 'domainid', 'imagestoreid', 'storageid', 'state', 'account', 'hypervisor', 'level',
318318
'clusterid', 'podid', 'groupid', 'entitytype', 'accounttype', 'systemvmtype', 'scope', 'provider',
319-
'type', 'scope', 'managementserverid', 'serviceofferingid', 'diskofferingid', 'networkid', 'usagetype', 'restartrequired', 'displaynetwork'].includes(item)
319+
'type', 'scope', 'managementserverid', 'serviceofferingid',
320+
'diskofferingid', 'networkid', 'usagetype', 'restartrequired',
321+
'displaynetwork', 'arch'].includes(item)
320322
) {
321323
type = 'list'
322324
} else if (item === 'tags') {
@@ -451,6 +453,13 @@ export default {
451453
]
452454
this.fields[apiKeyAccessIndex].loading = false
453455
}
456+
457+
if (arrayField.includes('arch')) {
458+
const typeIndex = this.fields.findIndex(item => item.name === 'arch')
459+
this.fields[typeIndex].loading = true
460+
this.fields[typeIndex].opts = this.fetchArchitectureTypes()
461+
this.fields[typeIndex].loading = false
462+
}
454463
},
455464
async fetchDynamicFieldData (arrayField, searchKeyword) {
456465
const promises = []
@@ -682,6 +691,9 @@ export default {
682691
if (accountIndex > -1) {
683692
this.fields[accountIndex].loading = false
684693
}
694+
if (hypervisorIndex > -1) {
695+
this.fields[hypervisorIndex].loading = false
696+
}
685697
if (imageStoreIndex > -1) {
686698
this.fields[imageStoreIndex].loading = false
687699
}
@@ -1322,6 +1334,12 @@ export default {
13221334
})
13231335
})
13241336
},
1337+
fetchArchitectureTypes () {
1338+
return [
1339+
{ id: 'x86_64', name: 'AMD 64 bits (x86_64)' },
1340+
{ id: 'aarch64', name: 'ARM 64 bits (aarch64)' }
1341+
]
1342+
},
13251343
onSearch (value) {
13261344
this.paramsFilter = {}
13271345
this.searchQuery = value

0 commit comments

Comments
 (0)