diff --git a/src/components/AutomatedTasksTab.vue b/src/components/AutomatedTasksTab.vue
index c4d99e7..a86d450 100644
--- a/src/components/AutomatedTasksTab.vue
+++ b/src/components/AutomatedTasksTab.vue
@@ -60,6 +60,14 @@
+
+
+
+ Collector Task
+
+
+
+
@@ -170,6 +178,13 @@
This task is managed by a policy
+
+
+
+
+ The task updates a custom field on the agent
+
+
@@ -199,6 +214,8 @@
Will sync on next agent checkin
Synced with agent
Pending deletion on agent
+ Waiting for task creation on agent
+
state.automatedTasks,
}),
tasks() {
- return this.automatedTasks.autotasks;
+ return this.automatedTasks.autotasks.filter(task => task.sync_status !== "pendingdeletion");
},
},
};
diff --git a/src/components/automation/PolicyAutomatedTasksTab.vue b/src/components/automation/PolicyAutomatedTasksTab.vue
index 30a6fe1..e5a4f49 100644
--- a/src/components/automation/PolicyAutomatedTasksTab.vue
+++ b/src/components/automation/PolicyAutomatedTasksTab.vue
@@ -61,6 +61,15 @@
+
+
+
+
+ Collector Task
+
+
+
+
@@ -130,6 +139,12 @@
v-model="props.row.dashboard_alert"
/>
+
+
+
+ The task updates a custom field on the agent
+
+
{{ props.row.name }}
{{ props.row.schedule }}
@@ -182,24 +197,28 @@ export default {
{ name: "smsalert", field: "text_alert", align: "left" },
{ name: "emailalert", field: "email_alert", align: "left" },
{ name: "dashboardalert", field: "dashboard_alert", align: "left" },
- { name: "name", label: "Name", field: "name", align: "left" },
+ { name: "collector", label: "Collector", field: "custom_field", align: "left", sortable: true },
+ { name: "name", label: "Name", field: "name", align: "left", sortable: true },
{
name: "schedule",
label: "Schedule",
field: "schedule",
align: "left",
+ sortable: true,
},
{
name: "status",
label: "More Info",
field: "more_info",
align: "left",
+ sortable: true,
},
{
name: "assignedcheck",
label: "Assigned Check",
field: "assigned_check",
align: "left",
+ sortable: true,
},
],
pagination: {
diff --git a/src/components/automation/modals/PolicyAdd.vue b/src/components/automation/modals/PolicyAdd.vue
index c65108e..81c6166 100644
--- a/src/components/automation/modals/PolicyAdd.vue
+++ b/src/components/automation/modals/PolicyAdd.vue
@@ -50,6 +50,10 @@
label="Policy"
>
+
+
+ This {{ type }} will not inherit from higher policies
+
No Automation Policies have been setup. Go to Settings > Automation Manager
@@ -85,6 +89,7 @@ export default {
selectedWorkstationPolicy: null,
selectedServerPolicy: null,
selectedAgentPolicy: null,
+ blockInheritance: false,
options: [],
};
},
@@ -94,13 +99,17 @@ export default {
if (this.type === "client" || this.type === "site") {
if (
this.object.workstation_policy === this.selectedWorkstationPolicy &&
- this.object.server_policy === this.selectedServerPolicy
+ this.object.server_policy === this.selectedServerPolicy &&
+ this.object.blockInheritance === this.blockInheritance
) {
this.hide();
return;
}
} else if (this.type === "agent") {
- if (this.object.policy === this.selectedAgentPolicy) {
+ if (
+ this.object.policy === this.selectedAgentPolicy &&
+ this.object.block_policy_inheritance === this.blockInheritance
+ ) {
this.hide();
return;
}
@@ -118,6 +127,7 @@ export default {
pk: this.object.id,
server_policy: this.selectedServerPolicy,
workstation_policy: this.selectedWorkstationPolicy,
+ block_policy_inheritance: this.blockInheritance,
},
};
} else if (this.type === "site") {
@@ -127,6 +137,7 @@ export default {
pk: this.object.id,
server_policy: this.selectedServerPolicy,
workstation_policy: this.selectedWorkstationPolicy,
+ block_policy_inheritance: this.blockInheritance,
},
};
} else if (this.type === "agent") {
@@ -134,6 +145,7 @@ export default {
data = {
id: this.object.id,
policy: this.selectedAgentPolicy,
+ block_policy_inheritance: this.blockInheritance,
};
}
@@ -186,8 +198,10 @@ export default {
if (this.type !== "agent") {
this.selectedServerPolicy = this.object.server_policy;
this.selectedWorkstationPolicy = this.object.workstation_policy;
+ this.blockInheritance = this.object.blockInheritance;
} else {
this.selectedAgentPolicy = this.object.policy;
+ this.blockInheritance = this.object.block_policy_inheritance;
}
},
};
diff --git a/src/components/automation/modals/PolicyStatus.vue b/src/components/automation/modals/PolicyStatus.vue
index d995e3f..f639e6e 100644
--- a/src/components/automation/modals/PolicyStatus.vue
+++ b/src/components/automation/modals/PolicyStatus.vue
@@ -62,6 +62,8 @@
Will sync on next agent checkin
Synced with agent
Pending deletion on agent
+ Waiting for task creation on agent
+
{
- this.customFields = r.data;
+ this.customFields = r.data.filter(field => !field.hide_in_ui);
});
this.getAgentInfo();
this.getClientsSites();
diff --git a/src/components/modals/clients/ClientsForm.vue b/src/components/modals/clients/ClientsForm.vue
index b887d72..d4499ab 100644
--- a/src/components/modals/clients/ClientsForm.vue
+++ b/src/components/modals/clients/ClientsForm.vue
@@ -29,6 +29,7 @@
/>
+ Custom Fields
@@ -175,7 +176,7 @@ export default {
created() {
// Get custom fields
this.getCustomFields("client").then(r => {
- this.customFields = r.data;
+ this.customFields = r.data.filter(field => !field.hide_in_ui);
});
// Copy client prop locally
diff --git a/src/components/modals/clients/SitesForm.vue b/src/components/modals/clients/SitesForm.vue
index 36ac6c8..387ab7d 100644
--- a/src/components/modals/clients/SitesForm.vue
+++ b/src/components/modals/clients/SitesForm.vue
@@ -33,6 +33,7 @@
/>
+ Custom Fields
@@ -199,7 +200,7 @@ export default {
// Get custom fields
this.getCustomFields("site").then(r => {
- this.customFields = r.data;
+ this.customFields = r.data.filter(field => !field.hide_in_ui);
});
// Copy site prop locally
diff --git a/src/components/modals/coresettings/CustomFieldsForm.vue b/src/components/modals/coresettings/CustomFieldsForm.vue
index e91883a..acc29da 100644
--- a/src/components/modals/coresettings/CustomFieldsForm.vue
+++ b/src/components/modals/coresettings/CustomFieldsForm.vue
@@ -147,6 +147,7 @@
v-model="localField.required"
color="green"
/>
+
@@ -175,6 +176,7 @@ export default {
default_value_string: "",
default_value_bool: false,
default_values_multiple: [],
+ hide_in_ui: false,
},
modelOptions: [
{ label: "Client", value: "client" },
@@ -222,7 +224,6 @@ export default {
})
.catch(e => {
this.$q.loading.hide();
- this.onOk();
this.notifyError("There was an error editing the custom field");
});
} else {
@@ -261,7 +262,7 @@ export default {
},
},
mounted() {
- // If pk prop is set that means we are editting
+ // If pk prop is set that means we are editing
if (this.field) Object.assign(this.localField, this.field);
// Set model to current tab
diff --git a/src/components/modals/coresettings/CustomFieldsTable.vue b/src/components/modals/coresettings/CustomFieldsTable.vue
index ede388e..5d07221 100644
--- a/src/components/modals/coresettings/CustomFieldsTable.vue
+++ b/src/components/modals/coresettings/CustomFieldsTable.vue
@@ -13,12 +13,7 @@
>
-
+
@@ -50,6 +45,10 @@
{{ capitalize(props.row.type) }}
+
+
+
+
{{ props.row.default_value_bool }}
@@ -101,6 +100,7 @@ export default {
align: "left",
sortable: true,
},
+ { name: "hide_in_ui", label: "Hide in UI", field: "hide_in_ui", align: "left", sortable: true },
{ name: "default_value", label: "Default Value", field: "default_value", align: "left", sortable: true },
{ name: "required", label: "Required", field: "required", align: "left", sortable: true },
],
@@ -128,7 +128,7 @@ export default {
.onOk(() => {
this.$q.loading.show();
this.$axios
- .delete(`core/customfields/${field.id}/`)
+ .delete(`/core/customfields/${field.id}/`)
.then(r => {
this.refresh();
this.$q.loading.hide();
diff --git a/src/components/modals/coresettings/EditCoreSettings.vue b/src/components/modals/coresettings/EditCoreSettings.vue
index c1d38e3..9c371f0 100644
--- a/src/components/modals/coresettings/EditCoreSettings.vue
+++ b/src/components/modals/coresettings/EditCoreSettings.vue
@@ -8,6 +8,7 @@
+
@@ -293,10 +294,14 @@
+
+
+
+
-
+
+
+
+
+ {{ title }}
+
+
+ Close
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/modals/coresettings/KeyStoreTable.vue b/src/components/modals/coresettings/KeyStoreTable.vue
new file mode 100644
index 0000000..733e291
--- /dev/null
+++ b/src/components/modals/coresettings/KeyStoreTable.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Edit
+
+
+
+
+
+ Delete
+
+
+
+
+
+ Close
+
+
+
+
+
+ {{ props.row.name }}
+
+
+
+ {{ props.row.value }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/modals/tasks/AddAutomatedTask.vue b/src/components/modals/tasks/AddAutomatedTask.vue
index 1bdcb42..7caed63 100644
--- a/src/components/modals/tasks/AddAutomatedTask.vue
+++ b/src/components/modals/tasks/AddAutomatedTask.vue
@@ -64,6 +64,28 @@
dense
v-model="autotask.name"
label="Descriptive name of task"
+ class="q-pb-none"
+ />
+
+
+
+
@@ -86,6 +108,7 @@
v-model.number="autotask.timeout"
type="number"
label="Maximum permitted execution time (seconds)"
+ class="q-pb-none"
/>
@@ -190,10 +213,13 @@ export default {
return {
step: 1,
scriptOptions: [],
+ customFieldOptions: [],
+ collector: false,
autotask: {
script: null,
script_args: [],
assigned_check: null,
+ custom_field: null,
name: null,
run_time_days: [],
run_time_minute: null,
@@ -319,6 +345,10 @@ export default {
if (this.policypk) {
this.getPolicyChecks();
}
+
+ this.getCustomFields("agent").then(r => {
+ this.customFieldOptions = r.data.map(field => ({ label: field.name, value: field.id }));
+ });
},
};
\ No newline at end of file
diff --git a/src/components/modals/tasks/EditAutomatedTask.vue b/src/components/modals/tasks/EditAutomatedTask.vue
index 74c421e..aac4561 100644
--- a/src/components/modals/tasks/EditAutomatedTask.vue
+++ b/src/components/modals/tasks/EditAutomatedTask.vue
@@ -15,11 +15,12 @@
dense
options-dense
outlined
- v-model="localTask.script"
+ v-model="autotask.script"
:options="scriptOptions"
label="Select script"
map-options
emit-value
+ @input="setScriptDefaults"
>
@@ -38,14 +39,13 @@
dense
label="Script Arguments (press Enter after typing each argument)"
filled
- v-model="localTask.script_args"
+ v-model="autotask.script_args"
use-input
use-chips
multiple
hide-dropdown-icon
input-debounce="0"
new-value-mode="add"
- @input="setScriptDefaults"
/>
@@ -53,14 +53,14 @@
:rules="[val => !!val || '*Required']"
outlined
dense
- v-model="localTask.name"
+ v-model="autotask.name"
label="Descriptive name of task"
class="q-pb-none"
/>
+
+
+
+
{
this.$q.loading.hide();
this.onOk();
@@ -160,13 +184,20 @@ export default {
mounted() {
this.scriptOptions = this.getScriptOptions(this.showCommunityScripts);
+ this.getCustomFields("agent").then(r => {
+ this.customFieldOptions = r.data.map(field => ({ label: field.name, value: field.id }));
+ });
+
+ this.collector = !!this.task.custom_field;
+
// copy only certain task props locally
- this.localTask.id = this.task.id;
- this.localTask.name = this.task.name;
- this.localTask.script = this.task.script;
- this.localTask.script_args = this.task.script_args;
- this.localTask.alert_severity = this.task.alert_severity;
- this.localTask.timeout = this.task.timeout;
+ this.autotask.id = this.task.id;
+ this.autotask.name = this.task.name;
+ this.autotask.script = this.task.script;
+ this.autotask.script_args = this.task.script_args;
+ this.autotask.alert_severity = this.task.alert_severity;
+ this.autotask.timeout = this.task.timeout;
+ this.autotask.custom_field = this.task.custom_field;
},
};
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
index 26e0d29..f98fd36 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -257,7 +257,8 @@ export default function () {
client: client.id,
server_policy: site.server_policy,
workstation_policy: site.workstation_policy,
- alert_template: site.alert_template
+ alert_template: site.alert_template,
+ blockInheritance: site.block_policy_inheritance
}
if (site.maintenance_mode) { siteNode["color"] = "green" }
@@ -276,6 +277,7 @@ export default function () {
server_policy: client.server_policy,
workstation_policy: client.workstation_policy,
alert_template: client.alert_template,
+ blockInheritance: client.block_policy_inheritance,
children: childSites
}