diff --git a/src/components/AgentTable.vue b/src/components/AgentTable.vue
index 6d53204..49f2f5a 100644
--- a/src/components/AgentTable.vue
+++ b/src/components/AgentTable.vue
@@ -163,7 +163,7 @@
clickable
v-ripple
v-close-popup
- @click.stop.prevent="rebootLater(props.row.id, props.row.hostname)"
+ @click.stop.prevent="showRebootLaterModal = true"
>
Later
@@ -295,6 +295,10 @@
+
+
+
+
@@ -302,10 +306,11 @@
import axios from "axios";
import mixins from "@/mixins/mixins";
import EditAgent from "@/components/modals/agents/EditAgent";
+import RebootLater from "@/components/modals/agents/RebootLater";
export default {
name: "AgentTable",
props: ["frame", "columns", "tab", "filter", "userName"],
- components: { EditAgent },
+ components: { EditAgent, RebootLater },
mixins: [mixins],
data() {
return {
@@ -319,7 +324,8 @@ export default {
sendCommandHostname: "",
rawCMD: "",
loadingSendCMD: false,
- showEditAgentModal: false
+ showEditAgentModal: false,
+ showRebootLaterModal: false
};
},
methods: {
@@ -402,10 +408,6 @@ export default {
});
});
},
- rebootLater() {
- // TODO implement this
- console.log("reboot later");
- },
toggleSendCommand(pk, hostname) {
this.sendCommandToggle = true;
this.sendCommandID = pk;
diff --git a/src/components/modals/agents/RebootLater.vue b/src/components/modals/agents/RebootLater.vue
new file mode 100644
index 0000000..e786ea5
--- /dev/null
+++ b/src/components/modals/agents/RebootLater.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
Schedule a reboot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/mixins/mixins.js b/src/mixins/mixins.js
index 2c951ad..728c17f 100644
--- a/src/mixins/mixins.js
+++ b/src/mixins/mixins.js
@@ -25,28 +25,32 @@ export default {
return Math.round(elapsed / msPerYear) + " years ago";
}
},
- notifySuccess(msg) {
+ notifySuccess(msg, timeout = 2000) {
Notify.create({
type: "positive",
- message: msg
+ message: msg,
+ timeout: timeout
});
},
- notifyError(msg) {
+ notifyError(msg, timeout = 2000) {
Notify.create({
type: "negative",
- message: msg
+ message: msg,
+ timeout: timeout
});
},
- notifyWarning(msg) {
+ notifyWarning(msg, timeout = 2000) {
Notify.create({
type: "warning",
- message: msg
+ message: msg,
+ timeout: timeout
});
},
- notifyInfo(msg) {
+ notifyInfo(msg, timeout = 2000) {
Notify.create({
type: "info",
- message: msg
+ message: msg,
+ timeout: timeout
});
}
}