Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not reload the page on the webhook installation #2181

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions keep-ui/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@
}
}

.sliding-panel-container.active {
/* original value is ridiculous 15.000, overflowing toasts*/
@apply z-[1000] !important;
}
4 changes: 2 additions & 2 deletions keep-ui/app/providers/provider-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ const ProviderForm = ({
const accessToken = session?.accessToken;

const callInstallWebhook = async (e: Event) => {
await installWebhook(provider, accessToken!);
e.preventDefault();
await installWebhook(provider, accessToken!);
};

async function handleOauth(e: MouseEvent) {
Expand All @@ -214,7 +214,7 @@ const ProviderForm = ({

let oauth2Url = provider.oauth2_url;
if (searchParams?.get("domain")) {
// TODO: this is a hack for Datadog OAuth2 since it can be initated from different domains
// TODO: this is a hack for Datadog OAuth2 since it can be initiated from different domains
oauth2Url = oauth2Url?.replace(
"datadoghq.com",
searchParams.get("domain")
Expand Down
3 changes: 2 additions & 1 deletion keep-ui/app/providers/providers-tiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { Icon, Title } from "@tremor/react";
import { Providers, Provider } from "./providers";
import { useEffect, useState } from "react";
// TODO: replace with custom component, package is not updated for last 4 years
import SlidingPanel from "react-sliding-side-panel";
import ProviderForm from "./provider-form";
import ProviderTile from "./provider-tile";
Expand Down Expand Up @@ -151,7 +152,7 @@ const ProvidersTiles = ({
isOpen={openPanel}
size={panelSize}
backdropClicked={handleCloseModal}
panelContainerClassName="bg-white z-[2000]"
panelContainerClassName="bg-white z-[100]"
>
{selectedProvider && (
<ProviderForm
Expand Down
Loading