Skip to content

Commit

Permalink
fix: do not reload the page on the webhook installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiryous committed Oct 13, 2024
1 parent df34719 commit 653d837
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
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

0 comments on commit 653d837

Please sign in to comment.