Skip to content

Commit ab8197c

Browse files
GaOrtigaGabriel
andauthored
Add password enabled during ISO register and update (#8992)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
1 parent 433956c commit ab8197c

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

ui/src/config/section/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export default {
231231
}
232232
return fields
233233
},
234-
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created', 'userdatadetails', 'userdatapolicy', 'url'],
234+
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'passwordenabled', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created', 'userdatadetails', 'userdatapolicy', 'url'],
235235
searchFilters: () => {
236236
var filters = ['name', 'zoneid', 'tags']
237237
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {

ui/src/views/image/RegisterOrUploadIso.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@
250250
</template>
251251
<a-switch v-model:checked="form.isfeatured" />
252252
</a-form-item>
253+
<a-form-item ref="passwordenabled" name="passwordenabled" v-if="currentForm === 'Create'">
254+
<template #label>
255+
<tooltip-label :title="$t('label.passwordenabled')" :tooltip="apiParams.passwordenabled.description"/>
256+
</template>
257+
<a-switch v-model:checked="form.passwordenabled" />
258+
</a-form-item>
253259

254260
<div :span="24" class="action-button">
255261
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
@@ -332,7 +338,8 @@ export default {
332338
this.form = reactive({
333339
bootable: true,
334340
isextractable: false,
335-
ispublic: false
341+
ispublic: false,
342+
passwordenabled: false
336343
})
337344
this.rules = reactive({
338345
url: [{ required: true, message: this.$t('label.upload.iso.from.local') }],

ui/src/views/image/UpdateISO.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
:placeholder="apiParams.displaytext.description"
4343
autoFocus />
4444
</a-form-item>
45+
<a-form-item name="passwordenabled" ref="passwordenabled">
46+
<template #label>
47+
<tooltip-label :title="$t('label.passwordenabled')" :tooltip="apiParams.passwordenabled.description"/>
48+
</template>
49+
<a-switch v-model:checked="form.passwordenabled" />
50+
</a-form-item>
4551

4652
<a-form-item name="ostypeid" ref="ostypeid" :label="$t('label.ostypeid')">
4753
<a-select
@@ -162,7 +168,7 @@ export default {
162168
displaytext: [{ required: true, message: this.$t('message.error.required.input') }],
163169
ostypeid: [{ required: true, message: this.$t('message.error.select') }]
164170
})
165-
const resourceFields = ['name', 'displaytext', 'ostypeid', 'userdataid', 'userdatapolicy']
171+
const resourceFields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'userdataid', 'userdatapolicy']
166172
167173
for (var field of resourceFields) {
168174
var fieldValue = this.resource[field]

0 commit comments

Comments
 (0)