diff --git a/src/components/AlertsIcon.vue b/src/components/AlertsIcon.vue new file mode 100644 index 0000000..5375ee7 --- /dev/null +++ b/src/components/AlertsIcon.vue @@ -0,0 +1,86 @@ + + + \ No newline at end of file diff --git a/src/components/AutomationManager.vue b/src/components/AutomationManager.vue new file mode 100644 index 0000000..c106a84 --- /dev/null +++ b/src/components/AutomationManager.vue @@ -0,0 +1,217 @@ + + + + + \ No newline at end of file diff --git a/src/components/FileBar.vue b/src/components/FileBar.vue index ab55d3b..759689e 100644 --- a/src/components/FileBar.vue +++ b/src/components/FileBar.vue @@ -40,6 +40,10 @@ Script Manager + + + Automation Manager + Global Settings @@ -75,6 +79,9 @@ + + + @@ -86,6 +93,8 @@ import AddSite from "@/components/modals/clients/AddSite"; import UpdateAgents from "@/components/modals/agents/UpdateAgents"; import ScriptManager from "@/components/ScriptManager"; import EditCoreSettings from "@/components/modals/coresettings/EditCoreSettings"; +import AutomationManager from "@/components/AutomationManager"; + export default { name: "FileBar", components: { @@ -94,7 +103,8 @@ export default { AddSite, UpdateAgents, ScriptManager, - EditCoreSettings + EditCoreSettings, + AutomationManager }, props: ["clients"], data() { @@ -111,6 +121,9 @@ export default { }, showScriptManager() { this.$store.commit("TOGGLE_SCRIPT_MANAGER", true); + }, + showAutomationManager() { + this.$store.commit("TOGGLE_AUTOMATION_MANAGER", true); } } }; diff --git a/src/components/modals/alerts/AlertsOverview.vue b/src/components/modals/alerts/AlertsOverview.vue new file mode 100644 index 0000000..1ede6f0 --- /dev/null +++ b/src/components/modals/alerts/AlertsOverview.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/components/modals/automation/AddPolicy.vue b/src/components/modals/automation/AddPolicy.vue new file mode 100644 index 0000000..a444b37 --- /dev/null +++ b/src/components/modals/automation/AddPolicy.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/src/components/modals/automation/EditPolicy.vue b/src/components/modals/automation/EditPolicy.vue new file mode 100644 index 0000000..8810fc2 --- /dev/null +++ b/src/components/modals/automation/EditPolicy.vue @@ -0,0 +1,79 @@ + + + \ No newline at end of file diff --git a/src/components/modals/automation/PolicyOverview.vue b/src/components/modals/automation/PolicyOverview.vue new file mode 100644 index 0000000..3dfec97 --- /dev/null +++ b/src/components/modals/automation/PolicyOverview.vue @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/src/store/alerts.js b/src/store/alerts.js new file mode 100644 index 0000000..d8d3e11 --- /dev/null +++ b/src/store/alerts.js @@ -0,0 +1,29 @@ +export default { + namespaced: true, + state: { + alerts: [], + }, + + getters:{ + getAlerts(state) { + return state.alerts; + }, + getUncheckedAlerts(state) { + //filter for non-dismissed active alerts + } + }, + + mutation: { + SET_ALERTS(state, alerts) { + state.alerts = alerts; + }, + }, + + actions: { + getAlerts(context) { + axios.get(`/alerts/getAlerts/`).then(r => { + context.commit("SET_ALERTS", r.data); + }); + } + } +} \ No newline at end of file diff --git a/src/store/store.js b/src/store/store.js index 7f0c573..85475e6 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -4,12 +4,14 @@ import axios from "axios"; import { Notify } from "quasar"; import router from "../router"; import logModule from "./logs"; +import alertsModule from "./alerts"; Vue.use(Vuex); export const store = new Vuex.Store({ modules: { - logs: logModule + logs: logModule, + alerts: alertsModule }, state: { username: localStorage.getItem("user_name") || null, @@ -25,7 +27,9 @@ export const store = new Vuex.Store({ treeLoading: false, installedSoftware: [], scripts: [], - toggleScriptManager: false + toggleScriptManager: false, + policies: [], + toggleAutomationManager: false }, getters: { loggedIn(state) { @@ -55,9 +59,15 @@ export const store = new Vuex.Store({ }, scripts(state) { return state.scripts; + }, + policies(state) { + return state.policies; } }, mutations: { + TOGGLE_AUTOMATION_MANAGER(state, action) { + state.toggleAutomationManager = action; + }, TOGGLE_SCRIPT_MANAGER(state, action) { state.toggleScriptManager = action; }, @@ -103,9 +113,17 @@ export const store = new Vuex.Store({ }, SET_SCRIPTS(state, scripts) { state.scripts = scripts; + }, + SET_POLICIES(state, policies) { + state.policies = policies; } }, actions: { + getPolicies(context) { + axios.get("/automation/policies/").then(r => { + context.commit("SET_POLICIES", r.data); + }) + }, getScripts(context) { axios.get("/checks/getscripts/").then(r => { context.commit("SET_SCRIPTS", r.data); diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index ba9629c..f54429a 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -6,6 +6,9 @@ Tactical RMM + + + @@ -88,11 +91,13 @@ import { mapState, mapGetters } from 'vuex'; import FileBar from "@/components/FileBar"; import AgentTable from "@/components/AgentTable"; import SubTableTabs from "@/components/SubTableTabs"; +import AlertsIcon from "@/components/AlertsIcon"; export default { components: { FileBar, AgentTable, - SubTableTabs + SubTableTabs, + AlertsIcon }, data() { return { @@ -171,7 +176,7 @@ export default { sortable: true, align: "left" } - ] + ], }; }, methods: { @@ -242,7 +247,7 @@ export default { //this.$store.commit("destroySubTable"); this.$store.commit("AGENT_TABLE_LOADING", false); }); - }, + } }, computed: { ...mapState({