abh1sar commented on code in PR #9708:
URL: https://github.com/apache/cloudstack/pull/9708#discussion_r1766670397
##########
ui/src/views/network/NicsTab.vue:
##########
@@ -368,9 +376,26 @@ export default {
this.$pollJob({
jobId: response.addnictovirtualmachineresponse.jobid,
successMessage: this.$t('message.success.add.network'),
- successMethod: () => {
- this.loadingNic = false
- this.closeModals()
+ successMethod: async () => {
+ if (this.addNetworkData.makedefault) {
+ try {
+ this.nic = await this.getNic(params.networkid,
params.virtualmachineid)
+ if (this.nic) {
+ this.setAsDefault(this.nic)
+ } else {
+ this.$notifyError('NIC data not found.')
+ this.loadingNic = false
+ this.closeModals()
+ }
+ } catch (error) {
+ this.$notifyError('Failed to fetch NIC data.')
+ this.loadingNic = false
+ this.closeModals()
+ }
+ } else {
+ this.loadingNic = false
Review Comment:
Made some changes to the code. Before that the active tab was getting reset
to Details on Add-Network.
Now the Network tab remains the active tab after adding a network.
Please check if this comment still applies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]