Add password enabled during ISO register and update (#8992)

Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
This commit is contained in:
GaOrtiga 2024-05-02 04:38:22 -03:00 committed by GitHub
parent 433956c6ae
commit ab8197c55e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 3 deletions

View File

@ -231,7 +231,7 @@ export default {
}
return fields
},
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created', 'userdatadetails', 'userdatapolicy', 'url'],
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'passwordenabled', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created', 'userdatadetails', 'userdatapolicy', 'url'],
searchFilters: () => {
var filters = ['name', 'zoneid', 'tags']
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {

View File

@ -250,6 +250,12 @@
</template>
<a-switch v-model:checked="form.isfeatured" />
</a-form-item>
<a-form-item ref="passwordenabled" name="passwordenabled" v-if="currentForm === 'Create'">
<template #label>
<tooltip-label :title="$t('label.passwordenabled')" :tooltip="apiParams.passwordenabled.description"/>
</template>
<a-switch v-model:checked="form.passwordenabled" />
</a-form-item>
<div :span="24" class="action-button">
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
@ -332,7 +338,8 @@ export default {
this.form = reactive({
bootable: true,
isextractable: false,
ispublic: false
ispublic: false,
passwordenabled: false
})
this.rules = reactive({
url: [{ required: true, message: this.$t('label.upload.iso.from.local') }],

View File

@ -42,6 +42,12 @@
:placeholder="apiParams.displaytext.description"
autoFocus />
</a-form-item>
<a-form-item name="passwordenabled" ref="passwordenabled">
<template #label>
<tooltip-label :title="$t('label.passwordenabled')" :tooltip="apiParams.passwordenabled.description"/>
</template>
<a-switch v-model:checked="form.passwordenabled" />
</a-form-item>
<a-form-item name="ostypeid" ref="ostypeid" :label="$t('label.ostypeid')">
<a-select
@ -162,7 +168,7 @@ export default {
displaytext: [{ required: true, message: this.$t('message.error.required.input') }],
ostypeid: [{ required: true, message: this.$t('message.error.select') }]
})
const resourceFields = ['name', 'displaytext', 'ostypeid', 'userdataid', 'userdatapolicy']
const resourceFields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'userdataid', 'userdatapolicy']
for (var field of resourceFields) {
var fieldValue = this.resource[field]