maxgui/src/store/maxscale.js
/**
         * This function returns previous logData array from previous cursor page link.
         * It also assigns prev link
         * @returns previous logData array
         */
This function returns previous logData array from previous cursor page link.
It also assigns prev link
@returns previous logData array
This function returns previous logData array from previous cursor page link . It also assigns prev link @returns previous logData array
async fetchPrevLog({ commit, state }) {
            try {
                const indexOfEndpoint = state.prev_log_link.indexOf('/maxscale/logs/')
                const endpoint = state.prev_log_link.slice(indexOfEndpoint)
                const res = await this.vue.$axios.get(endpoint)
                const {
                    data: { attributes: { log = [] } = {} } = {},
                    links: { prev = null },
                } = res.data
                commit('SET_PREV_LOG_DATA', log)
                commit('SET_PREV_LOG_LINK', prev)
            } catch (e) {
                this.vue.$logger('store-maxscale-fetchPrevLog').error(e)
            }
        }
async fetchPrevLog ( { commit , state } ) { try { const indexOfEndpoint = state . prev_log_link . indexOf ( '/maxscale/logs/' ) const endpoint = state . prev_log_link . slice ( indexOfEndpoint ) const res = await this . vue . $axios . get ( endpoint ) const { data : { attributes : { log = [ ] } = { } } = { } , links : { prev = null } , } = res . data commit ( 'SET_PREV_LOG_DATA' , log ) commit ( 'SET_PREV_LOG_LINK' , prev ) } catch ( e ) { this . vue . $logger ( 'store-maxscale-fetchPrevLog' ) . error ( e ) } }
This function returns previous logData array from previous cursor page link.
This function returns previous logData array from previous cursor page link .