-
Notifications
You must be signed in to change notification settings - Fork 1.3k
added enterprise fallback pages for alerting #4685
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
16 changes: 0 additions & 16 deletions
16
ui/app/_fallbacks/enterprise/components/alert-channels/alertChannelsView.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
ui/app/_fallbacks/enterprise/components/alerting/alertChannelsView.tsx
This file contains hidden or 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,12 @@ | ||
| import AlertingPlaceholderView from "./alertingPlaceholderView"; | ||
|
|
||
| export default function AlertChannelsView() { | ||
| return ( | ||
| <AlertingPlaceholderView | ||
| title="Unlock alerting channels for proactive monitoring" | ||
| description="This feature is a part of the Bifrost enterprise license. Configure Slack, PagerDuty, OpsGenie, and webhook alerts to stay ahead of budget and performance issues." | ||
| readmeLink="https://docs.getbifrost.ai/enterprise/alerting/alert-channels" | ||
| testIdPrefix="alert-channels" | ||
| /> | ||
| ); | ||
| } |
12 changes: 12 additions & 0 deletions
12
ui/app/_fallbacks/enterprise/components/alerting/alertHistoryView.tsx
This file contains hidden or 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,12 @@ | ||
| import AlertingPlaceholderView from "./alertingPlaceholderView"; | ||
|
|
||
| export default function AlertHistoryView() { | ||
| return ( | ||
| <AlertingPlaceholderView | ||
| title="Unlock alerting history for proactive monitoring" | ||
| description="This feature is a part of the Bifrost enterprise license. Review alert delivery outcomes, failures, and resolution events in one place." | ||
| readmeLink="https://docs.getbifrost.ai/enterprise/alerting/alert-history" | ||
| testIdPrefix="alert-history" | ||
| /> | ||
| ); | ||
| } |
12 changes: 12 additions & 0 deletions
12
ui/app/_fallbacks/enterprise/components/alerting/alertRulesView.tsx
This file contains hidden or 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,12 @@ | ||
| import AlertingPlaceholderView from "./alertingPlaceholderView"; | ||
|
|
||
| export default function AlertRulesView() { | ||
| return ( | ||
| <AlertingPlaceholderView | ||
| title="Unlock alerting rules for proactive monitoring" | ||
| description="This feature is a part of the Bifrost enterprise license. Define alerting rules to catch budget, latency, and degradation issues before they become incidents." | ||
| readmeLink="https://docs.getbifrost.ai/enterprise/alerting/alert-rules" | ||
| testIdPrefix="alert-rules" | ||
| /> | ||
| ); | ||
| } |
30 changes: 30 additions & 0 deletions
30
ui/app/_fallbacks/enterprise/components/alerting/alertingPlaceholderView.tsx
This file contains hidden or 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,30 @@ | ||
| import { Bell } from "lucide-react"; | ||
| import ContactUsView from "../views/contactUsView"; | ||
|
|
||
| type AlertingPlaceholderViewProps = { | ||
| title: string; | ||
| description: string; | ||
| testIdPrefix: string; | ||
| /** Docs page this placeholder links to. Defaults to the alerting overview. */ | ||
| readmeLink?: string; | ||
| }; | ||
|
|
||
| export default function AlertingPlaceholderView({ | ||
| title, | ||
| description, | ||
| testIdPrefix, | ||
| readmeLink = "https://docs.getbifrost.ai/enterprise/alerting/overview", | ||
| }: AlertingPlaceholderViewProps) { | ||
| return ( | ||
| <div className="h-full w-full"> | ||
| <ContactUsView | ||
| className="mx-auto min-h-[80vh]" | ||
| icon={<Bell className="h-[5.5rem] w-[5.5rem]" strokeWidth={1} />} | ||
| title={title} | ||
| description={description} | ||
| readmeLink={readmeLink} | ||
| testIdPrefix={testIdPrefix} | ||
| /> | ||
| </div> | ||
| ); | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,6 @@ | ||
| import { createFileRoute } from "@tanstack/react-router"; | ||
| import AlertChannelsPage from "./page"; | ||
|
|
||
| export const Route = createFileRoute("/workspace/alerting/channels")({ | ||
| component: AlertChannelsPage, | ||
| }); |
This file contains hidden or 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,9 @@ | ||
| import AlertChannelsView from "@enterprise/components/alerting/alertChannelsView"; | ||
|
|
||
| export default function AlertChannelsPage() { | ||
| return ( | ||
| <div className="mx-auto w-full max-w-7xl"> | ||
| <AlertChannelsView /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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,6 @@ | ||
| import { createFileRoute } from "@tanstack/react-router"; | ||
| import AlertHistoryPage from "./page"; | ||
|
|
||
| export const Route = createFileRoute("/workspace/alerting/history")({ | ||
| component: AlertHistoryPage, | ||
| }); |
This file contains hidden or 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,9 @@ | ||
| import AlertHistoryView from "@enterprise/components/alerting/alertHistoryView"; | ||
|
|
||
| export default function AlertHistoryPage() { | ||
| return ( | ||
| <div className="mx-auto w-full max-w-7xl"> | ||
| <AlertHistoryView /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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,20 @@ | ||
| import { createFileRoute, Outlet, redirect } from "@tanstack/react-router"; | ||
| import { NoPermissionView } from "@/components/noPermissionView"; | ||
| import { RbacOperation, RbacResource, useRbac } from "@enterprise/lib"; | ||
|
|
||
| function RouteComponent() { | ||
| const hasAlertingAccess = useRbac(RbacResource.Governance, RbacOperation.View); | ||
| if (!hasAlertingAccess) { | ||
| return <NoPermissionView entity="alerting" />; | ||
| } | ||
| return <Outlet />; | ||
| } | ||
|
|
||
| export const Route = createFileRoute("/workspace/alerting")({ | ||
| beforeLoad: ({ location }) => { | ||
| if (location.pathname === "/workspace/alerting" || location.pathname === "/workspace/alerting/") { | ||
| throw redirect({ to: "/workspace/alerting/rules", replace: true }); | ||
| } | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
| }, | ||
| component: RouteComponent, | ||
| }); | ||
This file contains hidden or 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,6 @@ | ||
| import { createFileRoute } from "@tanstack/react-router"; | ||
| import AlertRulesPage from "./page"; | ||
|
|
||
| export const Route = createFileRoute("/workspace/alerting/rules")({ | ||
| component: AlertRulesPage, | ||
| }); |
This file contains hidden or 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,9 @@ | ||
| import AlertRulesView from "@enterprise/components/alerting/alertRulesView"; | ||
|
|
||
| export default function AlertRulesPage() { | ||
| return ( | ||
| <div className="mx-auto w-full max-w-7xl"> | ||
| <AlertRulesView /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.