From 4bc2da6586f27bbb96abd1936a76f77f0e0155b9 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Thu, 23 Apr 2020 10:34:52 +0200 Subject: [PATCH 01/10] simple start and reboot --- src/config/section/compute.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config/section/compute.js b/src/config/section/compute.js index f02e5af80..f89a045d1 100644 --- a/src/config/section/compute.js +++ b/src/config/section/compute.js @@ -87,7 +87,7 @@ export default { dataView: true, groupAction: true, show: (record) => { return ['Stopped'].includes(record.state) }, - args: (record, store) => { return ['Admin'].includes(store.userInfo.roletype) ? ['podid', 'clusterid', 'hostid'] : [] }, + args: (record, store) => { return ['Admin'].includes(store.userInfo.roletype) ? ['podid', 'clusterid', 'hostid', 'bootintosetup' ] : [] }, response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null } }, { @@ -107,7 +107,8 @@ export default { label: 'label.action.reboot.instance', message: 'message.action.reboot.instance', dataView: true, - show: (record) => { return ['Running'].includes(record.state) } + show: (record) => { return ['Running'].includes(record.state) }, + args: ['bootintobios'] }, { api: 'restoreVirtualMachine', From 995423ead1be65defd636f975ac2e0b407eb693e Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Fri, 24 Apr 2020 15:21:33 +0000 Subject: [PATCH 02/10] boot into bios on deploy --- src/views/compute/DeployVM.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/compute/DeployVM.vue b/src/views/compute/DeployVM.vue index 09d36a3da..8cd9465ee 100644 --- a/src/views/compute/DeployVM.vue +++ b/src/views/compute/DeployVM.vue @@ -270,6 +270,16 @@ + + + @@ -270,16 +276,6 @@ - - - @@ -440,8 +439,7 @@ export default { } ], tabKey: 'templateid', - dataPreFill: {}, - bootintosetup: false + dataPreFill: {} } }, computed: { @@ -940,7 +938,9 @@ export default { deployVmData.name = values.name deployVmData.displayname = values.name // step 8: enter setup - deployVmData.bootintobios = this.bootintobios + if ('bootintosetup' in values) { + deployVmData.bootintosetup = values.bootintosetup + } const title = this.$t('label.launch.vm') const description = values.name || '' const password = this.$t('label.password') From e827d9ba52c642fb7cfa11419f71763bf99457fd Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Thu, 7 May 2020 13:57:42 +0000 Subject: [PATCH 08/10] amend faulty concat on array --- src/config/section/compute.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/config/section/compute.js b/src/config/section/compute.js index 5203174bd..1acb4150d 100644 --- a/src/config/section/compute.js +++ b/src/config/section/compute.js @@ -88,11 +88,14 @@ export default { groupAction: true, show: (record) => { return ['Stopped'].includes(record.state) }, args: (record, store) => { - var fieldsToReturn = ['podid', 'clusterid', 'hostid'] + var fieldsToReturn = [] + if (['Admin'].includes(store.userInfo.roletype)) { + fieldsToReturn = ['podid', 'clusterid', 'hostid'] + } if (record.hypervisor === 'VMware') { - fieldsToReturn.add('bootintosetup') + fieldsToReturn = fieldsToReturn.concat(['bootintosetup']) } - return ['Admin'].includes(store.userInfo.roletype) ? fieldsToReturn " [] + return fieldsToReturn }, response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null } }, From 10ddb1d40c2e2928fdd70b20a0c248a7ce8c8e36 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Fri, 5 Jun 2020 15:46:23 +0200 Subject: [PATCH 09/10] label strategy update --- src/locales/en.json | 388 +++------------------------------ src/views/compute/DeployVM.vue | 2 +- 2 files changed, 32 insertions(+), 358 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 136e54a55..27a14b984 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,361 +1,34 @@ { -"Accounts": "Accounts", -"Affinity Groups": "Affinity Groups", -"Alerts": "Alerts", -"allocated": "Allocated", -"cancel": "Cancel", -"CPU Sockets": "CPU Sockets", -"Cloudian Storage": "Cloudian Storage", -"Clusters": "Clusters", -"Compute": "Compute", -"Compute Offerings": "Compute Offerings", -"confirmacceptinvitation": "Please confirm you wish to join this project", -"confirmdeclineinvitation": "Are you sure you want to decline this project invitation?", -"Configuration": "Configuration", -"Dashboard": "Dashboard", -"Disk Offerings": "Disk Offerings", -"Domains": "Domains", -"done": "Done", -"Events": "Events", -"Global Settings": "Global Settings", -"Hosts": "Hosts", -"Hypervisor Capabilities": "Hypervisor capabilities", -"ISOs": "ISOs", -"Identity and Access": "Identity and Access", -"Infrastructure": "Infrastructure", -"Instances": "Instances", -"LDAP Configuration": "LDAP Configuration", -"Management Servers": "Management Servers", -"monday": "Monday", -"Monitor": "Monitor", -"Network": "Network", -"Network Offerings": "Network Offerings", -"Plugins": "Plugins", -"Pods": "Pods", -"Primary Storage": "Primary Storage", -"Projects": "Projects", -"Public IP Addresses": "Public IP Addresses", -"Public network": "Public network", -"Quota": "Quota", -"RESOURCE_NAME": "Resource Name", -"Roles": "Roles", -"SSH Key Pairs": "SSH Key Pairs", -"Secondary Storage": "Secondary Storage", -"Security Groups": "Security Groups", -"Snapshots": "Snapshots", -"Storage": "Storage", -"System Offerings": "System Offerings", -"System VMs": "System VMs", -"Templates": "Templates", -"tuesday": "Tuesday", -"thursday": "Thursday", -"Users": "Users", -"VM Snapshots": "VM Snapshots", -"VPC": "VPC", -"VPC Offerings": "VPC Offerings", -"VPN Gateway": "VPN Gateway", -"Virtual Routers": "Virtual Routers", -"Volumes": "Volumes", -"Zones": "Zones", -"access": "Access", -"accesskey": "Access Key", -"account": "Account", -"accountId": "Account", -"accountTotal": "Accounts", -"accountlist": "Accounts", -"accounts": "Accounts", -"accounttype": "Account Type", -"aclTotal": "Network ACL Total", -"aclid": "ACL", -"aclname": "ACL Name", -"action": "Action", -"activeviewersessions": "Active Sessions", -"add": "Add", -"add-scaleDowncondition": "Add", -"add-scaleUpcondition": "Add", -"address": "Address", -"admin": "Domain Admin", -"affinitygroup": "Affinity Group", -"agentPassword": "Agent Password", -"agentPort": "Agent Port", -"agentUsername": "Agent Username", -"agentstate": "Agent State", -"algorithm": "Algorithm", -"all": "All", -"allocatediops": "IOPS Allocated", -"allocationstate": "Allocation State", -"allowuserdrivenbackups": "Allow User Driven Backups", -"annotation": "Annotation", -"apikey": "API Key", -"associatednetwork": "Associated Network", -"associatednetworkid": "Associated Network ID", -"associatednetworkname": "Network Name", -"asyncBackup": "Async Backup", -"availability": "Availability", -"availabilityZone": "Availability Zone", -"balance": "Balance", -"baremetalCpu": "CPU (in MHz)", -"baremetalCpuCores": "# of CPU Cores", -"baremetalMAC": "Host MAC", -"baremetalMemory": "Memory (in MB)", -"backupofferingid": "Backup Offering", -"bcfdeviceid": "ID", -"bladeid": "Blade ID", -"bootable": "Bootable", -"bootintosetup": "Boot into hardware setup", -"broadcastdomainrange": "Broadcast domain range", -"broadcastdomaintype": "Broadcast Domain Type", -"broadcasturi": "Broadcast URI", -"bucket": "Bucket", -"bypassvlanoverlapcheck": "Bypass VLAN id/range overlap", -"cachemode": "Write-cache Type", -"capacity": "Capacity", -"capacityBytes": "Capacity Bytes", -"capacityIops": "Capacity IOPS", -"capacityiops": "IOPS Total", -"certchain": "Chain", -"certificate": "Certificate", -"certificateid": "Certificate ID", -"chassis": "Chassis", -"checksum": "Checksum", -"cidr": "Super CIDR for Guest Networks", -"cidrlist": "CIDR list", -"cks.cluster.size": "Cluster size (Worker nodes)", -"cleanup": "Clean up", -"clusterId": "Cluster", -"clusterid": "Cluster", -"clustername": "Cluster", -"clusternamelabel": "Cluster Name", -"clusters": "Clusters", -"clustertype": "Cluster Type", -"confirmpassword": "Confirm Password", -"connectiontimeout": "Connection Timeout", -"conservemode": "Conserve mode", -"counterid": "Counter", -"cpuCap": "CPU Cap", -"cpulimit": "CPU limits", -"cpuNumber": "# of CPU Cores", -"cpuSpeed": "CPU (in MHz)", -"cpuallocated": "CPU Allocated for VMs", -"cpuallocatedghz": "Allocated", -"cpumaxdeviation": "Deviation", -"cpunumber": "CPU Cores", -"cpusockets": "The Number of CPU Sockets", -"cpuspeed": "CPU (in MHz)", -"cputotal": "Total CPU", -"cputotalghz": "Total", -"cpuused": "CPU Utilized", -"cpuusedghz": "Used CPU", -"createNfsCache": "Create NFS secondary staging store", -"created": "Created", -"credit": "Credit", -"crossZones": "Cross Zones", -"current": "isCurrent", -"currentpassword": "Current Password", -"date": "Date", -"dedicated": "Dedicated", -"default": "Default", -"deleteconfirm": "Please confirm that you would like to delete this {name}", -"deleteprofile": "Delete Profile", -"deploymentPlanner": "Deployment planner", -"deploymentplanner": "Deployment planner", -"description": "Description", -"destination": "Destination", -"destinationZoneId": "Destination Zone", -"destinationphysicalnetworkid": "Destination physical network ID", -"destroyVMgracePeriod": "Destroy VM Grace Period", -"details": "Details", -"deviceid": "Device ID", -"directdownload": "Direct Download", -"disconnected": "Last Disconnected", -"disk": "Disk", -"diskBytesReadRate": "Disk Read Rate (BPS)", -"diskBytesWriteRate": "Disk Write Rate (BPS)", -"diskIopsReadRate": "Disk Read Rate (IOPS)", -"diskIopsWriteRate": "Disk Write Rate (IOPS)", -"diskoffering": "Disk Offering", -"diskofferingid": "Disk Offering", -"diskSize": "Disk Size (in GB)", -"diskiopstotal": "Disk IOPS", -"diskioread": "Disk Read (IO)", -"diskiowrite": "Disk Write (IO)", -"diskkbsread": "Disk Read (Bytes)", -"diskkbswrite": "Disk Write (Bytes)", -"diskofferingdisplaytext": "Disk Offering", -"disksize": "Disk Size (in GB)", -"disksizeallocated": "Disk Allocated", -"disksizeallocatedgb": "Allocated", -"disksizetotal": "Disk Total", -"disksizetotalgb": "Total", -"disksizeunallocatedgb": "Unallocated", -"disksizeusedgb": "Used", -"displayText": "Description", -"displayname": "Display Name", -"displaytext": "Description", -"distributedvpcrouter": "Distributed VPC Router", -"dns1": "DNS 1", -"dns2": "DNS 2", -"domain": "Domain", -"domainId": "Domain", -"domainid": "Domain ID", -"domainname": "Domain", -"domainpath": "Domain", -"dpd": "Dead Peer Detection", -"driver": "Driver", -"egressdefaultpolicy": "Default egress policy", -"email": "Email", -"enddate": "By date (end)", -"endip": "End IP", -"endipv4": "IPv4 End IP", -"endipv6": "IPv6 End IP", -"endpoint": "Endpoint", -"endport": "End Port", -"espEncryption": "ESP Encryption", -"espHash": "ESP Hash", -"esplifetime": "ESP Lifetime (second)", -"esppolicy": "ESP policy", -"expunge": "Expunge", -"externalloadbalanceripaddress": "External load balancer IP address", -"externalid": "External Id", -"extra": "Extra Arguments", -"files":"Alternate Files to Retrieve", -"fingerprint": "FingerPrint", -"firewall": "Firewall", -"firstname": "First Name", -"forced": "Force", -"forceencap": "Force UDP Encapsulation of ESP Packets", -"forgedtransmits": "Forged Transmits", -"format": "Format", -"friday": "Friday", -"fwdevicecapacity": "Capacity", -"fwdeviceid": "ID", -"fwdevicename": "Type", -"fwdevicestate": "Status", -"gateway": "Gateway", -"glustervolume": "Volume", -"gpu": "GPU", -"group": "Group", -"gslbdomainname": "GSLB Domain Name", -"gslblbmethod": "Algorithm", -"gslbprovider": "GSLB service", -"gslbproviderprivateip": "GSLB service Private IP", -"gslbproviderpublicip": "GSLB service Public IP", -"gslbservicetype": "Service Type", -"guestEndIp": "Guest end IP", -"guestGateway": "Guest Gateway", -"guestIpType": "Guest Type", -"guestNetmask": "Guest Netmask", -"guestNetwork": "Guest Network", -"guestStartIp": "Guest start IP", -"guestcidraddress": "Guest CIDR", -"guestipaddress": "Guest IP Address", -"guestiptype": "Guest Type", -"guestnetworkid": "Network ID", -"guestnetworkname": "Network Name", -"guestosid": "OS Type", -"guestvlanrange": "VLAN Range(s)", -"haenable": "HA Enabled", -"hahost": "HA Enabled", -"haprovider": "HA Provider", -"hardware": "Hardware", -"hastate": "HA State", -"hideipaddressusage": "Hide IP Address Usage", -"host": "IP Address", -"hostId": "Host", -"hostTags": "Host Tags", -"hostname": "Host", -"hostnamelabel": "Host Name", -"hosts": "Hosts", -"hosttags": "Host Tags", -"hypervisor": "Hypervisor", -"hypervisorSnapshotReserve": "Hypervisor Snapshot Reserve", -"hypervisorsnapshotreserve": "Hypervisor Snapshot Reserve", -"hypervisortype": "Hypervisor", -"hypervisorversion": "Hypervisor Version", -"hypervnetworklabel": "HyperV Traffic Label", -"icmp": "ICMP", -"icmpcode": "ICMP Code", -"icmptype": "ICMP Type", -"id": "ID", -"ikeDh": "IKE DH", -"ikeEncryption": "IKE Encryption", -"ikeHash": "IKE Hash", -"ikelifetime": "IKE lifetime (second)", -"ikepolicy": "IKE policy", -"insideportprofile": "Inside Port Profile", -"instancename": "Internal name", -"instanceport": "Instance Port", -"instances": "Instances", -"instances.actions.reboot.label": "Reboot instance", -"internaldns1": "Internal DNS 1", -"internaldns2": "Internal DNS 2", -"interval": "Polling Interval (in sec)", -"intervaltype": "Interval Type", -"invitations": "Invitations", -"ip": "IP Address", -"ips": "IPs", -"ip4Netmask": "IPv4 Netmask", -"ip4dns1": "IPv4 DNS1", -"ip4dns2": "IPv4 DNS2", -"ip4gateway": "IPv4 Gateway", -"ip6address": "IPv6 IP Address", -"ip6cidr": "IPv6 CIDR", -"ip6dns1": "IPv6 DNS1", -"ip6dns2": "IPv6 DNS2", -"ip6gateway": "IPv6 Gateway", -"iplimit": "Public IP Limits", -"ipaddress": "IP Address", -"ipaddress1": "IP Address", -"ipaddress2": "IP Address", -"ipsecpsk": "IPsec Preshared-Key", -"iptotal": "Total of IP Addresses", -"iqn": "Target IQN", -"isAdvanced": "Show advanced settings", -"isBootable": "Bootable", -"isCustomized": "Custom Disk Size", -"isCustomizedIops": "Custom IOPS", -"isDedicated": "Dedicate", -"isFeatured": "Featured", -"isForced": "Force Delete", -"isManaged": "Managed", -"isPasswordEnabled": "Password Enabled", -"isPersistent": "Persistent ", -"isPublic": "Public", -"isVolatile": "Volatile", -"iscustomized": "Custom Disk Size", -"iscustomizediops": "Custom IOPS", -"isdedicated": "Dedicated", -"isdefault": "Is Default", -"isdynamicallyscalable": "Dynamically Scalable", -"isextractable": "Extractable", -"isfeatured": "Featured", -"iso": "ISO", -"isoid": "ISO", -"isolatedpvlantype": "Secondary Isolated VLAN Type", -"isolatedpvlanid": "Secondary Isolated VLAN ID", -"isolationmethods": "Isolation method", -"isolationuri": "Isolation URI", -"isoname": "Attached ISO", -"isostate": "ISO State", -"ispersistent": "Persistent ", -"isportable": "Cross Zones", -"ispublic": "Public", -"isready": "Ready", -"isredundantrouter": "Redundant Router", -"isrouting": "Routing", -"issourcenat": "Source NAT", -"isstaticnat": "Static NAT", -"issystem": "Is System", -"isvolatile": "Volatile", -"keep": "Keep", -"key": "Key", -"keyboardType": "Keyboard type", -"keypair": "SSH Key Pair", -"kubernetesversionid": "Kubernetes version", -"kubernetesversionname": "Kubernetes version", -"kvmnetworklabel": "KVM Traffic Label", -"l2gatewayserviceuuid": "L2 Gateway Service Uuid", -"l3gatewayserviceuuid": "L3 Gateway Service Uuid", +"changed.item.properties": "Changed item properties", +"confirm.enable.s3": "Please fill in the following information to enable support for S3-backed Secondary Storage", +"confirm.enable.swift": "Please fill in the following information to enable support for Swift", +"error.could.not.change.your.password.because.non.native.user": "Error could not change your password because user is not a native CloudStack user.", +"error.could.not.enable.zone": "Could not enable zone", +"error.installwizard.message": "Something went wrong; you may go back and correct any errors", +"error.invalid.username.password": "Invalid username or password.

This could also be a restriction on the IP address you are connecting from.", +"error.login": "Your username/password does not match our records.", +"error.menu.select": "Unable to perform action due to no items being selected.", +"error.mgmt.server.inaccessible": "The Management Server is unaccessible. Please try again later.", +"error.password.not.match": "The password fields do not match", +"error.please.specify.physical.network.tags": "Network offerings is not available until you specify tags for this physical network.", +"error.session.expired": "Your session has expired.", +"error.unable.to.reach.management.server": "Unable to reach Management Server", +"error.unresolved.internet.name": "Your internet name cannot be resolved.", +"force.delete.domain.warning": "Warning: Choosing this option will cause the deletion of all child domains and all associated accounts and their resources.", +"force.remove": "Force Remove", +"force.remove.host.warning": "Warning: Choosing this option will cause CloudStack to forcefully stop all running virtual machines before removing this host from the cluster.", +"force.stop": "Force Stop", +"force.stop.instance.warning": "Warning: Forcing a stop on this instance should be your last option. It can lead to data loss as well as inconsistent behavior of the virtual machine state.", +"hint.no.host.tags": "No host tags found", +"hint.no.storage.tags": "No storage tags found", +"hint.type.part.host.tag": "Type in part of a host tag", +"hint.type.part.storage.tag": "Type in part of a storage tag", +"icmp.code.desc": "Please specify -1 if you want to allow all ICMP codes", +"icmp.type.desc": "Please specify -1 if you want to allow all ICMP types.", +"image.directory": "Image Directory", +"inline": "Inline", +"label.about": "About", +"label.about.app": "About CloudStack", "label.accept.project.invitation": "Accept project invitation", "label.access": "Access", "label.accesskey": "Access Key", @@ -781,6 +454,7 @@ "label.bladeid": "Blade ID", "label.blades": "Blades", "label.bootable": "Bootable", +"label.bootintosetup": "Boot into hardware setup", "label.broadcastdomainrange": "Broadcast domain range", "label.broadcastdomaintype": "Broadcast Domain Type", "label.broadcasturi": "Broadcast URI", diff --git a/src/views/compute/DeployVM.vue b/src/views/compute/DeployVM.vue index ef60318c2..095645ce5 100644 --- a/src/views/compute/DeployVM.vue +++ b/src/views/compute/DeployVM.vue @@ -87,7 +87,7 @@ v-decorator="['userdata']"> - + From f4f56f18f35a064e1d9c5318945c954cb8ce4d97 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Tue, 16 Jun 2020 15:20:26 +0530 Subject: [PATCH 10/10] fix bootintobios issue Signed-off-by: Rohit Yadav --- src/config/section/compute.js | 22 ++++++++++++++++------ src/utils/request.js | 3 ++- src/views/compute/DeployVM.vue | 10 +++++----- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/config/section/compute.js b/src/config/section/compute.js index ccab2c45e..f948d340b 100644 --- a/src/config/section/compute.js +++ b/src/config/section/compute.js @@ -90,14 +90,16 @@ export default { groupAction: true, show: (record) => { return ['Stopped'].includes(record.state) }, args: (record, store) => { - var fieldsToReturn = [] - if (['Admin'].includes(store.userInfo.roletype)) { - fieldsToReturn = ['podid', 'clusterid', 'hostid'] + var fields = [] + if (store.userInfo.roletype === 'Admin') { + fields = ['podid', 'clusterid', 'hostid'] } if (record.hypervisor === 'VMware') { - fieldsToReturn = fieldsToReturn.concat(['bootintosetup']) + if (store.apis.startVirtualMachine.params.filter(x => x.name === 'bootintosetup').length > 0) { + fields.push('bootintosetup') + } } - return fieldsToReturn + return fields }, response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null } }, @@ -119,7 +121,15 @@ export default { message: 'message.action.reboot.instance', dataView: true, show: (record) => { return ['Running'].includes(record.state) }, - args: (record) => { return record.hypervisor === 'VMware' ? ['bootintosetup'] : [] } + args: (record, store) => { + var fields = [] + if (record.hypervisor === 'VMware') { + if (store.apis.rebootVirtualMachine.params.filter(x => x.name === 'bootintosetup').length > 0) { + fields.push('bootintosetup') + } + } + return fields + } }, { api: 'restoreVirtualMachine', diff --git a/src/utils/request.js b/src/utils/request.js index 0582ee850..1131a6e4f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -18,6 +18,7 @@ import Vue from 'vue' import axios from 'axios' import config from '@/config/settings' +import router from '@/router' import store from '@/store' import { VueAxios } from './axios' import notification from 'ant-design-vue/es/notification' @@ -53,7 +54,7 @@ const err = (error) => { } if (response.status === 404) { notification.error({ message: 'Not Found', description: 'Resource not found' }) - this.$router.push({ path: '/exception/404' }) + router.push({ path: '/exception/404' }) } } if (error.isAxiosError && !error.response) { diff --git a/src/views/compute/DeployVM.vue b/src/views/compute/DeployVM.vue index 093a6edb8..4071a7a26 100644 --- a/src/views/compute/DeployVM.vue +++ b/src/views/compute/DeployVM.vue @@ -87,11 +87,6 @@ v-decorator="['userdata']"> - - - - @@ -138,6 +133,11 @@ @change="value => this.hypervisor = value" />

+ + + +