diff --git a/src/components/AgentTable.vue b/src/components/AgentTable.vue index 5ae5bbd..4e4bc9a 100644 --- a/src/components/AgentTable.vue +++ b/src/components/AgentTable.vue @@ -555,13 +555,17 @@ export default { persistent: true, }) .onOk(() => { - const data = { pk: pk, action: "rebootnow" }; - axios.post("/agents/poweraction/", data).then(r => { - this.$q.dialog({ - title: `Restarting ${hostname}`, - message: `${hostname} will now be restarted`, + this.$q.loading.show(); + this.$axios + .post("/agents/reboot/", { pk: pk }) + .then(r => { + this.$q.loading.hide(); + this.notifySuccess(`${hostname} will now be restarted`); + }) + .catch(e => { + this.$q.loading.hide(); + this.notifyError(e.response.data); }); - }); }); }, agentRowSelected(pk) { diff --git a/src/components/modals/agents/RebootLater.vue b/src/components/modals/agents/RebootLater.vue index 9ebe48c..d6fa6a9 100644 --- a/src/components/modals/agents/RebootLater.vue +++ b/src/components/modals/agents/RebootLater.vue @@ -33,7 +33,6 @@