Skip to content

Commit ed7bd5e

Browse files
authored
ui: fix handler for deploy button menu (apache#11116)
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 1a251c8 commit ed7bd5e

File tree

3 files changed

+27
-28
lines changed

3 files changed

+27
-28
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@
845845
:deployButtonMenuOptions="deployMenuOptions"
846846
@handle-cancel="() => $router.back()"
847847
@handle-deploy="handleSubmit"
848-
@handle-deploy-menu="handleSubmitAndStay" />
848+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
849849
</div>
850850
</a-form>
851851
</a-card>
@@ -860,7 +860,7 @@
860860
:deployButtonMenuOptions="deployMenuOptions"
861861
@handle-cancel="() => $router.back()"
862862
@handle-deploy="handleSubmit"
863-
@handle-deploy-menu="handleSubmitAndStay" />
863+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
864864
</template>
865865
</info-card>
866866
</a-affix>

ui/src/views/compute/DeployVnfAppliance.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@
825825
:deployButtonMenuOptions="deployMenuOptions"
826826
@handle-cancel="() => $router.back()"
827827
@handle-deploy="handleSubmit"
828-
@handle-deploy-menu="handleSubmitAndStay" />
828+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
829829
</div>
830830
</a-form>
831831
</a-card>
@@ -840,7 +840,7 @@
840840
:deployButtonMenuOptions="deployMenuOptions"
841841
@handle-cancel="() => $router.back()"
842842
@handle-deploy="handleSubmit"
843-
@handle-deploy-menu="handleSubmitAndStay" />
843+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
844844
</template>
845845
</info-card>
846846
</a-affix>

ui/src/views/compute/wizard/DeployButtons.vue

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,45 +86,44 @@ export default {
8686
this.$emit('handle-deploy', e)
8787
},
8888
handleMenu (e) {
89-
this.$emit('handle-deploy-menu', e.key - 1)
89+
this.$emit('handle-deploy-menu', e.key - 1, e)
9090
}
9191
}
9292
}
9393
</script>
9494

9595
<style lang="less" scoped>
9696
97-
.button-container {
98-
display: flex;
99-
flex-wrap: wrap;
100-
gap: 10px;
101-
justify-content: flex-start;
102-
}
103-
104-
.equal-size-button {
105-
flex-grow: 1; /* Make each button grow equally */
106-
min-width: 120px; /* Set a minimum width so that the buttons don't shrink too much */
107-
}
108-
109-
@media (max-width: 600px) {
11097
.button-container {
111-
flex-direction: column;
98+
display: flex;
99+
flex-wrap: wrap;
100+
gap: 10px;
101+
justify-content: flex-start;
112102
}
113103
114-
}
104+
.equal-size-button {
105+
flex-grow: 1; /* Make each button grow equally */
106+
min-width: 120px; /* Set a minimum width so that the buttons don't shrink too much */
107+
}
115108
116-
.btn-stay-on-page {
117-
&.ant-dropdown-menu-dark {
118-
.ant-dropdown-menu-item:hover {
119-
background: transparent !important;
109+
@media (max-width: 600px) {
110+
.button-container {
111+
flex-direction: column;
120112
}
121113
}
122-
}
123114
</style>
124115

125116
<style lang="less">
126117
127-
.ant-btn-group > .ant-btn:first-child:not(:last-child) {
128-
flex-grow: 1; /* Make each button grow equally */
129-
}
118+
.btn-stay-on-page {
119+
&.ant-dropdown-menu-dark {
120+
.ant-dropdown-menu-item:hover {
121+
background: transparent !important;
122+
}
123+
}
124+
}
125+
126+
.ant-btn-group > .ant-btn:first-child:not(:last-child) {
127+
flex-grow: 1; /* Make each button grow equally */
128+
}
130129
</style>

0 commit comments

Comments
 (0)