Skip to content

Commit 4b7bf9f

Browse files
committed
Adjust engagement chart
1 parent e2cf922 commit 4b7bf9f

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

site/src/components/Link/Link.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Slot } from "@radix-ui/react-slot";
1+
import { Slot, Slottable } from "@radix-ui/react-slot";
22
import { type VariantProps, cva } from "class-variance-authority";
33
import { SquareArrowOutUpRightIcon } from "lucide-react";
44
import { forwardRef } from "react";
@@ -38,7 +38,7 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
3838
ref={ref}
3939
{...props}
4040
>
41-
{children}
41+
<Slottable>{children}</Slottable>
4242
<SquareArrowOutUpRightIcon aria-hidden="true" />
4343
</Comp>
4444
);

site/src/pages/DeploymentSettingsPage/GeneralSettingsPage/GeneralSettingsPageView.stories.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,7 @@ const meta: Meta<typeof GeneralSettingsPageView> = {
3939
hidden: false,
4040
},
4141
],
42-
activeUsersCount: [
43-
{ date: "1/1/2024", count: 150 },
44-
{ date: "1/2/2024", count: 165 },
45-
{ date: "1/3/2024", count: 180 },
46-
{ date: "1/4/2024", count: 155 },
47-
{ date: "1/5/2024", count: 190 },
48-
{ date: "1/6/2024", count: 200 },
49-
{ date: "1/7/2024", count: 210 },
50-
],
42+
dailyActiveUsers: MockDeploymentDAUResponse,
5143
invalidExperiments: [],
5244
safeExperiments: [],
5345
entitlements: undefined,

site/src/pages/DeploymentSettingsPage/GeneralSettingsPage/UserEngagementChart.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ import {
1010
CollapsibleContent,
1111
CollapsibleTrigger,
1212
} from "components/Collapsible/Collapsible";
13+
import { Link } from "components/Link/Link";
1314
import { Spinner } from "components/Spinner/Spinner";
14-
import { ChevronRightIcon, ExternalLinkIcon } from "lucide-react";
15+
import { ChevronRightIcon } from "lucide-react";
1516
import type { FC } from "react";
16-
import { Link } from "react-router-dom";
1717
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
18+
import { Link as RouterLink } from "react-router-dom";
1819

1920
const chartConfig = {
2021
users: {
@@ -64,8 +65,17 @@ export const UserEngagementChart: FC<UserEngagementChartProps> = ({ data }) => {
6465
A user is considered "engaged" if they initiate a connection to
6566
their workspace via apps, web terminal, or SSH. The graph displays
6667
the daily count of unique users who engaged at least once, with
67-
additional insights available through the Activity Audit and
68-
License Consumption tools.
68+
additional insights available through the{" "}
69+
<Link size="sm" asChild>
70+
<RouterLink to="/audit">Activity Audit</RouterLink>
71+
</Link>{" "}
72+
and{" "}
73+
<Link size="sm" asChild>
74+
<RouterLink to="/deployment/licenses">
75+
License Consumption
76+
</RouterLink>
77+
</Link>{" "}
78+
tools.
6979
</p>
7080
</CollapsibleContent>
7181
</Collapsible>
@@ -83,6 +93,7 @@ export const UserEngagementChart: FC<UserEngagementChartProps> = ({ data }) => {
8393
accessibilityLayer
8494
data={data}
8595
margin={{
96+
top: 10,
8697
left: 0,
8798
right: 0,
8899
}}

0 commit comments

Comments
 (0)