From 439dea44236838f24e2971d8ec1e04e5b3c0c628 Mon Sep 17 00:00:00 2001 From: Shemy Gan Date: Thu, 7 Nov 2024 15:27:40 -0500 Subject: [PATCH] - fine toning payload and default item etc --- .../InfrastructureMonitors/CreateMonitor/index.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx b/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx index 1997e3714..fc82dbc68 100644 --- a/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx +++ b/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx @@ -23,7 +23,7 @@ const CreateInfrastructureMonitor = () => { url: "", name: "", notifications: [], - interval: 1, + interval: 15, cpu: false, usage_cpu: "", secret: "", @@ -162,9 +162,9 @@ const CreateInfrastructureMonitor = () => { const generatePayload = (form) => { let thresholds = {}; - thresholds.usage_cpu = form.usage_cpu; - thresholds.usage_memory = form.usage_memory; - thresholds.usage_disk = form.usage_disk; + if (form.usage_cpu) thresholds.usage_cpu = form.usage_cpu; + if (form.usage_memory) thresholds.usage_memory = form.usage_memory; + if (form.usage_disk) thresholds.usage_disk = form.usage_disk; delete form.cpu; delete form.memory; @@ -442,7 +442,7 @@ const CreateInfrastructureMonitor = () => {