Skip to content

Commit 79087a3

Browse files
committed
feat: enhance authentication handling in XPackLimitDrawer.vue
1 parent b4569fc commit 79087a3

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ui/src/views/application-overview/xpack-component/XPackLimitDrawer.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@
3131
:label="$t('views.applicationOverview.appInfo.LimitDialog.authentication')"
3232
@click.prevent
3333
>
34-
<el-switch size="small" v-model="form.authentication"></el-switch>
34+
<el-switch size="small" v-model="form.authentication" @change="firstGeneration"></el-switch>
3535
</el-form-item>
3636
<el-radio-group
3737
v-if="form.authentication"
3838
v-model="form.authentication_value.type"
3939
class="card__radio"
40-
@change="firstGeneration"
4140
>
4241
<el-card
4342
shadow="never"
@@ -249,12 +248,11 @@ function refreshAuthentication() {
249248
}
250249
251250
function firstGeneration() {
252-
if (
253-
form.value.authentication &&
254-
form.value.authentication_value.type === 'password' &&
255-
!form.value.authentication_value.password_value
256-
) {
257-
form.value.authentication_value.password_value = generateAuthenticationValue()
251+
if (form.value.authentication && !form.value.authentication_value.password_value) {
252+
form.value.authentication_value = {
253+
type: 'password',
254+
password_value: generateAuthenticationValue(),
255+
}
258256
}
259257
}
260258

0 commit comments

Comments
 (0)