imports/vx/server/code/vxapp.js
/**
     * For RESTORE deployment action, return i18n bundle key and variables
     * used to populate a text area in the deployment modal.
     *
     * @param {object} formObject Form object from deployment modal.
     * @return {object} Result object.
     */
For RESTORE deployment action, return i18n bundle key and variables
used to populate a text area in the deployment modal.

@param {object} formObject Form object from deployment modal.
@return {object} Result object.
For RESTORE deployment action return i18n bundle key and variables used to populate a text area in the deployment modal . @param { object } formObject Form object from deployment modal . @return { object } Result object .
deploymentMessage(formObject) {
        try {
            const targetDomainName = Util.fetchDomainName(formObject.targetDomain)
            let history = History.findOne( { domain: formObject.targetDomain } )
            if (!history) {
                return { success : false, key : "common.alert_deployment_message_no_history", variables : { targetDomainName } }
            }
            const snapshot = history.snapshots[formObject.snapshotIndex]
            const dateTime = Util.formatDateTime(snapshot.date)
            return { success : true, key: "common.alert_deployment_message_restore", variables : { targetDomainName, dateTime } }
        }
        catch (error) {
            OLog.error(`vxapp.js deploymentMessage unexpected error=${error}`)
            return { success : false, icon : "BUG", key : "common.alert_unexpected_error", variables : { error : error.toString() } }
        }
    }
deploymentMessage ( formObject ) { try { const targetDomainName = Util . fetchDomainName ( formObject . targetDomain ) let history = History . findOne ( { domain : formObject . targetDomain } ) if ( ! history ) { return { success : false , key : "common.alert_deployment_message_no_history" , variables : { targetDomainName } } } const snapshot = history . snapshots [ formObject . snapshotIndex ] const dateTime = Util . formatDateTime ( snapshot . date ) return { success : true , key : "common.alert_deployment_message_restore" , variables : { targetDomainName , dateTime } } } catch ( error ) { OLog . error ( ` ${ error } ` ) return { success : false , icon : "BUG" , key : "common.alert_unexpected_error" , variables : { error : error . toString ( ) } } } }
For RESTORE deployment action, return i18n bundle key and variables
 used to populate a text area in the deployment modal.
For RESTORE deployment action return i18n bundle key and variables used to populate a text area in the deployment modal .