From fafaf11a156f9b04a6e200af864955fe77f9b272 Mon Sep 17 00:00:00 2001 From: davidjumani Date: Thu, 14 Jan 2021 06:11:47 +0530 Subject: [PATCH] Using post for uploadSslCert api (#842) * Adding post param to actions * Using post for uploadSslCert api Signed-off-by: Rohit Yadav --- ui/src/config/section/account.js | 1 + ui/src/views/AutogenView.vue | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/src/config/section/account.js b/ui/src/config/section/account.js index 9fdf990c469..1fce57aad7b 100644 --- a/ui/src/config/section/account.js +++ b/ui/src/config/section/account.js @@ -160,6 +160,7 @@ export default { label: 'label.add.certificate', dataView: true, args: ['name', 'certificate', 'privatekey', 'certchain', 'password', 'account', 'domainid'], + post: true, show: (record) => { return record.state === 'enabled' }, mapping: { account: { diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index c9b3a820690..0cdf4a62f45 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -1000,7 +1000,13 @@ export default { var hasJobId = false this.actionLoading = true - api(action.api, params).then(json => { + let args = null + if (action.post) { + args = [action.api, {}, 'POST', params] + } else { + args = [action.api, params] + } + api(...args).then(json => { hasJobId = this.handleResponse(json, resourceName, action) if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) { this.$router.go(-1)