Skip to content

Commit

Permalink
fix: analytics role (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Jan 17, 2025
1 parent 42838a3 commit 7b632e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/api/v1/analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ analytics.get("/custom-events", async (ctx: Context) => {
);

const checks = deserializeLogic(
ctx.query?.checks as string | undefined | '["AND"]',
(ctx.query?.checks as string | undefined) || '["AND"]',
);

let eventFilter = sql`(r.type = 'custom-event')`;
Expand Down
16 changes: 3 additions & 13 deletions packages/frontend/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ import {
IconAnalyze,
IconBinaryTree2,
IconBrandOpenai,
IconChevronDown,
IconCreditCard,
IconDatabase,
IconFlask,
IconHelpOctagon,
IconHelpSmall,
IconListSearch,
Expand Down Expand Up @@ -55,20 +53,12 @@ import { IconPlus } from "@tabler/icons-react";
import { useAuth } from "@/utils/auth";
import config from "@/utils/config";
import { useProject, useProjects } from "@/utils/dataHooks";
import { useDashboards } from "@/utils/dataHooks/dashboards";
import { useViews } from "@/utils/dataHooks/views";
import { useDisclosure, useFocusTrap } from "@mantine/hooks";
import { useEffect, useState } from "react";
import {
DEFAULT_CHARTS,
ResourceName,
getDefaultDateRange,
hasAccess,
hasReadAccess,
serializeLogic,
} from "shared";
import { getIconComponent } from "../blocks/IconPicker";
import { ResourceName, hasAccess, hasReadAccess, serializeLogic } from "shared";
import DashboardsSidebarButton from "../analytics/DashboardsSidebarButton";
import { getIconComponent } from "../blocks/IconPicker";

interface NavbarLinkProps {
icon: any;
Expand Down Expand Up @@ -310,7 +300,7 @@ export default function Sidebar() {
label: "Dashboards",
icon: IconTimeline,
link: "/dashboards",
resource: "dashboards",
resource: "analytics",
},
{
label: "LLM",
Expand Down

0 comments on commit 7b632e2

Please sign in to comment.