Skip to content

Commit 7636151

Browse files
abh1sardhslove
authored andcommitted
Fix build and ui build errors in main (apache#11332)
* fix build error in registeruserdatacmd * remove unused imports * fix ui build errors
1 parent 898f115 commit 7636151

File tree

4 files changed

+63
-48
lines changed

4 files changed

+63
-48
lines changed

api/src/main/java/org/apache/cloudstack/api/command/user/userdata/RegisterUserDataCmd.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import org.apache.cloudstack.api.ApiConstants;
2222
import org.apache.cloudstack.api.Parameter;
2323
import org.apache.cloudstack.api.ServerApiException;
24-
import org.apache.cloudstack.api.response.DomainResponse;
25-
import org.apache.cloudstack.api.response.ProjectResponse;
2624
import org.apache.cloudstack.api.response.SuccessResponse;
2725
import org.apache.cloudstack.api.response.UserDataResponse;
2826
import org.apache.cloudstack.context.CallContext;
@@ -51,7 +49,6 @@ public class RegisterUserDataCmd extends BaseRegisterUserDataCmd {
5149
@Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, required = true, description = "User data content", length = 1048576)
5250
protected String userData;
5351

54-
5552
public String getUserData() {
5653
return userData;
5754
}

ui/src/views/compute/DeployVM.vue

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,32 +2782,41 @@ export default {
27822782
this.rowCount[name] = response
27832783
return
27842784
}
2785-
param.opts = response
2786-
this.options[name] = response
2787-
2788-
if (name === 'hypervisors') {
2789-
const hypervisorFromResponse = response[0] && response[0].name ? response[0].name : null
2790-
this.dataPreFill.hypervisor = hypervisorFromResponse
2791-
this.form.hypervisor = hypervisorFromResponse
2785+
if (!responseKey.includes('response')) {
2786+
return resolve(null)
27922787
}
2788+
_.map(responseItem, (response, key) => {
2789+
if (key === 'count') {
2790+
this.rowCount[name] = response
2791+
return
2792+
}
2793+
param.opts = response
2794+
this.options[name] = response
27932795
2794-
if (param.field) {
2795-
this.fillValue(param.field)
2796-
}
2797-
})
2796+
if (name === 'hypervisors') {
2797+
const hypervisorFromResponse = response[0] && response[0].name ? response[0].name : null
2798+
this.dataPreFill.hypervisor = hypervisorFromResponse
2799+
this.form.hypervisor = hypervisorFromResponse
2800+
}
27982801
2799-
if (name === 'zones') {
2800-
let zoneid = ''
2801-
if (this.$route.query.zoneid) {
2802-
zoneid = this.$route.query.zoneid
2803-
} else if (this.options.zones.length === 1) {
2804-
zoneid = this.options.zones[0].id
2805-
}
2806-
if (zoneid) {
2807-
this.form.zoneid = zoneid
2808-
this.onSelectZoneId(zoneid)
2802+
if (param.field) {
2803+
this.fillValue(param.field)
2804+
}
2805+
})
2806+
2807+
if (name === 'zones') {
2808+
let zoneid = ''
2809+
if (this.$route.query.zoneid) {
2810+
zoneid = this.$route.query.zoneid
2811+
} else if (this.options.zones.length === 1) {
2812+
zoneid = this.options.zones[0].id
2813+
}
2814+
if (zoneid) {
2815+
this.form.zoneid = zoneid
2816+
this.onSelectZoneId(zoneid)
2817+
}
28092818
}
2810-
}
2819+
})
28112820
})
28122821
resolve(response)
28132822
}).catch(function (error) {

ui/src/views/compute/DeployVnfAppliance.vue

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,32 +2503,41 @@ export default {
25032503
this.rowCount[name] = response
25042504
return
25052505
}
2506-
param.opts = response
2507-
this.options[name] = response
2508-
2509-
if (name === 'hypervisors') {
2510-
const hypervisorFromResponse = response[0] && response[0].name ? response[0].name : null
2511-
this.dataPreFill.hypervisor = hypervisorFromResponse
2512-
this.form.hypervisor = hypervisorFromResponse
2506+
if (!responseKey.includes('response')) {
2507+
return resolve(null)
25132508
}
2509+
_.map(responseItem, (response, key) => {
2510+
if (key === 'count') {
2511+
this.rowCount[name] = response
2512+
return
2513+
}
2514+
param.opts = response
2515+
this.options[name] = response
25142516
2515-
if (param.field) {
2516-
this.fillValue(param.field)
2517-
}
2518-
})
2517+
if (name === 'hypervisors') {
2518+
const hypervisorFromResponse = response[0] && response[0].name ? response[0].name : null
2519+
this.dataPreFill.hypervisor = hypervisorFromResponse
2520+
this.form.hypervisor = hypervisorFromResponse
2521+
}
25192522
2520-
if (name === 'zones') {
2521-
let zoneid = ''
2522-
if (this.$route.query.zoneid) {
2523-
zoneid = this.$route.query.zoneid
2524-
} else if (this.options.zones.length === 1) {
2525-
zoneid = this.options.zones[0].id
2526-
}
2527-
if (zoneid) {
2528-
this.form.zoneid = zoneid
2529-
this.onSelectZoneId(zoneid)
2523+
if (param.field) {
2524+
this.fillValue(param.field)
2525+
}
2526+
})
2527+
2528+
if (name === 'zones') {
2529+
let zoneid = ''
2530+
if (this.$route.query.zoneid) {
2531+
zoneid = this.$route.query.zoneid
2532+
} else if (this.options.zones.length === 1) {
2533+
zoneid = this.options.zones[0].id
2534+
}
2535+
if (zoneid) {
2536+
this.form.zoneid = zoneid
2537+
this.onSelectZoneId(zoneid)
2538+
}
25302539
}
2531-
}
2540+
})
25322541
})
25332542
resolve(response)
25342543
}).catch(function (error) {

ui/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export default {
471471
})
472472
},
473473
fetchDomainAccounts (domainid) {
474-
api('listAccounts', {
474+
getAPI('listAccounts', {
475475
domainid: domainid
476476
}).then(response => {
477477
// Clean up the selected account from a previous domain

0 commit comments

Comments
 (0)