Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit a4732a3

Browse files
committed
Sorting based on suitability
1 parent a0f8b17 commit a4732a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/views/compute/MigrateWizard.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ export default {
136136
page: this.page,
137137
pagesize: this.pageSize
138138
}).then(response => {
139-
this.hosts = response.findhostsformigrationresponse.host
139+
this.hosts = response.findhostsformigrationresponse.host || []
140+
this.hosts.sort((a, b) => {
141+
return b.suitableformigration - a.suitableformigration
142+
})
140143
this.totalCount = response.findhostsformigrationresponse.count
141144
}).catch(error => {
142145
this.$message.error(`${this.$t('message.load.host.failed')}: ${error}`)

0 commit comments

Comments
 (0)