maxgui/src/store/maxscale.js
// TODO: add filter params once maxscale supports it
add filter params once maxscale supports it
add filter params once maxscale supports it
async fetchPrevFilteredLog({ commit, state }) {
            try {
                const prevLink = state.prev_filtered_log_link
                    ? state.prev_filtered_log_link
                    : state.prev_log_link
                const indexOfEndpoint = prevLink.indexOf('/maxscale/logs/')
                const endpoint = prevLink.slice(indexOfEndpoint)
                const res = await this.vue.$axios.get(endpoint)
                const {
                    data: { attributes: { log = [] } = {} } = {},
                    links: { prev = null },
                } = res.data
                commit('SET_PREV_FILTERED_LOG_DATA', log)
                commit('SET_PREV_FILTERED_LOG_LINK', prev)
            } catch (e) {
                this.vue.$logger('store-maxscale-fetchPrevFilteredLog').error(e)
            }
        }
async fetchPrevFilteredLog ( { commit , state } ) { try { const prevLink = state . prev_filtered_log_link ? state . prev_filtered_log_link : state . prev_log_link const indexOfEndpoint = prevLink . indexOf ( '/maxscale/logs/' ) const endpoint = prevLink . slice ( indexOfEndpoint ) const res = await this . vue . $axios . get ( endpoint ) const { data : { attributes : { log = [ ] } = { } } = { } , links : { prev = null } , } = res . data commit ( 'SET_PREV_FILTERED_LOG_DATA' , log ) commit ( 'SET_PREV_FILTERED_LOG_LINK' , prev ) } catch ( e ) { this . vue . $logger ( 'store-maxscale-fetchPrevFilteredLog' ) . error ( e ) } }
TODO: add filter params once maxscale supports it
TODO : add filter params once maxscale supports it