fix remove agent and ping

This commit is contained in:
sadnub
2021-10-21 17:05:32 -04:00
parent 4341986bd7
commit 591c69194c

View File

@@ -598,21 +598,24 @@ export default {
html: true,
})
.onOk(val => {
this.$q.loading.show();
this.$axios
.delete(`/agents/${agent_id}/`)
.delete(`/agents/${agent.agent_id}/`)
.then(r => {
this.notifySuccess(r.data);
setTimeout(() => {
location.reload();
}, 2000);
})
.catch(e => {});
.catch(e => {
this.$q.loading.hide();
});
});
},
pingAgent(agent) {
this.$q.loading.show();
this.$axios
.get(`/agents/${agent_id}/ping/`)
.get(`/agents/${agent.agent_id}/ping/`)
.then(r => {
this.$q.loading.hide();
if (r.data.status === "offline") {