From a42af90cb580fa9e4eb95895cec52b5876cc2256 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 22 Nov 2020 11:29:47 +0000 Subject: [PATCH] mesh nats --- src/views/TakeControl.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/TakeControl.vue b/src/views/TakeControl.vue index 8c85077..02e1281 100644 --- a/src/views/TakeControl.vue +++ b/src/views/TakeControl.vue @@ -75,13 +75,19 @@ export default { restart() { this.visible = false; this.$q.loading.show({ message: "Restarting Mesh Agent" }); + const data = { + pk: this.$route.params.pk, + sv_name: "mesh agent", + sv_action: "restart", + }; + this.$axios - .get(`/agents/${this.$route.params.pk}/restartmesh/`) + .post("/services/serviceaction/", data) .then(r => { setTimeout(() => { this.visible = true; this.$q.loading.hide(); - this.notifySuccess(r.data); + this.notifySuccess("Mesh agent service was restarted"); }, 500); }) .catch(e => {