Skip to content

Commit 41d5e7d

Browse files
shwstpprdhslove
authored andcommitted
ui: fix handler for deploy button menu (apache#11116)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent cd72e13 commit 41d5e7d

3 files changed

Lines changed: 27 additions & 28 deletions

File tree

ui/src/views/compute/DeployVM.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@
922922
:deployButtonMenuOptions="deployMenuOptions"
923923
@handle-cancel="() => $router.back()"
924924
@handle-deploy="handleSubmit"
925-
@handle-deploy-menu="handleSubmitAndStay" />
925+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
926926
</div>
927927
</a-form>
928928
</a-card>
@@ -937,7 +937,7 @@
937937
:deployButtonMenuOptions="deployMenuOptions"
938938
@handle-cancel="() => $router.back()"
939939
@handle-deploy="handleSubmit"
940-
@handle-deploy-menu="handleSubmitAndStay" />
940+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
941941
</template>
942942
</info-card>
943943
</a-affix>

ui/src/views/compute/DeployVnfAppliance.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@
810810
:deployButtonMenuOptions="deployMenuOptions"
811811
@handle-cancel="() => $router.back()"
812812
@handle-deploy="handleSubmit"
813-
@handle-deploy-menu="handleSubmitAndStay" />
813+
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
814814
</div>
815815
</a-form>
816816
</a-card>
@@ -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
</template>
830830
</info-card>
831831
</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)