diff --git a/src/boot/axios.js b/src/boot/axios.js index ee1e4c9..dfe73a3 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -47,6 +47,8 @@ export default function ({ app, router, store }) { } // perms else if (error.response.status === 403) { + // don't notify user if method is GET + if (error.config.method === "get" || error.config.method === "patch") return Promise.reject({ ...error }); text = error.response.data.detail; } // catch all for other 400 error messages diff --git a/src/store/index.js b/src/store/index.js index dc73671..85becb1 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -13,7 +13,6 @@ export default function () { treeReady: false, selectedRow: null, agentTableLoading: false, - treeLoading: false, needrefresh: false, tableHeight: "300px", tabHeight: "300px", @@ -194,7 +193,9 @@ export default function () { } }) - .catch(e => { }); + .catch(e => { + state.treeReady = true + }); }, checkVer(context) { axios.get("/core/version/").then(r => { diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 09a08d4..911ccfb 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -669,7 +669,9 @@ export default { this.frame = r.data; this.$store.commit("AGENT_TABLE_LOADING", false); }) - .catch(e => {}); + .catch(e => { + this.$store.commit("AGENT_TABLE_LOADING", false); + }); } } }, @@ -694,7 +696,9 @@ export default { this.frame = r.data; this.$store.commit("AGENT_TABLE_LOADING", false); }) - .catch(e => {}); + .catch(e => { + this.$store.commit("AGENT_TABLE_LOADING", false); + }); }, showPolicyAdd(node) { this.$q