Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jan 20, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions 14 src/config/section/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
}
return fields
},
details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'templatetag', 'account', 'domain', 'created', 'url'],
searchFilters: ['name', 'zoneid', 'tags'],
related: [{
name: 'vm',
Expand Down Expand Up @@ -94,7 +94,7 @@ export default {
args: (record, store) => {
var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']
if (['Admin'].includes(store.userInfo.roletype)) {
fields.push('isrouting')
fields.push('isrouting', 'templatetag')
}
return fields
}
Expand Down Expand Up @@ -179,7 +179,7 @@ export default {
}
return fields
},
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created'],
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'templatetag', 'account', 'domain', 'created'],
searchFilters: ['name', 'zoneid', 'tags'],
related: [{
name: 'vm',
Expand Down Expand Up @@ -224,7 +224,13 @@ export default {
!(record.account === 'system' && record.domainid === 1) &&
record.isready
},
args: ['name', 'displaytext', 'bootable', 'ostypeid']
args: (record, store) => {
var fields = ['name', 'displaytext', 'bootable', 'ostypeid']
if (['Admin'].includes(store.userInfo.roletype)) {
fields.push('templatetag')
}
return fields
}
},
{
api: 'updateIsoPermissions',
Expand Down
1 change: 1 addition & 0 deletions 1 src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,7 @@
"label.templatenames": "Template",
"label.templates": "Templates",
"label.templatesubject": "Subject",
"label.templatetag": "Template Tag",
"label.templatetotal": "Template",
"label.templatetype": "Email Template",
"label.tftp.dir": "TFTP Directory",
Expand Down
3 changes: 3 additions & 0 deletions 3 src/views/AutogenView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,9 @@ export default {
if (param.type === 'boolean') {
params[key] = false
}
if (param.name === 'templatetag') {
params[key] = ''
}
break
}
if (action.mapping && key in action.mapping && action.mapping[key].options) {
Expand Down
8 changes: 8 additions & 0 deletions 8 src/views/image/RegisterOrUploadIso.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@
}]" />
</a-form-item>

<a-form-item :label="$t('label.templatetag')" v-if="$store.getters.userInfo.roletype === 'Admin'">
<a-input
v-decorator="['templatetag', {
rules: [{ required: false }]
}]"
:placeholder="apiParams.templatetag.description" />
</a-form-item>

<div :span="24" class="action-button">
<a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
Expand Down
9 changes: 9 additions & 0 deletions 9 src/views/image/RegisterOrUploadTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,15 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="12" v-if="$store.getters.userInfo.roletype === 'Admin'">
<a-form-item :label="$t('label.templatetag')">
<a-input
v-decorator="['templatetag', {
rules: [{ required: false }]
}]"
:placeholder="apiParams.templatetag.description" />
</a-form-item>
</a-row>

<div :span="24" class="action-button">
<a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.