diff --git a/src/components/AgentTable.vue b/src/components/AgentTable.vue
index 2416e06..b2c0be8 100644
--- a/src/components/AgentTable.vue
+++ b/src/components/AgentTable.vue
@@ -431,6 +431,7 @@ export default {
this.$store.commit("setActiveRow", pk);
this.$store.dispatch("loadSummary", pk);
this.$store.dispatch("loadChecks", pk);
+ this.$store.dispatch("loadAutomatedTasks", pk);
this.$store.dispatch("loadWinUpdates", pk);
this.$store.dispatch("loadInstalledSoftware", pk);
},
diff --git a/src/components/AutomatedTasksTab.vue b/src/components/AutomatedTasksTab.vue
new file mode 100644
index 0000000..96e9da7
--- /dev/null
+++ b/src/components/AutomatedTasksTab.vue
@@ -0,0 +1,235 @@
+
+ No agent selected
+ No Tasks
+
+
+
+
+
+
+
+
+
+ Automated Task
+
+
+
+
+
+
+ No Tasks
+
+
+
+
+
+
+ Enabled
+
+
+
+
+
+
+
+
+
+
+
+
+ Run task now
+
+
+
+
+
+ Edit
+
+
+
+
+
+ Delete
+
+
+
+ Close
+
+
+
+
+
+
+
+ {{ props.row.name }}
+
+ output
+
+ Awaiting output
+ {{ props.row.last_run }}
+ Has not run yet
+ {{ props.row.schedule }}
+ {{ props.row.assigned_check }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ChecksTab.vue b/src/components/ChecksTab.vue
index 80367c6..19af94e 100644
--- a/src/components/ChecksTab.vue
+++ b/src/components/ChecksTab.vue
@@ -166,6 +166,7 @@
{{ props.row.more_info }}
{{ props.row.last_run }}
+ {{ props.row.assigned_task }}
@@ -311,7 +312,8 @@ export default {
label: "Date / Time",
field: "last_run",
align: "left"
- }
+ },
+ { name: "assignedtasks", label: "Assigned Tasks", field: "assigned_task", align: "left" },
],
pagination: {
rowsPerPage: 9999
@@ -338,6 +340,7 @@ export default {
},
onRefresh(id) {
this.$store.dispatch("loadChecks", id);
+ this.$store.dispatch("loadAutomatedTasks", id);
},
moreInfo(name, output) {
this.$q.dialog({
@@ -390,6 +393,7 @@ export default {
.delete("checks/deletestandardcheck/", { data: data })
.then(r => {
this.$store.dispatch("loadChecks", this.checks.pk);
+ this.$store.dispatch("loadAutomatedTasks", this.checks.pk);
this.notifySuccess("Check was deleted!");
})
.catch(e => this.notifyError(e.response.data.error));
diff --git a/src/components/SoftwareTab.vue b/src/components/SoftwareTab.vue
index 9b8ee52..fd51947 100644
--- a/src/components/SoftwareTab.vue
+++ b/src/components/SoftwareTab.vue
@@ -1,5 +1,6 @@
- No software
+ No agent selected
+ No software
+
@@ -24,6 +25,9 @@
+
+
+
@@ -37,6 +41,7 @@
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 58b78cb..020791e 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,13 +1,5 @@
import Vue from "vue";
import Router from "vue-router";
-import Dashboard from "@/views/Dashboard";
-import Login from "@/views/Login";
-import Logout from "@/views/Logout";
-import SessionExpired from "@/views/SessionExpired";
-import NotFound from "@/views/NotFound";
-import TakeControl from "@/views/TakeControl";
-import InitialSetup from "@/views/InitialSetup";
-import RemoteBackground from "@/views/RemoteBackground";
Vue.use(Router);
@@ -18,7 +10,7 @@ export default new Router({
{
path: "/",
name: "Dashboard",
- component: Dashboard,
+ component: () => import ("@/views/Dashboard"),
meta: {
requireAuth: true
}
@@ -26,7 +18,7 @@ export default new Router({
{
path: "/setup",
name: "InitialSetup",
- component: InitialSetup,
+ component: () => import ("@/views/InitialSetup"),
meta: {
requireAuth: true
}
@@ -34,7 +26,7 @@ export default new Router({
{
path: "/takecontrol/:pk",
name: "TakeControl",
- component: TakeControl,
+ component: () => import ("@/views/TakeControl"),
meta: {
requireAuth: true
}
@@ -42,7 +34,7 @@ export default new Router({
{
path: "/remotebackground/:pk",
name: "RemoteBackground",
- component: RemoteBackground,
+ component: () => import ("@/views/RemoteBackground"),
meta: {
requireAuth: true
}
@@ -50,7 +42,7 @@ export default new Router({
{
path: "/login",
name: "Login",
- component: Login,
+ component: () => import ("@/views/Login"),
meta: {
requiresVisitor: true
}
@@ -58,16 +50,16 @@ export default new Router({
{
path: "/logout",
name: "Logout",
- component: Logout
+ component: () => import ("@/views/Logout")
},
{
path: "/expired",
name: "SessionExpired",
- component: SessionExpired,
+ component: () => import ("@/views/SessionExpired"),
meta: {
requireAuth: true
}
},
- { path: "*", component: NotFound }
+ { path: "*", component: () => import ("@/views/NotFound") }
]
});
diff --git a/src/store/store.js b/src/store/store.js
index 85475e6..c1953a0 100644
--- a/src/store/store.js
+++ b/src/store/store.js
@@ -23,6 +23,7 @@ export const store = new Vuex.Store({
agentSummary: {},
winUpdates: {},
agentChecks: {},
+ automatedTasks: {},
agentTableLoading: false,
treeLoading: false,
installedSoftware: [],
@@ -104,6 +105,9 @@ export const store = new Vuex.Store({
setChecks(state, checks) {
state.agentChecks = checks;
},
+ SET_AUTOMATED_TASKS(state, tasks) {
+ state.automatedTasks = tasks;
+ },
destroySubTable(state) {
(state.agentSummary = {}),
(state.agentChecks = {}),
@@ -124,6 +128,11 @@ export const store = new Vuex.Store({
context.commit("SET_POLICIES", r.data);
})
},
+ loadAutomatedTasks(context, pk) {
+ axios.get(`/automation/${pk}/automatedtasks/`).then(r => {
+ context.commit("SET_AUTOMATED_TASKS", r.data);
+ })
+ },
getScripts(context) {
axios.get("/checks/getscripts/").then(r => {
context.commit("SET_SCRIPTS", r.data);
@@ -211,11 +220,8 @@ export const store = new Vuex.Store({
})
.catch(error => {
Notify.create({
- color: "red",
- position: "top",
+ type: "negative",
timeout: 1000,
- textColor: "white",
- icon: "fas fa-times-circle",
message: "Bad token"
});
reject(error);
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index f54429a..57b360d 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -193,6 +193,7 @@ export default {
const pk = this.selectedAgentPk;
this.$store.dispatch("loadSummary", pk);
this.$store.dispatch("loadChecks", pk);
+ this.$store.dispatch("loadAutomatedTasks", pk);
this.$store.dispatch("loadWinUpdates", pk);
this.$store.dispatch("loadInstalledSoftware", pk);
}