Skip to content

Commit

Permalink
Add password enabled during ISO register and update (apache#8992)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel <[email protected]>
  • Loading branch information
GaOrtiga and Gabriel authored May 2, 2024
1 parent 433956c commit ab8197c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/src/config/section/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
9 changes: 8 additions & 1 deletion ui/src/views/image/RegisterOrUploadIso.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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') }],
Expand Down
8 changes: 7 additions & 1 deletion ui/src/views/image/UpdateISO.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit ab8197c

Please sign in to comment.