-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multi tenant specific error page (#3928)
Multi tenant specific error page
- Loading branch information
Showing
9 changed files
with
128 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"use client"; | ||
import ErrorPageLayout from "./ErrorPageLayout"; | ||
|
||
export default function CloudError() { | ||
return ( | ||
<ErrorPageLayout> | ||
<h1 className="text-2xl font-semibold mb-4 text-gray-800 dark:text-gray-200"> | ||
Maintenance in Progress | ||
</h1> | ||
<div className="space-y-4 text-gray-600 dark:text-gray-300"> | ||
<p> | ||
Onyx is currently in a maintenance window. Please check back in a | ||
couple of minutes. | ||
</p> | ||
<p> | ||
We apologize for any inconvenience this may cause and appreciate your | ||
patience. | ||
</p> | ||
</div> | ||
</ErrorPageLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { FiAlertCircle } from "react-icons/fi"; | ||
import ErrorPageLayout from "./ErrorPageLayout"; | ||
|
||
export default function Error() { | ||
return ( | ||
<ErrorPageLayout> | ||
<h1 className="text-2xl font-semibold flex items-center gap-2 mb-4 text-gray-800 dark:text-gray-200"> | ||
<p className=""> We encountered an issue</p> | ||
<FiAlertCircle className="text-error inline-block" /> | ||
</h1> | ||
<div className="space-y-4 text-gray-600 dark:text-gray-300"> | ||
<p> | ||
It seems there was a problem loading your Onyx settings. This could be | ||
due to a configuration issue or incomplete setup. | ||
</p> | ||
<p> | ||
If you're an admin, please review our{" "} | ||
<a | ||
className="text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300" | ||
href="https://docs.onyx.app/introduction?utm_source=app&utm_medium=error_page&utm_campaign=config_error" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
documentation | ||
</a>{" "} | ||
for proper configuration steps. If you're a user, please contact | ||
your admin for assistance. | ||
</p> | ||
<p> | ||
Need help? Join our{" "} | ||
<a | ||
className="text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300" | ||
href="https://join.slack.com/t/danswer/shared_invite/zt-1w76msxmd-HJHLe3KNFIAIzk_0dSOKaQ" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Slack community | ||
</a>{" "} | ||
for support. | ||
</p> | ||
</div> | ||
</ErrorPageLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
import { LogoType } from "../logo/Logo"; | ||
|
||
interface ErrorPageLayoutProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export default function ErrorPageLayout({ children }: ErrorPageLayoutProps) { | ||
return ( | ||
<div className="flex flex-col items-center justify-center min-h-screen"> | ||
<div className="mb-4 flex items-center max-w-[220px]"> | ||
<LogoType size="large" /> | ||
</div> | ||
<div className="max-w-xl border border-border w-full bg-white shadow-md rounded-lg overflow-hidden"> | ||
<div className="p-6 sm:p-8">{children}</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
import Link from "next/link"; | ||
import { Button } from "@/components/ui/button"; | ||
import { FiPlusCircle } from "react-icons/fi"; | ||
|
||
interface CreateButtonProps { | ||
href: string; | ||
href?: string; | ||
onClick?: () => void; | ||
text?: string; | ||
} | ||
|
||
export default function CreateButton({ | ||
href, | ||
onClick, | ||
text = "Create", | ||
}: CreateButtonProps) { | ||
return ( | ||
<Link href={href}> | ||
<Button className="font-normal mt-2" variant="create"> | ||
<FiPlusCircle /> | ||
{text} | ||
</Button> | ||
</Link> | ||
const content = ( | ||
<Button className="font-normal mt-2" variant="create" onClick={onClick}> | ||
<FiPlusCircle /> | ||
{text} | ||
</Button> | ||
); | ||
|
||
if (href) { | ||
return <Link href={href}>{content}</Link>; | ||
} | ||
|
||
return content; | ||
} |