From 629cdfb6ca1fda256a899c03100c236566520071 Mon Sep 17 00:00:00 2001 From: eugenijm Date: Tue, 21 Jan 2020 07:21:37 +0300 Subject: [PATCH] Make peer list filterable --- src/store/getters.js | 4 +++- src/store/modules/peers.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/getters.js b/src/store/getters.js index f58f0c6b..d51dbd28 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -17,6 +17,8 @@ const getters = { errorLogs: state => state.errorLog.logs, users: state => state.users.fetchedUsers, authHost: state => state.user.authHost, - settings: state => state.settings + settings: state => state.settings, + instances: state => state.peers.fetchedPeers, + statuses: state => state.status.fetchedStatuses } export default getters diff --git a/src/store/modules/peers.js b/src/store/modules/peers.js index fa37a1d0..ba5b29b4 100644 --- a/src/store/modules/peers.js +++ b/src/store/modules/peers.js @@ -19,7 +19,7 @@ const peers = { async FetchPeers({ commit, getters }) { const peers = await fetchPeers(getters.authHost, getters.token) - commit('SET_PEERS', peers.data) + commit('SET_PEERS', [...peers.data].sort()) commit('SET_LOADING', false) } }