Integrated the update integration function into the DropdownComponent.jsx

This commit is contained in:
Mathias Wagner
2022-08-28 22:32:58 +02:00
parent 1e7f110b22
commit 20c3b356c4

View File

@@ -266,6 +266,17 @@ function DropdownComponent() {
buttonText: "Okay"
});
const updateIntegration = async () => patchDialog("healthChecksUrl", (value) => ({
title: <>HealthChecks Integration <a onClick={showIntegrationInfo}>?</a></>,
placeholder: "HealthChecks Server URL", value,
buttonText: "Aktualisieren",
unsetButton: !value.includes("<uuid>"),
unsetButtonText: "Deaktivieren",
onClear: () => fetch("/api/config/healthChecksUrl", {headers: headers, method: "PATCH",
body: JSON.stringify({value: "https://hc-ping.com/<uuid>"})
}).then(() => showFeedback(<>Die Healthchecks wurden deaktiviert</>))
}));
return (
<div className="dropdown dropdown-invisible" id="dropdown">
<div className="dropdown-content">