maxgui/src/store/monitor.js
/**
         * @param {String} payload.monitorModule Monitor module
         * @param {String} payload.monitorId Monitor id
         * @param {String} payload.master Name of the new master server
         * @param {Function} payload.callback callback function after successfully updated
         */
@param {String} payload.monitorModule Monitor module
@param {String} payload.monitorId Monitor id
@param {String} payload.master Name of the new master server
@param {Function} payload.callback callback function after successfully updated
@param { String } payload . monitorModule Monitor module @param { String } payload . monitorId Monitor id @param { String } payload . master Name of the new master server @param { Function } payload . callback callback function after successfully updated
async switchOver(_, { monitorModule, monitorId, masterId, callback }) {
            try {
                let res
                res = await this.vue.$axios.post(
                    `/maxscale/modules/${monitorModule}/async-switchover?${monitorId}&${masterId}`
                )
                if (res.status === 204) if (this.vue.$help.isFunction(callback)) await callback()
            } catch (e) {
                const logger = this.vue.$logger('store-monitor-switchOver')
                logger.error(e)
            }
        }
async switchOver ( _ , { monitorModule , monitorId , masterId , callback } ) { try { let res res = await this . vue . $axios . post ( ` ${ monitorModule } ${ monitorId } ${ masterId } ` ) if ( res . status === 204 ) if ( this . vue . $help . isFunction ( callback ) ) await callback ( ) } catch ( e ) { const logger = this . vue . $logger ( 'store-monitor-switchOver' ) logger . error ( e ) } }
@param {String} payload.monitorModule Monitor module
 @param {String} payload.monitorId Monitor id
 @param {String} payload.master Name of the new master server
 @param {Function} payload.callback callback function after successfully updated
@param { String } payload . monitorModule Monitor module @param { String } payload . monitorId Monitor id @param { String } payload . master Name of the new master server @param { Function } payload . callback callback function after successfully updated
// response ok