Skip to content

Commit 9fb0e71

Browse files
committed
cleanup method not in use
1 parent e62326e commit 9fb0e71

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

ui/src/components/view/DeployVMFromBackup.vue

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,46 +1540,6 @@ export default {
15401540
fillValue (field) {
15411541
this.form[field] = this.dataPreFill[field]
15421542
},
1543-
fetchZoneByQuery () {
1544-
return new Promise(resolve => {
1545-
let zones = []
1546-
let apiName = ''
1547-
const params = {}
1548-
if (this.templateId) {
1549-
apiName = 'listTemplates'
1550-
params.listall = true
1551-
params.templatefilter = this.isNormalAndDomainUser ? 'executable' : 'all'
1552-
params.id = this.templateId
1553-
} else if (this.isoId) {
1554-
apiName = 'listIsos'
1555-
params.listall = true
1556-
params.isofilter = this.isNormalAndDomainUser ? 'executable' : 'all'
1557-
params.id = this.isoId
1558-
} else if (this.networkId) {
1559-
params.listall = true
1560-
params.id = this.networkId
1561-
apiName = 'listNetworks'
1562-
}
1563-
if (!apiName) return resolve(zones)
1564-
1565-
getAPI(apiName, params).then(json => {
1566-
let objectName
1567-
const responseName = [apiName.toLowerCase(), 'response'].join('')
1568-
for (const key in json[responseName]) {
1569-
if (key === 'count') {
1570-
continue
1571-
}
1572-
objectName = key
1573-
break
1574-
}
1575-
const data = json?.[responseName]?.[objectName] || []
1576-
zones = data.map(item => item.zoneid)
1577-
return resolve(zones)
1578-
}).catch(() => {
1579-
return resolve(zones)
1580-
})
1581-
})
1582-
},
15831543
async fetchData () {
15841544
this.fetchZones(null, null)
15851545
_.each(this.params, (param, name) => {

0 commit comments

Comments
 (0)