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 7e9a289 Using post for uploadSslCert api (#842)
7e9a289 is described below
commit 7e9a2895d8bc4171574c2f86b013a43ab5fa93d8
Author: davidjumani <[email protected]>
AuthorDate: Thu Jan 14 06:11:47 2021 +0530
Using post for uploadSslCert api (#842)
* Adding post param to actions
* Using post for uploadSslCert api
---
src/config/section/account.js | 1 +
src/views/AutogenView.vue | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/config/section/account.js b/src/config/section/account.js
index 9fdf990..1fce57a 100644
--- a/src/config/section/account.js
+++ b/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/src/views/AutogenView.vue b/src/views/AutogenView.vue
index c9b3a82..0cdf4a6 100644
--- a/src/views/AutogenView.vue
+++ b/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)