mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
feat: house chart filters in bar
This commit is contained in:
1 parent
2e0359893f
commit
4f7cd4bfa1
3 files changed
+21
-20
No files matched your search
@@ -111,7 +111,7 @@ export const QueryInsights = () => {
|
||||
{
|
||||
id: 'query_latency',
|
||||
label: 'Query latency',
|
||||
description: `p95 in ${p95Latency}`,
|
||||
description: `p95: ${p95Latency}`,
|
||||
tooltip: 'Shows the latency of each query execution.',
|
||||
},
|
||||
{
|
||||
@@ -281,7 +281,7 @@ export const QueryInsights = () => {
|
||||
<Tabs_Shadcn_
|
||||
value={selectedMetric}
|
||||
onValueChange={(value) => setSelectedMetric(value as MetricType)}
|
||||
className="space-y-4"
|
||||
className="pb-4"
|
||||
>
|
||||
<TabsList_Shadcn_ className={cn('flex gap-0 border-0 items-end z-10')}>
|
||||
{METRICS.map((metric) => (
|
||||
@@ -334,7 +334,6 @@ export const QueryInsights = () => {
|
||||
</Tabs_Shadcn_>
|
||||
|
||||
|
||||
|
||||
<QueryList
|
||||
queries={queriesData || []}
|
||||
isLoading={isLoadingQueries}
|
||||
|
||||
@@ -168,26 +168,28 @@ export function MetricsChart(props: MetricsChartProps) {
|
||||
return (
|
||||
<div className="h-[320px] flex flex-col">
|
||||
<div className="flex flex-col flex-1 min-h-0">
|
||||
<div className="flex flex-wrap items-center gap-2 px-5 mb-4">
|
||||
<MetricToggleButtons
|
||||
chartConfig={chartConfig}
|
||||
visibleMetrics={visibleMetrics}
|
||||
setVisibleMetrics={setVisibleMetrics}
|
||||
metric={metric}
|
||||
selectedQuery={selectedQuery}
|
||||
/>
|
||||
|
||||
{selectedQuery && (
|
||||
<SelectedQueryBadge
|
||||
selectedQuery={selectedQuery}
|
||||
onClear={handleClearSelectedQuery}
|
||||
<div className="flex flex-wrap items-center gap-2 mb-4 px-6 py-2 bg-surface-200 border-t border-b -mt-px justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<MetricToggleButtons
|
||||
chartConfig={chartConfig}
|
||||
visibleMetrics={visibleMetrics}
|
||||
setVisibleMetrics={setVisibleMetrics}
|
||||
metric={metric}
|
||||
metrics={metricBadges}
|
||||
selectedQuery={selectedQuery}
|
||||
/>
|
||||
)}
|
||||
|
||||
{selectedQuery && (
|
||||
<SelectedQueryBadge
|
||||
selectedQuery={selectedQuery}
|
||||
onClear={handleClearSelectedQuery}
|
||||
metric={metric}
|
||||
metrics={metricBadges}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex-1 min-h-0">
|
||||
<div className="flex-1 min-h-0 pt-4 pr-4">
|
||||
<ChartContainer className="h-full w-full" config={config}>
|
||||
<AreaChart
|
||||
data={chartData}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ export const QueryInsightsLineChart = ({
|
||||
>
|
||||
<ComposedChart
|
||||
data={data}
|
||||
onMouseMove={(e: { activeTooltipIndex: number | null }) => {
|
||||
onMouseMove={(e: any) => {
|
||||
if (e.activeTooltipIndex !== focusDataIndex) {
|
||||
setFocusDataIndex(e.activeTooltipIndex)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user