diff --git a/src/components/modals/agents/EditAgent.vue b/src/components/modals/agents/EditAgent.vue
index 01ca22e..64fe77b 100644
--- a/src/components/modals/agents/EditAgent.vue
+++ b/src/components/modals/agents/EditAgent.vue
@@ -7,6 +7,7 @@
+
@@ -122,6 +123,142 @@
+
+
+
+ Policies
+
+
+
+
+ {{ capitalize(key).split("_").join(" ") }}
+
+ {{ policy ? policy.name : "None" }}
+
+
+
+ {{ policy.active ? "" : "disabled" }}
+
+
+
+
+
+ Alert Template
+
+
+
+ {{ agent.alert_template ? alert_template.name : "None" }}
+
+
+
+ {{ agent.alert_template.active ? "" : "disabled" }}
+
+
+
+
+ Effective Patch Policy
+
+
+
+ Critical
+ {{
+ agent.effective_patch_policy.critical !== "inherit"
+ ? capitalize(agent.effective_patch_policy.critical)
+ : "Do Nothing"
+ }}
+
+
+
+
+ Important
+ {{
+ agent.effective_patch_policy.important !== "inherit"
+ ? capitalize(agent.effective_patch_policy.important)
+ : "Do Nothing"
+ }}
+
+
+
+
+ Moderate
+ {{
+ agent.effective_patch_policy.moderate !== "inherit"
+ ? capitalize(agent.effective_patch_policy.moderate)
+ : "Do Nothing"
+ }}
+
+
+
+
+ Low
+ {{
+ agent.effective_patch_policy.low !== "inherit"
+ ? capitalize(agent.effective_patch_policy.low)
+ : "Do Nothing"
+ }}
+
+
+
+
+ Other
+ {{
+ agent.effective_patch_policy.other !== "inherit"
+ ? capitalize(agent.effective_patch_policy.other)
+ : "Do Nothing"
+ }}
+
+
+
+
+ Run Time Frequency
+ {{ capitalize(agent.effective_patch_policy.run_time_frequency) }}
+
+
+
+ week days:
+ {{ weekDaystoString(agent.effective_patch_policy.run_time_days) }} at hour:
+ {{ agent.effective_patch_policy.run_time_hour }}
+
+
+
+
+ Every month on day: {{ agent.effective_patch_policy.run_time_day }} at hour:
+ {{ agent.effective_patch_policy.run_time_hour }}
+
+
+
+ None
+
+
+
+
+ Reboot after installation
+ {{
+ agent.effective_patch_policy.reboot_after_install !== "inherit"
+ ? capitalize(agent.effective_patch_policy.reboot_after_install)
+ : "Do Nothing"
+ }}
+
+
+
+
+ Failed patch options
+ Do Nothing
+
+ Reprocess failed patches:
+ {{
+ agent.effective_patch_policy.reprocess_failed
+ ? agent.effective_patch_policy.reprocess_failed_times
+ : "Never"
+ }}
+ Email on fail: {{ agent.effective_patch_policy.email_if_fail ? "Yes" : "Never" }}
+
+
+
+
+
@@ -140,6 +277,7 @@ import mixins from "@/mixins/mixins";
import PatchPolicyForm from "@/components/modals/agents/PatchPolicyForm";
import CustomField from "@/components/ui/CustomField";
import TacticalDropdown from "@/components/ui/TacticalDropdown";
+import { capitalize } from "@/utils/format";
export default {
name: "EditAgent",
@@ -154,6 +292,10 @@ export default {
const { dialogRef, onDialogHide } = useDialogPluginComponent();
return {
+ // methods
+ capitalize,
+
+ // dialog
dialogRef,
onDialogHide,
};
@@ -165,7 +307,7 @@ export default {
agent: {},
monTypes: ["server", "workstation"],
client_options: [],
- splitterModel: 15,
+ splitterModel: 25,
tab: "general",
timezone: null,
tz_inherited: true,
@@ -180,6 +322,7 @@ export default {
.get(`/agents/${this.agent_id}/`)
.then(r => {
this.agent = r.data;
+ console.log(r.data);
this.allTimezones = Object.freeze(r.data.all_timezones);
// r.data.time_zone is the actual db column from the agent
@@ -246,6 +389,22 @@ export default {
})
.catch(e => {});
},
+ weekDaystoString(array) {
+ if (array.length === 0) return "not set";
+
+ let result = "";
+ for (day in array) {
+ if (day === 1) result += "Mon, ";
+ else if (day === 2) result += "Tue, ";
+ else if (day === 3) result += "Wed, ";
+ else if (day === 4) result += "Thur, ";
+ else if (day === 5) result += "Fri, ";
+ else if (day === 6) result += "Sat, ";
+ else if (day === 0) result += "Sun, ";
+ }
+
+ return result.trimRight(",");
+ },
},
mounted() {
// Get custom fields