image: fix register and edit template and iso cases

Fixes #492

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-07-04 22:38:01 +05:30
parent 04b7e42cad
commit d78fc60d73
6 changed files with 51 additions and 120 deletions

View File

@ -79,7 +79,14 @@ export default {
icon: 'edit',
label: 'label.edit',
dataView: true,
args: ['name', 'displaytext', 'passwordenabled', 'sshkeyenabled', 'ostypeid', 'isdynamicallyscalable', 'isrouting']
args: ['name', 'displaytext', 'passwordenabled', 'sshkeyenabled', 'ostypeid', 'isdynamicallyscalable']
},
{
api: 'updateTemplatePermissions',
icon: 'share-alt',
label: 'label.action.template.share',
dataView: true,
args: ['ispublic', 'isfeatured', 'isextractable']
},
{
api: 'extractTemplate',
@ -103,7 +110,7 @@ export default {
{
api: 'updateTemplatePermissions',
icon: 'reconciliation',
label: 'label.action.share.template',
label: 'label.action.template.permission',
docHelp: 'adminguide/templates.html#sharing-templates-with-other-accounts-projects',
dataView: true,
popup: true,
@ -157,9 +164,16 @@ export default {
{
api: 'updateIso',
icon: 'edit',
label: 'label.edit',
label: 'label.action.edit.iso',
dataView: true,
args: ['name', 'displaytext', 'bootable', 'ostypeid', 'isdynamicallyscalable', 'isrouting']
args: ['name', 'displaytext', 'bootable', 'ostypeid']
},
{
api: 'updateIsoPermissions',
icon: 'share-alt',
label: 'label.action.iso.share',
dataView: true,
args: ['ispublic', 'isfeatured', 'isextractable']
},
{
api: 'extractIso',
@ -183,7 +197,7 @@ export default {
{
api: 'updateIsoPermissions',
icon: 'reconciliation',
label: 'label.action.edit.iso',
label: 'label.action.iso.permission',
docHelp: 'adminguide/templates.html#sharing-templates-with-other-accounts-projects',
dataView: true,
args: ['op', 'accounts', 'projectids'],

View File

@ -186,6 +186,8 @@
"label.action.generate.keys": "Generate Keys",
"label.action.generate.keys.processing": "Generate Keys....",
"label.action.get.diagnostics": "Get Diagnostics Data",
"label.action.iso.permission": "Update ISO Permissions",
"label.action.iso.share": "Update ISO Sharing",
"label.action.list.nexusvswitch": "List Nexus 1000v",
"label.action.lock.account": "Lock account",
"label.action.lock.account.processing": "Locking account....",
@ -226,7 +228,6 @@
"label.action.router.health.checks": "Get health checks result",
"label.action.run.diagnostics": "Run Diagnostics",
"label.action.secure.host": "Provision Host Security Keys",
"label.action.share.template": "Update Template Permissions",
"label.action.start.instance": "Start Instance",
"label.action.start.instance.processing": "Starting Instance....",
"label.action.start.router": "Start Router",
@ -241,6 +242,8 @@
"label.action.stop.systemvm.processing": "Stopping System VM....",
"label.action.take.snapshot": "Take Snapshot",
"label.action.take.snapshot.processing": "Taking Snapshot....",
"label.action.template.permission": "Update Template Permissions",
"label.action.template.share": "Update Template Sharing",
"label.action.unmanage.cluster": "Unmanage Cluster",
"label.action.unmanage.cluster.processing": "Unmanaging Cluster....",
"label.action.unmanage.virtualmachine": "Unmanage VM",
@ -779,8 +782,8 @@
"label.enter.token": "Enter token",
"label.error": "Error",
"label.error.code": "Error Code",
"label.error.file.upload": "File upload failed",
"label.error.file.read": "Cannot read file",
"label.error.file.upload": "File upload failed",
"label.error.rules.file.import": "Please choose a valid CSV rules file",
"label.error.something.went.wrong.please.correct.the.following": "Something went wrong; please correct the following",
"label.error.upper": "ERROR",
@ -1135,8 +1138,8 @@
"label.limits": "Limits",
"label.link.domain.to.ldap": "Link Domain to LDAP",
"label.linklocalip": "Link Local IP Address",
"label.list.ciscovnmc": "Cisco VNMC",
"label.list.ciscoasa1000v": "ASA 1000v",
"label.list.ciscovnmc": "Cisco VNMC",
"label.load.balancer": "Load Balancer",
"label.load.balancing.policies": "Load balancing policies",
"label.loadbalancerinstance": "Assigned VMs",
@ -1255,6 +1258,7 @@
"label.migrate.volume.to.primary.storage": "Migrate volume to another primary storage",
"label.min.balance": "Min Balance",
"label.min.past.hour": "min past the hr",
"label.min_balance": "Min Balance",
"label.mincpunumber": "Min CPU Cores",
"label.minimum": "Minimum",
"label.mininstance": "Min Instances",
@ -1263,7 +1267,6 @@
"label.minmemory": "Min Memory (in MB)",
"label.minute.past.hour": "minute(s) past the hour",
"label.minutes.past.hour": "minutes(s) past the hour",
"label.min_balance": "Min Balance",
"label.monday": "Monday",
"label.monitor": "Monitor",
"label.monthly": "Monthly",
@ -1476,9 +1479,9 @@
"label.primary.storage.allocated": "Primary Storage Allocated",
"label.primary.storage.count": "Primary Storage Pools",
"label.primary.storage.used": "Primary Storage Used",
"label.primarystorage.count": "Primary Storage Count",
"label.primarystoragelimit": "Primary Storage limits (GiB)",
"label.primarystoragetotal": "Primary Storage",
"label.primarystorage.count": "Primary Storage Count",
"label.private.gateway": "Private Gateway",
"label.private.interface": "Private Interface",
"label.private.ip.range": "Private IP Range",
@ -1538,7 +1541,6 @@
"label.quiescevm": "Quiesce VM",
"label.quiettime": "Quiet Time (in sec)",
"label.quota": "Quota",
"label.quota_enforce": "Enforce Quota",
"label.quota.add.credits": "Add Credits",
"label.quota.configuration": "Quota Configuration",
"label.quota.configure": "Configure Quota",
@ -1561,12 +1563,13 @@
"label.quota.tariff": "Tariff",
"label.quota.tariff.edit": "Edit Tariff",
"label.quota.tariff.effectivedate": "Effective Date",
"label.quota.totalusage": "Total Usage",
"label.quota.total":"Total",
"label.quota.totalusage": "Total Usage",
"label.quota.type.name":"Usage Type",
"label.quota.type.unit":"Usage Unit",
"label.quota.usage": "Quota Consumption",
"label.quota.value": "Quota Value",
"label.quota_enforce": "Enforce Quota",
"label.rados.monitor": "RADOS Monitor",
"label.rados.pool": "RADOS Pool",
"label.rados.secret": "RADOS Secret",
@ -2350,6 +2353,7 @@
"message.confirm.delete.internal.lb": "Please confirm you want to delete Internal LB",
"message.confirm.delete.kubernetes.version": "Please confirm that you want to delete this Kubernetes version.",
"message.confirm.delete.netscaler": "Please confirm that you would like to delete NetScaler",
"message.confirm.delete.niciranvp":"Please confirm you want to delete Nicira Nvp Controller",
"message.confirm.delete.pa": "Please confirm that you would like to delete Palo Alto",
"message.confirm.delete.provider": "Please confirm that you would like to delete this provider?",
"message.confirm.delete.secondary.staging.store": "Please confirm you want to delete Secondary Staging Store.",
@ -2437,7 +2441,6 @@
"message.desc.primary.storage": "Each cluster must contain one or more primary storage servers, and we will add the first one now. Primary storage contains the disk volumes for all the VMs running on hosts in the cluster. Use any standards-compliant protocol that is supported by the underlying hypervisor.",
"message.desc.reset.ssh.key.pair": "Please specify a ssh key pair that you would like to add to this VM. Please note the root password will be changed by this operation if password is enabled.",
"message.desc.secondary.storage": "Each zone must have at least one NFS or secondary storage server, and we will add the first one now. Secondary storage stores VM templates, ISO images, and VM disk volume snapshots. This server must be available to all hosts in the zone.<br/><br/>Provide the IP address and exported path.",
"message.confirm.delete.niciranvp":"Please confirm you want to delete Nicira Nvp Controller",
"message.desc.zone": "A zone is the largest organizational unit in CloudStack, and it typically corresponds to a single datacenter. Zones provide physical isolation and redundancy. A zone consists of one or more pods (each of which contains hosts and primary storage servers) and a secondary storage server which is shared by all pods in the zone.",
"message.detach.disk": "Are you sure you want to detach this disk?",
"message.detach.iso.confirm": "Please confirm that you want to detach the ISO from this virtual instance.",
@ -2585,8 +2588,8 @@
"message.project.invite.sent": "Invite sent to user; they will be added to the project once they accept the invitation",
"message.public.traffic.in.advanced.zone": "Public traffic is generated when VMs in the cloud access the internet. Publicly-accessible IPs must be allocated for this purpose. End users can use the CloudStack UI to acquire these IPs to implement NAT between their guest network and their public network.<br/><br/>Provide at least one range of IP addresses for internet traffic.",
"message.public.traffic.in.basic.zone": "Public traffic is generated when VMs in the cloud access the Internet or provide services to clients over the Internet. Publicly accessible IPs must be allocated for this purpose. When a instance is created, an IP from this set of Public IPs will be allocated to the instance in addition to the guest IP address. Static 1-1 NAT will be set up automatically between the public IP and the guest IP. End users can also use the CloudStack UI to acquire additional IPs to implement static NAT between their instances and the public IP.",
"message.publicip.state.allocating": "The IP Address is being propagated to other network elements and is not ready for use yet.",
"message.publicip.state.allocated": "The IP address is in used.",
"message.publicip.state.allocating": "The IP Address is being propagated to other network elements and is not ready for use yet.",
"message.publicip.state.free": "The IP address is ready to be allocated.",
"message.publicip.state.releasing": "The IP address is being released for other network elements and is not ready for allocation.",
"message.question.are.you.sure.you.want.to.add": "Are you sure you want to add",

View File

@ -1,90 +0,0 @@
Task:
- The following is a list of new translation keys added in Primate
- Check if and how these keys are used by config and components
- If possible remove usage of these keys and the keys from en.json, and replace
with an existing key which has translation available in other languages
label.action.remove.vm
label.add.ldap.list.users
label.add.setting
label.add.traffic
label.addanothernetwork
label.addnewnetworks
label.basicsetup
label.cidr.destination.network
label.cloudian.storage
label.confirmacceptinvitation
label.cpunumber
label.cpuusedghz
label.defaultnetwork
label.delete.confirm
label.deleteconfirm
label.diskiopstotal
label.error.volume.upload
label.error.zone.combined
label.existingnetworks
label.filter
label.fix.errors
label.guestnetwork
label.hardware
label.header.backup.schedule
label.icmp
label.identity.and.access
label.interval.monthly
label.interval.weekly
label.isself
label.kubernetes.cluster.create
label.kubernetes.cluster.delete
label.launch.vm
label.limits
label.maxprimarystorage
label.maxproject
label.maxsecondarystorage
label.memoryused
label.memused
label.minmaxiops
label.monitor
label.new.tag
label.newinstance
label.nodiskcache
label.params
label.project.invitation
label.provisioning
label.quickview
label.rados.monitor
label.rados.pool
label.rados.secret
label.rados.user
label.ram
label.remove
label.reset
label.revokeinvitationconfirm
label.schedule
label.scheduled.backups
label.scheduled.snapshots
label.selfexecutable
label.sshkeyenabled
label.sshkeypairs
label.templateiso
label.vm
label.volume.volumefileupload.description
label.volumeids
label.vpncustomergateway
label.vpncustomergateway.cidrlist
label.vpncustomergateway.esplifetime
label.vpncustomergateway.ikelifetime
label.vpncustomergateway.secretkey
label.vpncustomergatewayname
label.writeback
label.writethrough
label.yourinstance
message.disk.offering.created
message.error.invalid.range
message.error.number
message.error.required.input
message.error.select
message.network.secondaryip
message.required.add.least.ip
message.required.traffic.type
message.setup.physical.network.during.zone.creation
message.setup.physical.network.during.zone.creation.basic

View File

@ -345,7 +345,8 @@ export default {
parentStartLoading: this.startLoading,
parentFinishLoading: this.finishLoading,
parentChangeResource: this.changeResource,
parentPollActionCompletion: this.pollActionCompletion
parentPollActionCompletion: this.pollActionCompletion,
parentEditTariffAction: () => {}
}
},
data () {
@ -688,7 +689,7 @@ export default {
}
}
this.actionLoading = false
if (action.dataView && ['copy', 'edit'].includes(action.icon)) {
if (action.dataView && ['copy', 'edit', 'share-alt'].includes(action.icon)) {
this.fillEditFormFieldValues()
}
},

View File

@ -203,12 +203,15 @@ export default {
})
},
created () {
this.zones = [
{
id: '-1',
name: this.$t('label.all.zone')
}
]
this.zones = []
if (this.$store.getters.userInfo.roletype === 'Admin') {
this.zones = [
{
id: '-1',
name: this.$t('label.all.zone')
}
]
}
},
mounted () {
this.fetchData()
@ -335,7 +338,7 @@ export default {
api('registerIso', params).then(json => {
this.$emit('refresh-data')
this.$notification.success({
message: 'label.action.register.iso',
message: this.$t('label.action.register.iso'),
description: 'Sucessfully registered ISO ' + params.name
})
}).catch(error => {

View File

@ -324,13 +324,13 @@
</a-row>
<a-row>
<a-col :span="12">
<a-checkbox value="isrouting">
{{ $t('label.isrouting') }}
<a-checkbox value="ispublic">
{{ $t('label.ispublic') }}
</a-checkbox>
</a-col>
<a-col :span="12">
<a-checkbox value="ispublic">
{{ $t('label.ispublic') }}
<a-checkbox value="isfeatured">
{{ $t('label.isfeatured') }}
</a-checkbox>
</a-col>
</a-row>
@ -340,9 +340,9 @@
{{ $t('label.requireshvm') }}
</a-checkbox>
</a-col>
<a-col :span="12">
<a-checkbox value="isfeatured">
{{ $t('label.isfeatured') }}
<a-col :span="12" v-if="$store.getters.userInfo.roletype === 'Admin'">
<a-checkbox value="isrouting">
{{ $t('label.isrouting') }}
</a-checkbox>
</a-col>
</a-row>