Skip to content

Commit d18ef1c

Browse files
authored
ui: add custom form for update template (apache#5434)
* ui: add custom form for update template * label fix * changes and fix Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 06b5e84 commit d18ef1c

3 files changed

Lines changed: 400 additions & 12 deletions

File tree

ui/public/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3323,6 +3323,7 @@
33233323
"message.success.update.iprange": "Successfully updated IP range",
33243324
"message.success.update.kubeversion": "Successfully updated Kubernetes supported version",
33253325
"message.success.update.network": "Successfully updated Network",
3326+
"message.success.update.template": "Successfully updated Template",
33263327
"message.success.update.user": "Successfully updated user",
33273328
"message.success.upgrade.kubernetes": "Successfully upgraded Kubernetes cluster",
33283329
"message.success.upload": "Upload Successfully",
@@ -3340,6 +3341,7 @@
33403341
"message.template.desc": "OS image that can be used to boot VMs",
33413342
"message.template.import.vm.temporary": "If a temporary template is used, reset VM operation will not work after import.",
33423343
"message.template.iso": "Please select a template or ISO to continue",
3344+
"message.template.type.change.warning": "WARNING: Changing the template type to SYSTEM will disable further changes to the template.",
33433345
"message.tier.required": "Tier is required",
33443346
"message.tooltip.dns.1": "Name of a DNS server for use by VMs in the zone. The public IP addresses for the zone must have a route to this server.",
33453347
"message.tooltip.dns.2": "A second DNS server name for use by VMs in the zone. The public IP addresses for the zone must have a route to this server.",

ui/src/config/section/image.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,8 @@ export default {
103103
record.templatetype !== 'SYSTEM' &&
104104
record.isready
105105
},
106-
args: (record, store) => {
107-
var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']
108-
if (['Admin'].includes(store.userInfo.roletype)) {
109-
fields.push('templatetype')
110-
}
111-
return fields
112-
},
113-
mapping: {
114-
templatetype: {
115-
options: ['BUILTIN', 'USER', 'SYSTEM', 'ROUTING']
116-
}
117-
}
106+
popup: true,
107+
component: () => import('@/views/image/UpdateTemplate.vue')
118108
},
119109
{
120110
api: 'updateTemplatePermissions',

0 commit comments

Comments
 (0)