RitchieVincent commented on a change in pull request #54: [WIP] Infrasummary SSL
URL: https://github.com/apache/cloudstack-primate/pull/54#discussion_r354006741
 
 

 ##########
 File path: src/views/infra/InfraSummary.vue
 ##########
 @@ -115,17 +211,109 @@ export default {
         this.loading = false
       })
     },
-    handleSslForm (e) {
-      console.log(e)
+
+    /**
+     * Resets all SSL Form Data to initial values
+     */
+    resetSslFormData () {
+      this.form.resetFields()
+      this.intermediateCertificates = []
+      this.sslFormSubmitting = false
+      this.sslFormVisible = false
+    },
+
+    /**
+     * Method to run when the modal window is closed
+     */
+    sslModalClose () {
+      this.resetSslFormData()
+    },
+
+    /**
+     * Add empty intermediate certificate input to SSL form
+     */
+    addIntermediateCert () {
+      this.intermediateCertificates.push('')
+    },
+
+    /**
+     * Create new FormData object, and append the supplied data to it.
+     * @param {Number} count - The value of the id
+     * @param {String} cert - The certificate value
+     * @param {String} domain - The domain suffix value
+     * @param {String} nameKey - The value of either the 'name' key, or 
'privatekey' key
+     * @param {Boolean} [defaultNameKey=true] - This controls whether to use 
the 'name' key or 'privatekey' key
+     * @returns {FormData} - Returns a FormData object, ready to be sent via 
POST
+     */
+    appendFormData (count, cert, domain, nameKey, defaultNameKey = true) {
+      const formData = new FormData()
 
 Review comment:
   I've updated this in another WIP PR. If you're happy with that functionality 
then I can port it over to this one.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to