output
@@ -103,9 +103,6 @@
-
-
-
@@ -120,7 +117,6 @@ import EventLogCheckOutput from "@/components/modals/checks/EventLogCheckOutput"
export default {
name: "PolicyStatus",
components: {
- ScriptOutput,
EventLogCheckOutput,
},
props: {
@@ -139,10 +135,8 @@ export default {
},
data() {
return {
- showScriptOutput: false,
showEventLogOutput: false,
evtLogData: {},
- scriptInfo: {},
data: [],
columns: [
{ name: "agent", label: "Hostname", field: "agent", align: "left", sortable: true },
@@ -225,14 +219,17 @@ export default {
html: true,
});
},
- scriptMoreInfo(check) {
- this.scriptInfo = check;
- this.showScriptOutput = true;
- },
eventLogMoreInfo(check) {
this.evtLogData = check;
this.showEventLogOutput = true;
},
+ showScriptOutput(script) {
+ this.$q.dialog({
+ component: ScriptOutput,
+ parent: this,
+ scriptInfo: script,
+ });
+ },
show() {
this.$refs.dialog.show();
},
diff --git a/web/src/components/graphs/CheckGraph.vue b/web/src/components/graphs/CheckGraph.vue
index 2448db7a..352a2941 100644
--- a/web/src/components/graphs/CheckGraph.vue
+++ b/web/src/components/graphs/CheckGraph.vue
@@ -208,6 +208,10 @@ export default {
},
},
};
+
+ if (this.check.check_type === "diskspace") {
+ this.chartOptions["yaxis"]["reversed"] = true;
+ }
} else {
// Set the y-axis labels to Failing and Passing
this.chartOptions["yaxis"] = {
diff --git a/web/src/components/modals/alerts/AlertTemplateForm.vue b/web/src/components/modals/alerts/AlertTemplateForm.vue
index 057f1d58..97772473 100644
--- a/web/src/components/modals/alerts/AlertTemplateForm.vue
+++ b/web/src/components/modals/alerts/AlertTemplateForm.vue
@@ -56,6 +56,21 @@
/>
+ Failure action timeout
+
+
+
+
Resolved action
@@ -92,6 +107,21 @@
new-value-mode="add"
/>
+
+ Resolved action timeout
+
+
+
Email Settings (Overrides global email settings)
@@ -222,7 +252,7 @@
type="number"
v-model.number="template.agent_periodic_alert_days"
dense
- :rules="[val => val >= 0]"
+ :rules="[val => val >= 0 || 'Periodic days must be 0 or greater']"
/>
@@ -338,7 +368,7 @@
type="number"
v-model.number="template.check_periodic_alert_days"
dense
- :rules="[val => val >= 0]"
+ :rules="[val => val >= 0 || 'Periodic days must be 0 or greater']"
/>
@@ -482,8 +512,10 @@ export default {
is_active: true,
action: null,
action_args: [],
+ action_timeout: 15,
resolved_action: null,
resolved_action_args: [],
+ resolved_action_timeout: 15,
email_recipients: [],
email_from: "",
text_recipients: [],
diff --git a/web/src/components/modals/alerts/AlertsOverview.vue b/web/src/components/modals/alerts/AlertsOverview.vue
index cca66428..76da5df6 100644
--- a/web/src/components/modals/alerts/AlertsOverview.vue
+++ b/web/src/components/modals/alerts/AlertsOverview.vue
@@ -113,6 +113,24 @@
Resolve alert
+
+ Show failure action run results
+
+
+ Show resolved action run results
+
@@ -130,6 +148,7 @@
\ No newline at end of file
diff --git a/web/src/mixins/mixins.js b/web/src/mixins/mixins.js
index 853ada13..ec3a2fae 100644
--- a/web/src/mixins/mixins.js
+++ b/web/src/mixins/mixins.js
@@ -84,6 +84,25 @@ export default {
notifyInfo(msg, timeout = 2000) {
Notify.create(notifyInfoConfig(msg, timeout));
},
+
+ isValidThreshold(warning, error, diskcheck = false) {
+ if (warning === 0 && error === 0) {
+ Notify.create(notifyErrorConfig("Warning Threshold or Error Threshold need to be set", 2000));
+ return false
+ }
+
+ if (!diskcheck && warning > error && warning > 0 && error > 0) {
+ Notify.create(notifyErrorConfig("Warning Threshold must be less than Error Threshold", 2000));
+ return false
+ }
+
+ if (diskcheck && warning < error && warning > 0 && error > 0) {
+ Notify.create(notifyErrorConfig("Warning Threshold must be more than Error Threshold", 2000));
+ return false
+ }
+
+ return true;
+ },
isValidEmail(val) {
const email = /^(?=[a-zA-Z0-9@._%+-]{6,254}$)[a-zA-Z0-9._%+-]{1,64}@(?:[a-zA-Z0-9-]{1,63}\.){1,8}[a-zA-Z]{2,63}$/;
return email.test(val);