start moving schedtasks to nats wh1te909/rmmagent@0cde11a067

This commit is contained in:
wh1te909
2020-11-29 23:40:29 +00:00
parent 1afe61c593
commit 426ebad300
11 changed files with 131 additions and 192 deletions

View File

@@ -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) {