mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-03-04 12:53:22 +00:00
start moving schedtasks to nats wh1te909/rmmagent@0cde11a067
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import { mapGetters } from "vuex";
|
||||
import mixins from "@/mixins/mixins";
|
||||
import { date } from "quasar";
|
||||
@@ -50,8 +49,8 @@ export default {
|
||||
scheduleReboot() {
|
||||
this.$q.loading.show({ message: "Contacting agent..." });
|
||||
const data = { pk: this.selectedAgentPk, datetime: this.datetime };
|
||||
axios
|
||||
.post("/agents/rebootlater/", data)
|
||||
this.$axios
|
||||
.patch("/agents/reboot/", data)
|
||||
.then(r => {
|
||||
this.$q.loading.hide();
|
||||
this.$emit("close");
|
||||
|
||||
Reference in New Issue
Block a user