Skip to content
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
18 changes: 7 additions & 11 deletions site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface DeploymentDropdownProps {
canViewAuditLog: boolean;
canViewConnectionLog: boolean;
canViewHealth: boolean;
canViewAIGovernance: boolean;
canViewAIBridge: boolean;
}

export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
Expand All @@ -27,7 +27,7 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
canViewAuditLog,
canViewConnectionLog,
canViewHealth,
canViewAIGovernance,
canViewAIBridge,
}) => {
if (
!canViewAuditLog &&
Expand Down Expand Up @@ -58,7 +58,7 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
canViewAuditLog={canViewAuditLog}
canViewConnectionLog={canViewConnectionLog}
canViewHealth={canViewHealth}
canViewAIGovernance={canViewAIGovernance}
canViewAIBridge={canViewAIBridge}
/>
</PopoverContent>
</Popover>
Expand All @@ -71,7 +71,7 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
canViewAuditLog,
canViewHealth,
canViewConnectionLog,
canViewAIGovernance,
canViewAIBridge,
}) => {
return (
<nav>
Expand Down Expand Up @@ -115,14 +115,10 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
</MenuItem>
</PopoverClose>
)}
{canViewAIGovernance && (
{canViewAIBridge && (
<PopoverClose asChild>
<MenuItem
component={NavLink}
to="/aigovernance"
css={styles.menuItem}
>
AI Governance
<MenuItem component={NavLink} to="/aibridge" css={styles.menuItem}>
AI Bridge
</MenuItem>
</PopoverClose>
)}
Expand Down
4 changes: 2 additions & 2 deletions site/src/modules/dashboard/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const Navbar: FC = () => {
featureVisibility.audit_log && permissions.viewAnyAuditLog;
const canViewConnectionLog =
featureVisibility.connection_log && permissions.viewAnyConnectionLog;
const canViewAIGovernance =
const canViewAIBridge =
featureVisibility.aibridge && permissions.viewAnyAIBridgeInterception;

const uniqueLinks = new Map<string, LinkConfig>();
Expand All @@ -46,7 +46,7 @@ export const Navbar: FC = () => {
canViewHealth={canViewHealth}
canViewAuditLog={canViewAuditLog}
canViewConnectionLog={canViewConnectionLog}
canViewAIGovernance={canViewAIGovernance}
canViewAIBridge={canViewAIBridge}
proxyContextValue={proxyContextValue}
/>
);
Expand Down
6 changes: 3 additions & 3 deletions site/src/modules/dashboard/Navbar/NavbarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface NavbarViewProps {
canViewAuditLog: boolean;
canViewConnectionLog: boolean;
canViewHealth: boolean;
canViewAIGovernance: boolean;
canViewAIBridge: boolean;
proxyContextValue?: ProxyContextValue;
}

Expand All @@ -56,7 +56,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
canViewHealth,
canViewAuditLog,
canViewConnectionLog,
canViewAIGovernance,
canViewAIBridge,
proxyContextValue,
}) => {
const webPush = useWebpushNotifications();
Expand Down Expand Up @@ -97,7 +97,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
canViewDeployment={canViewDeployment}
canViewHealth={canViewHealth}
canViewConnectionLog={canViewConnectionLog}
canViewAIGovernance={canViewAIGovernance}
canViewAIBridge={canViewAIBridge}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import {
import type { FC } from "react";
import { docs } from "utils/docs";

export const AIGovernanceHelpTooltip: FC = () => {
export const AIBridgeHelpTooltip: FC = () => {
return (
<HelpTooltip>
<HelpTooltipIconTrigger />

<HelpTooltipContent>
<HelpTooltipTitle>What is AI Governance?</HelpTooltipTitle>
<HelpTooltipTitle>What is AI Bridge?</HelpTooltipTitle>
<HelpTooltipText>
AI Governance is a proxy that unifies and audits LLM usage across your
AI Bridge is a proxy that unifies and audits LLM usage across your
organization.
</HelpTooltipText>
<HelpTooltipLinksGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import {
} from "components/PageHeader/PageHeader";
import type { FC, PropsWithChildren } from "react";
import { Outlet } from "react-router";
import { AIGovernanceHelpTooltip } from "./AIGovernanceHelpTooltip";
import { AIBridgeHelpTooltip } from "./AIBridgeHelpTooltip";

const AIGovernanceLayout: FC<PropsWithChildren> = () => {
const AIBridgeLayout: FC<PropsWithChildren> = () => {
return (
<Margins className="pb-12">
<PageHeader>
<PageHeaderTitle>
<div className="flex items-center gap-2">
<span>AI Governance</span>
<AIGovernanceHelpTooltip />
<span>AI Bridge</span>
<AIBridgeHelpTooltip />
</div>
</PageHeaderTitle>
<PageHeaderSubtitle>
Expand All @@ -27,4 +27,4 @@ const AIGovernanceLayout: FC<PropsWithChildren> = () => {
);
};

export default AIGovernanceLayout;
export default AIBridgeLayout;
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const RequestLogsPage: FC = () => {

return (
<>
<title>{pageTitle("Request Logs", "AI Governance")}</title>
<title>{pageTitle("Request Logs", "AI Bridge")}</title>

<RequestLogsPageView
isLoading={interceptionsQuery.isLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const defaultFilterProps = getDefaultFilterProps<FilterProps>({
const interceptions = [MockInterception, MockInterception, MockInterception];

const meta: Meta<typeof RequestLogsPageView> = {
title: "pages/AIGovernancePage/RequestLogsPageView",
title: "pages/AIBridgePage/RequestLogsPageView",
component: RequestLogsPageView,
args: {},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const RequestLogsPageView: FC<RequestLogsPageViewProps> = ({
if (!isRequestLogsVisible) {
return (
<Paywall
message="AI Governance"
description="AI Governance allows you to monitor and manage AI requests. You need an Premium license to use this feature."
message="AI Bridge"
description="AI Bridge allows you to monitor and manage AI requests. You need an Premium license to use this feature."
documentationLink={docs("/ai-coder/ai-bridge")}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Table, TableBody } from "components/Table/Table";
import { RequestLogsRow } from "./RequestLogsRow";

const meta: Meta<typeof RequestLogsRow> = {
title: "pages/AIGovernancePage/RequestLogsRow",
title: "pages/AIBridgePage/RequestLogsRow",
component: RequestLogsRow,
decorators: [
(Story) => (
Expand Down
15 changes: 6 additions & 9 deletions site/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,11 @@ const ProvisionerJobsPage = lazy(
);
const TasksPage = lazy(() => import("./pages/TasksPage/TasksPage"));
const TaskPage = lazy(() => import("./pages/TaskPage/TaskPage"));
const AIGovernanceLayout = lazy(
() => import("./pages/AIGovernancePage/AIGovernanceLayout"),
const AIBridgeLayout = lazy(
() => import("./pages/AIBridgePage/AIBridgeLayout"),
);
const AIGovernanceRequestLogsPage = lazy(
() => import("./pages/AIGovernancePage/RequestLogsPage/RequestLogsPage"),
const AIBridgeRequestLogsPage = lazy(
() => import("./pages/AIBridgePage/RequestLogsPage/RequestLogsPage"),
);

const RoutesWithSuspense = () => {
Expand Down Expand Up @@ -563,12 +563,9 @@ export const router = createBrowserRouter(
</Route>
</Route>

<Route path="/aigovernance" element={<AIGovernanceLayout />}>
<Route path="/aibridge" element={<AIBridgeLayout />}>
<Route index element={<Navigate to="request-logs" replace />} />
<Route
path="request-logs"
element={<AIGovernanceRequestLogsPage />}
/>
<Route path="request-logs" element={<AIBridgeRequestLogsPage />} />
</Route>

<Route path="/health" element={<HealthLayout />}>
Expand Down
Loading