diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index ad017345221..9c44d838495 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -3323,6 +3323,7 @@ "message.success.update.iprange": "Successfully updated IP range", "message.success.update.kubeversion": "Successfully updated Kubernetes supported version", "message.success.update.network": "Successfully updated Network", +"message.success.update.template": "Successfully updated Template", "message.success.update.user": "Successfully updated user", "message.success.upgrade.kubernetes": "Successfully upgraded Kubernetes cluster", "message.success.upload": "Upload Successfully", @@ -3340,6 +3341,7 @@ "message.template.desc": "OS image that can be used to boot VMs", "message.template.import.vm.temporary": "If a temporary template is used, reset VM operation will not work after import.", "message.template.iso": "Please select a template or ISO to continue", +"message.template.type.change.warning": "WARNING: Changing the template type to SYSTEM will disable further changes to the template.", "message.tier.required": "Tier is required", "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.", "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.", diff --git a/ui/src/config/section/image.js b/ui/src/config/section/image.js index 0a4667efd60..360525397f6 100644 --- a/ui/src/config/section/image.js +++ b/ui/src/config/section/image.js @@ -103,18 +103,8 @@ export default { record.templatetype !== 'SYSTEM' && record.isready }, - args: (record, store) => { - var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable'] - if (['Admin'].includes(store.userInfo.roletype)) { - fields.push('templatetype') - } - return fields - }, - mapping: { - templatetype: { - options: ['BUILTIN', 'USER', 'SYSTEM', 'ROUTING'] - } - } + popup: true, + component: () => import('@/views/image/UpdateTemplate.vue') }, { api: 'updateTemplatePermissions', diff --git a/ui/src/views/image/UpdateTemplate.vue b/ui/src/views/image/UpdateTemplate.vue new file mode 100644 index 00000000000..0d9239cd321 --- /dev/null +++ b/ui/src/views/image/UpdateTemplate.vue @@ -0,0 +1,396 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + +