@sentry/junior-dashboard 0.264.0 → 0.265.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +2 -5
- package/dist/app.js +119 -35
- package/dist/client.js +145 -136
- package/dist/index.d.ts +0 -1
- package/dist/index.js +119 -35
- package/dist/tailwind.css +1 -1
- package/package.json +5 -4
- package/src/api/schema.ts +0 -1
- package/src/app.ts +5 -20
- package/src/client/App.tsx +29 -31
- package/src/client/api.ts +7 -0
- package/src/client/components/BottomSheet.tsx +12 -2
- package/src/client/components/CopyButton.tsx +83 -0
- package/src/client/components/DetailsPanel.tsx +133 -0
- package/src/client/components/Drawer.tsx +15 -24
- package/src/client/components/FilterBar.tsx +16 -31
- package/src/client/components/Metric.tsx +33 -23
- package/src/client/components/PageContentSkeleton.tsx +1 -1
- package/src/client/components/Pagination.tsx +1 -1
- package/src/client/components/ParticipantAvatarStack.tsx +40 -36
- package/src/client/components/ProfileMenu.tsx +27 -93
- package/src/client/components/README.md +86 -77
- package/src/client/components/SegmentedNav.tsx +1 -1
- package/src/client/components/ShimmerText.tsx +2 -6
- package/src/client/components/ThemeSwitcher.tsx +19 -15
- package/src/client/components/charts/ActivityChart.tsx +173 -288
- package/src/client/components/charts/CacheWrites.tsx +63 -50
- package/src/client/components/charts/InputCacheChart.tsx +137 -131
- package/src/client/components/charts/README.md +4 -4
- package/src/client/components/charts/SystemMetricCharts.tsx +68 -95
- package/src/client/components/charts/WorkspaceUsageChart.tsx +42 -62
- package/src/client/components/controls/DirectorySortSelect.tsx +3 -3
- package/src/client/components/controls/TimeRangeSelector.tsx +10 -15
- package/src/client/components/layout/DashboardHeader.tsx +44 -90
- package/src/client/components/layout/SecondaryNavigation.tsx +2 -1
- package/src/client/components/layout/VisualViewportShell.tsx +2 -2
- package/src/client/components/ui/accordion.tsx +77 -0
- package/src/client/components/ui/alert-dialog.tsx +89 -0
- package/src/client/components/ui/button.tsx +85 -0
- package/src/client/components/ui/chart.tsx +74 -0
- package/src/client/components/ui/checkbox.tsx +26 -0
- package/src/client/components/ui/collapsible.tsx +22 -0
- package/src/client/components/ui/field.tsx +49 -0
- package/src/client/components/ui/input.tsx +35 -0
- package/src/client/components/ui/native-select.tsx +57 -0
- package/src/client/components/ui/popover.tsx +67 -0
- package/src/client/components/ui/radio-group.tsx +32 -0
- package/src/client/components/ui/sheet.tsx +13 -3
- package/src/client/components/ui/skeleton.tsx +19 -0
- package/src/client/components/ui/table.tsx +80 -0
- package/src/client/components/ui/tabs.tsx +75 -0
- package/src/client/components/ui/textarea.tsx +17 -0
- package/src/client/components/ui/toast.tsx +215 -0
- package/src/client/components/ui/toggle-group.tsx +36 -0
- package/src/client/components/ui/toggle.tsx +37 -0
- package/src/client/components/ui/tooltip.tsx +168 -0
- package/src/client/components/ui/trace.tsx +96 -0
- package/src/client/conversations/ChatLayout.tsx +7 -3
- package/src/client/conversations/ConversationBrief.tsx +17 -6
- package/src/client/conversations/ConversationComposer.tsx +26 -12
- package/src/client/conversations/ConversationDetails.tsx +147 -62
- package/src/client/conversations/ConversationEventDetails.tsx +141 -0
- package/src/client/conversations/ConversationEventLog.tsx +150 -129
- package/src/client/conversations/ConversationHeader.tsx +8 -3
- package/src/client/conversations/ConversationHeaderActions.tsx +90 -82
- package/src/client/conversations/ConversationHomeList.tsx +1 -1
- package/src/client/conversations/ConversationLinkedWork.tsx +118 -0
- package/src/client/conversations/ConversationMeta.tsx +55 -88
- package/src/client/conversations/ConversationPage.tsx +220 -101
- package/src/client/conversations/ConversationSidebar.tsx +48 -29
- package/src/client/conversations/ConversationWatches.tsx +165 -0
- package/src/client/conversations/ConversationWorkspace.tsx +12 -22
- package/src/client/conversations/ConversationWorkspaceLoading.tsx +1 -1
- package/src/client/conversations/DetailsList.tsx +124 -0
- package/src/client/conversations/EventDetails.tsx +42 -8
- package/src/client/conversations/ForkConversationButton.tsx +27 -16
- package/src/client/conversations/ObjectCard.tsx +20 -8
- package/src/client/conversations/PendingMailboxStack.tsx +52 -33
- package/src/client/conversations/README.md +86 -13
- package/src/client/conversations/ShareConversationButton.tsx +25 -13
- package/src/client/conversations/SubagentTranscriptDrawer.tsx +21 -15
- package/src/client/conversations/ToolFrame.tsx +36 -52
- package/src/client/conversations/TranscriptActivityGroup.tsx +13 -4
- package/src/client/conversations/TranscriptAutomationTriggerView.tsx +5 -4
- package/src/client/conversations/TranscriptContextEventView.tsx +25 -11
- package/src/client/conversations/TranscriptHeadingRow.tsx +7 -7
- package/src/client/conversations/TranscriptLoading.tsx +1 -1
- package/src/client/conversations/TranscriptMarkdown.tsx +25 -20
- package/src/client/conversations/TranscriptMessageContextView.tsx +8 -2
- package/src/client/conversations/TranscriptMessageView.tsx +6 -1
- package/src/client/conversations/TranscriptReasoningView.tsx +54 -68
- package/src/client/conversations/TranscriptTimestamp.tsx +9 -7
- package/src/client/conversations/TranscriptToolView.tsx +1 -1
- package/src/client/conversations/TranscriptTurnContextView.tsx +99 -27
- package/src/client/conversations/TranscriptView.tsx +63 -27
- package/src/client/conversations/eventLog.ts +57 -0
- package/src/client/conversations/eventTime.ts +60 -0
- package/src/client/conversations/queries.ts +29 -0
- package/src/client/conversations/transcriptBottomPinning.ts +34 -0
- package/src/client/format.ts +5 -0
- package/src/client/pages/ConnectionsPage.tsx +2 -2
- package/src/client/pages/PersonalTokensPage.tsx +4 -4
- package/src/client/pages/SettingsPage.tsx +9 -10
- package/src/client/pages/admin/ServiceAccountsSection.tsx +2 -2
- package/src/client/pages/automations/AutomationCostChart.tsx +50 -71
- package/src/client/pages/automations/AutomationDeleteDialog.tsx +87 -0
- package/src/client/pages/automations/AutomationDetails.tsx +193 -0
- package/src/client/pages/automations/AutomationEditPage.tsx +7 -8
- package/src/client/pages/automations/AutomationEditor.tsx +41 -29
- package/src/client/pages/automations/AutomationEditorLoading.tsx +1 -1
- package/src/client/pages/automations/AutomationEventFields.tsx +202 -119
- package/src/client/pages/automations/AutomationExecutionChart.tsx +51 -64
- package/src/client/pages/automations/AutomationExecutionStatusChart.tsx +47 -70
- package/src/client/pages/automations/AutomationExecutionsPage.tsx +150 -126
- package/src/client/pages/automations/AutomationFilters.tsx +189 -74
- package/src/client/pages/automations/AutomationLifecycle.tsx +109 -78
- package/src/client/pages/automations/AutomationOutcomeFields.tsx +26 -24
- package/src/client/pages/automations/AutomationRecentRuns.tsx +143 -0
- package/src/client/pages/automations/AutomationRow.tsx +12 -138
- package/src/client/pages/automations/AutomationRunDetails.tsx +307 -0
- package/src/client/pages/automations/AutomationRunsPage.tsx +119 -94
- package/src/client/pages/automations/AutomationScheduleFields.tsx +51 -51
- package/src/client/pages/automations/AutomationStatus.tsx +201 -0
- package/src/client/pages/automations/AutomationVersionsPage.tsx +65 -28
- package/src/client/pages/automations/AutomationsPage.tsx +80 -68
- package/src/client/pages/automations/AutomationsPageLayout.tsx +46 -14
- package/src/client/pages/automations/README.md +57 -0
- package/src/client/pages/automations/TriggerFilters.tsx +22 -0
- package/src/client/pages/automations/automationFormat.ts +37 -23
- package/src/client/pages/code/CodeActivityChart.tsx +59 -101
- package/src/client/pages/code/CodePage.tsx +52 -55
- package/src/client/pages/code/RepositoryPage.tsx +6 -8
- package/src/client/pages/locations/LocationActivityChart.tsx +53 -70
- package/src/client/pages/locations/LocationDirectoryActivityChart.tsx +60 -80
- package/src/client/pages/memory/MemoryCostChart.tsx +79 -103
- package/src/client/pages/memory/MemoryDetails.tsx +218 -0
- package/src/client/pages/memory/MemoryPage.tsx +168 -112
- package/src/client/pages/memory/MemoryPageLayout.tsx +33 -9
- package/src/client/pages/memory/MemoryTimeline.tsx +46 -69
- package/src/client/pages/memory/memoryRecord.ts +1 -1
- package/src/client/pages/people/ContributionGrid.tsx +23 -16
- package/src/client/pages/people/PeopleActivityChart.tsx +68 -107
- package/src/client/pages/people/ProfileCodeChanges.tsx +5 -5
- package/src/client/pages/system/BaseSandboxCard.tsx +1 -1
- package/src/client/pages/system/ConversationActivityChart.tsx +49 -67
- package/src/client/pages/system/GuardianActivity.tsx +1 -2
- package/src/client/pages/system/PluginBarChart.tsx +106 -87
- package/src/client/pages/system/PluginReportRecordSet.tsx +25 -24
- package/src/client/pages/system/README.md +23 -0
- package/src/client/pages/system/SystemNavigation.tsx +5 -1
- package/src/client/pages/system/WorkspaceDeleteDialog.tsx +111 -0
- package/src/client/pages/system/WorkspaceDetails.tsx +200 -43
- package/src/client/pages/system/WorkspaceEditor.tsx +59 -61
- package/src/client/pages/system/WorkspaceFormPage.tsx +23 -47
- package/src/client/pages/system/WorkspaceList.tsx +20 -30
- package/src/client/pages/system/WorkspacesPage.tsx +117 -119
- package/src/client/pages/system/sandboxSize.ts +8 -0
- package/src/client/pages/system/workspaceQueries.ts +53 -0
- package/src/client/pages/user/PluginUserPage.tsx +51 -2
- package/src/client/pages/user/pluginUserPageData.ts +1 -6
- package/src/client/styles.ts +4 -0
- package/src/client.tsx +7 -1
- package/src/mock-reporting/automation-collection.ts +4 -2
- package/src/mock-reporting/fixtures.ts +23 -7
- package/src/mock-reporting/routes.ts +12 -0
- package/src/mock-reporting/watches.ts +94 -0
- package/src/shell.ts +4 -9
- package/src/tailwind.css +0 -10
- package/src/client/components/Button.tsx +0 -118
- package/src/client/components/Field.tsx +0 -53
- package/src/client/components/SegmentedTabs.tsx +0 -119
- package/src/client/components/Select.tsx +0 -52
- package/src/client/components/Skeleton.tsx +0 -17
- package/src/client/components/TextInput.tsx +0 -58
- package/src/client/components/Tooltip.tsx +0 -216
- package/src/client/components/charts/useChartLayout.ts +0 -27
- package/src/client/components/ui/sheet.LICENSE +0 -21
- package/src/client/conversations/ConversationDetailsFrame.tsx +0 -119
- package/src/client/conversations/CopyMarkdownButton.tsx +0 -65
- package/src/client/pages/automations/AutomationDetailsDrawer.tsx +0 -219
- package/src/client/pages/dev/ChartFixtures.tsx +0 -325
- package/src/client/pages/dev/ComponentsPage.tsx +0 -899
- package/src/client/pages/dev/ConversationFixture.tsx +0 -231
- package/src/client/pages/dev/ObjectFixtures.tsx +0 -138
- package/src/client/pages/dev/SegmentedFixtures.tsx +0 -59
- package/src/client/pages/dev/SelectFixtures.tsx +0 -62
- package/src/client/pages/dev/TranscriptActivityFixtures.tsx +0 -206
- package/src/client/pages/memory/MemoryDetailsDrawer.tsx +0 -167
- package/src/client/pages/system/SandboxSizeSummary.tsx +0 -47
- package/src/client/pages/system/SnapshotSummary.tsx +0 -78
|
@@ -4,21 +4,23 @@ import {
|
|
|
4
4
|
type TimeRangeDays,
|
|
5
5
|
} from "../../components/controls/TimeRangeSelector";
|
|
6
6
|
import type { AutomationExecutionDay } from "@sentry/junior/api/schema";
|
|
7
|
+
import { Bar, BarChart, CartesianGrid } from "recharts";
|
|
7
8
|
import {
|
|
8
9
|
ActivityChartAverageLine,
|
|
9
|
-
ActivityChartDateLabels,
|
|
10
|
-
ActivityChartGrid,
|
|
11
10
|
activityChartAverage,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
activityChartMargin,
|
|
12
|
+
ActivityChartTooltipContent,
|
|
13
|
+
ActivityChartXAxis,
|
|
14
|
+
ActivityChartYAxis,
|
|
16
15
|
} from "../../components/charts/ActivityChart";
|
|
16
|
+
import { ChartContainer, ChartTooltip } from "../../components/ui/chart";
|
|
17
17
|
|
|
18
18
|
import { Card } from "../../components/layout/Card";
|
|
19
19
|
import { formatActivityChartAverage } from "../../format";
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const chartConfig = {
|
|
22
|
+
total: { color: "var(--color-amber-400)", label: "Executions" },
|
|
23
|
+
};
|
|
22
24
|
|
|
23
25
|
/** Render completed automation executions over a trailing window. */
|
|
24
26
|
export function AutomationExecutionChart(props: {
|
|
@@ -29,12 +31,11 @@ export function AutomationExecutionChart(props: {
|
|
|
29
31
|
}) {
|
|
30
32
|
const bucketUnit = props.bucketUnit ?? "day";
|
|
31
33
|
|
|
32
|
-
const days = props.days
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const totals = days.map((day) => day.scheduled + day.event);
|
|
34
|
+
const days = props.days.map((day) => ({
|
|
35
|
+
date: day.date,
|
|
36
|
+
total: day.scheduled + day.event,
|
|
37
|
+
}));
|
|
38
|
+
const totals = days.map((day) => day.total);
|
|
38
39
|
const maximum = Math.max(1, ...totals);
|
|
39
40
|
const average = activityChartAverage(totals);
|
|
40
41
|
const hasExecutions = totals.some((total) => total > 0);
|
|
@@ -51,58 +52,44 @@ export function AutomationExecutionChart(props: {
|
|
|
51
52
|
</div>
|
|
52
53
|
|
|
53
54
|
<div className="relative mt-5 overflow-hidden">
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
layout={layout}
|
|
55
|
+
<ChartContainer
|
|
56
|
+
className="aspect-auto h-50 w-full"
|
|
57
|
+
config={chartConfig}
|
|
58
58
|
>
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
unit={timeRangeBucketAverageUnit(bucketUnit)}
|
|
94
|
-
average={average}
|
|
95
|
-
format={formatActivityChartAverage}
|
|
96
|
-
layout={layout}
|
|
97
|
-
maximum={maximum}
|
|
98
|
-
stroke="var(--color-slate-200)"
|
|
99
|
-
/>
|
|
100
|
-
<ActivityChartDateLabels
|
|
101
|
-
dates={days.map((day) => day.date)}
|
|
102
|
-
layout={layout}
|
|
103
|
-
xPosition={(index) => layout.left + index * step + step / 2}
|
|
104
|
-
/>
|
|
105
|
-
</ChartSvg>
|
|
59
|
+
<BarChart
|
|
60
|
+
aria-label={`Automation executions during the last ${props.range === 1 ? "24 hours" : `${props.range} days`}`}
|
|
61
|
+
data={days}
|
|
62
|
+
margin={activityChartMargin}
|
|
63
|
+
role="img"
|
|
64
|
+
>
|
|
65
|
+
<CartesianGrid strokeDasharray="3 5" vertical={false} />
|
|
66
|
+
<ActivityChartYAxis maximum={maximum} />
|
|
67
|
+
<ActivityChartXAxis keys={days.map((day) => day.date)} />
|
|
68
|
+
<ChartTooltip
|
|
69
|
+
content={
|
|
70
|
+
<ActivityChartTooltipContent
|
|
71
|
+
rows={(day: (typeof days)[number]) => [
|
|
72
|
+
["executions", day.total],
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
}
|
|
76
|
+
/>
|
|
77
|
+
<Bar
|
|
78
|
+
dataKey="total"
|
|
79
|
+
fill="var(--color-total)"
|
|
80
|
+
fillOpacity={0.82}
|
|
81
|
+
isAnimationActive={false}
|
|
82
|
+
maxBarSize={13}
|
|
83
|
+
radius={1}
|
|
84
|
+
/>
|
|
85
|
+
<ActivityChartAverageLine
|
|
86
|
+
unit={timeRangeBucketAverageUnit(bucketUnit)}
|
|
87
|
+
average={average}
|
|
88
|
+
format={formatActivityChartAverage}
|
|
89
|
+
stroke="var(--color-slate-200)"
|
|
90
|
+
/>
|
|
91
|
+
</BarChart>
|
|
92
|
+
</ChartContainer>
|
|
106
93
|
{!hasExecutions ? (
|
|
107
94
|
<div className="pointer-events-none absolute inset-0 grid place-items-center pt-12 font-sans text-xs text-dashboard-text-muted">
|
|
108
95
|
No automation executions in this period.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { AutomationExecutionStatusDay } from "@sentry/junior/api/schema";
|
|
2
|
+
import { Bar, BarChart, CartesianGrid } from "recharts";
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ChartSvg,
|
|
8
|
-
createActivityChartLayout,
|
|
4
|
+
activityChartMargin,
|
|
5
|
+
ActivityChartTooltipContent,
|
|
6
|
+
ActivityChartXAxis,
|
|
7
|
+
ActivityChartYAxis,
|
|
9
8
|
} from "../../components/charts/ActivityChart";
|
|
10
9
|
import { ChartLegend } from "../../components/charts/ChartLegend";
|
|
11
10
|
import {
|
|
@@ -13,6 +12,7 @@ import {
|
|
|
13
12
|
type TimeRangeDays,
|
|
14
13
|
} from "../../components/controls/TimeRangeSelector";
|
|
15
14
|
import { Card } from "../../components/layout/Card";
|
|
15
|
+
import { ChartContainer, ChartTooltip } from "../../components/ui/chart";
|
|
16
16
|
|
|
17
17
|
const series = [
|
|
18
18
|
{ color: "var(--color-emerald-300)", key: "completed", label: "Completed" },
|
|
@@ -20,6 +20,10 @@ const series = [
|
|
|
20
20
|
{ color: "var(--color-amber-300)", key: "blocked", label: "Blocked" },
|
|
21
21
|
] as const;
|
|
22
22
|
|
|
23
|
+
const chartConfig = Object.fromEntries(
|
|
24
|
+
series.map((item) => [item.key, { color: item.color, label: item.label }]),
|
|
25
|
+
);
|
|
26
|
+
|
|
23
27
|
/** Render one automation's terminal executions by status over a trailing window. */
|
|
24
28
|
export function AutomationExecutionStatusChart(props: {
|
|
25
29
|
bucketUnit?: TimeRangeBucketUnit;
|
|
@@ -30,12 +34,8 @@ export function AutomationExecutionStatusChart(props: {
|
|
|
30
34
|
const bucketUnit = props.bucketUnit ?? "day";
|
|
31
35
|
|
|
32
36
|
const days = props.days;
|
|
33
|
-
const layout = createActivityChartLayout(220);
|
|
34
37
|
const totals = days.map((day) => day.completed + day.failed + day.blocked);
|
|
35
38
|
const maximum = Math.max(1, ...totals);
|
|
36
|
-
const step =
|
|
37
|
-
days.length > 0 ? layout.plotWidth / days.length : layout.plotWidth;
|
|
38
|
-
const barWidth = Math.max(2, Math.min(13, step * 0.68));
|
|
39
39
|
const hasExecutions = totals.some((total) => total > 0);
|
|
40
40
|
|
|
41
41
|
return (
|
|
@@ -59,67 +59,44 @@ export function AutomationExecutionStatusChart(props: {
|
|
|
59
59
|
/>
|
|
60
60
|
|
|
61
61
|
<div className="relative mt-3 overflow-hidden">
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
layout={layout}
|
|
62
|
+
<ChartContainer
|
|
63
|
+
className="aspect-auto h-55 w-full"
|
|
64
|
+
config={chartConfig}
|
|
66
65
|
>
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
]
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
x={x}
|
|
102
|
-
y={layout.top + layout.plotHeight - stackedHeight}
|
|
103
|
-
/>
|
|
104
|
-
);
|
|
105
|
-
})}
|
|
106
|
-
<rect
|
|
107
|
-
fill="transparent"
|
|
108
|
-
height={layout.plotHeight}
|
|
109
|
-
width={Math.max(barWidth, 8)}
|
|
110
|
-
x={x - (Math.max(barWidth, 8) - barWidth) / 2}
|
|
111
|
-
y={layout.top}
|
|
112
|
-
/>
|
|
113
|
-
</g>
|
|
114
|
-
</ActivityChartTooltip>
|
|
115
|
-
);
|
|
116
|
-
})}
|
|
117
|
-
<ActivityChartDateLabels
|
|
118
|
-
dates={days.map((day) => day.date)}
|
|
119
|
-
layout={layout}
|
|
120
|
-
xPosition={(index) => layout.left + index * step + step / 2}
|
|
121
|
-
/>
|
|
122
|
-
</ChartSvg>
|
|
66
|
+
<BarChart
|
|
67
|
+
aria-label={`Automation executions during the last ${props.range === 1 ? "24 hours" : `${props.range} days`}`}
|
|
68
|
+
data={days}
|
|
69
|
+
margin={activityChartMargin}
|
|
70
|
+
role="img"
|
|
71
|
+
>
|
|
72
|
+
<CartesianGrid strokeDasharray="3 5" vertical={false} />
|
|
73
|
+
<ActivityChartYAxis maximum={maximum} />
|
|
74
|
+
<ActivityChartXAxis keys={days.map((day) => day.date)} />
|
|
75
|
+
<ChartTooltip
|
|
76
|
+
content={
|
|
77
|
+
<ActivityChartTooltipContent
|
|
78
|
+
rows={(day: AutomationExecutionStatusDay) => [
|
|
79
|
+
["completed", day.completed],
|
|
80
|
+
["failed", day.failed],
|
|
81
|
+
["blocked", day.blocked],
|
|
82
|
+
["total", day.completed + day.failed + day.blocked],
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
85
|
+
}
|
|
86
|
+
/>
|
|
87
|
+
{series.map((item) => (
|
|
88
|
+
<Bar
|
|
89
|
+
dataKey={item.key}
|
|
90
|
+
fill={`var(--color-${item.key})`}
|
|
91
|
+
fillOpacity={0.82}
|
|
92
|
+
isAnimationActive={false}
|
|
93
|
+
key={item.key}
|
|
94
|
+
maxBarSize={13}
|
|
95
|
+
stackId="status"
|
|
96
|
+
/>
|
|
97
|
+
))}
|
|
98
|
+
</BarChart>
|
|
99
|
+
</ChartContainer>
|
|
123
100
|
{!hasExecutions ? (
|
|
124
101
|
<div className="pointer-events-none absolute inset-0 grid place-items-center pt-12 font-sans text-xs text-dashboard-text-muted">
|
|
125
102
|
No automation executions in this period.
|