You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/06/13 08:48:32 UTC
[cloudstack-primate] branch master updated: config: mapping fixes
for action parameters
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new b450f3d config: mapping fixes for action parameters
b450f3d is described below
commit b450f3d7c723b74d106023b11e25beef7d09b0f6
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sat Jun 13 14:03:25 2020 +0530
config: mapping fixes for action parameters
Fixes #387
Fixes #390
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
src/config/section/compute.js | 26 +++++++++++++++-----------
src/config/section/storage.js | 10 +---------
2 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/src/config/section/compute.js b/src/config/section/compute.js
index 1dd82e1..1cc70d2 100644
--- a/src/config/section/compute.js
+++ b/src/config/section/compute.js
@@ -207,7 +207,8 @@ export default {
show: (record) => { return ['Running', 'Stopped'].includes(record.state) && !record.isoid },
mapping: {
id: {
- api: 'listIsos'
+ api: 'listIsos',
+ params: (record) => { return { zoneid: record.zoneid } }
},
virtualmachineid: {
value: (record, params) => { return record.id }
@@ -278,7 +279,8 @@ export default {
args: ['storageid', 'virtualmachineid'],
mapping: {
storageid: {
- api: 'listStoragePools'
+ api: 'listStoragePools',
+ params: (record) => { return { zoneid: record.zoneid } }
},
virtualmachineid: {
value: (record) => { return record.id }
@@ -298,12 +300,20 @@ export default {
api: 'resetSSHKeyForVirtualMachine',
icon: 'lock',
label: 'label.reset.ssh.key.pair',
+ message: 'message.desc.reset.ssh.key.pair',
dataView: true,
- args: ['keypair'],
+ args: ['keypair', 'account', 'domainid'],
show: (record) => { return ['Running', 'Stopped'].includes(record.state) },
mapping: {
keypair: {
- api: 'listSSHKeyPairs'
+ api: 'listSSHKeyPairs',
+ params: (record) => { return { account: record.account, domainid: record.domainid } }
+ },
+ account: {
+ value: (record) => { return record.account }
+ },
+ domainid: {
+ value: (record) => { return record.domainid }
}
}
},
@@ -314,13 +324,7 @@ export default {
dataView: true,
component: () => import('@/views/compute/AssignInstance'),
popup: true,
- show: (record) => { return ['Stopped'].includes(record.state) },
- args: ['virtualmachineid', 'account', 'domainid'],
- mapping: {
- virtualmachineid: {
- value: (record, params) => { return record.id }
- }
- }
+ show: (record) => { return ['Stopped'].includes(record.state) }
},
{
api: 'recoverVirtualMachine',
diff --git a/src/config/section/storage.js b/src/config/section/storage.js
index 27eb8e9..e1e7ec2 100644
--- a/src/config/section/storage.js
+++ b/src/config/section/storage.js
@@ -122,15 +122,7 @@ export default {
dataView: true,
show: (record, store) => { return record && record.state === 'Ready' && ['Admin', 'DomainAdmin'].includes(store.userInfo.roletype) },
popup: true,
- component: () => import('@/views/storage/MigrateVolume.vue'),
- mapping: {
- volumeid: {
- value: (record) => { return record.id }
- },
- storageid: {
- api: 'listStoragePools'
- }
- }
+ component: () => import('@/views/storage/MigrateVolume.vue')
},
{
api: 'extractVolume',