From 7866c3a11135a1a469e082352c2b0a1f0ec6b504 Mon Sep 17 00:00:00 2001 From: Andy Pickering Date: Wed, 26 Feb 2020 11:29:14 +0900 Subject: [PATCH] Graphs: Change `Bar` component's `isLink` to `noLink` Because booleans that default to true can be confusing. --- frontend/public/components/graphs/bar.tsx | 12 ++++++------ .../components/monitoring/dashboards/bar-chart.tsx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/public/components/graphs/bar.tsx b/frontend/public/components/graphs/bar.tsx index 7c4f7899efe..8883656bb84 100644 --- a/frontend/public/components/graphs/bar.tsx +++ b/frontend/public/components/graphs/bar.tsx @@ -24,9 +24,9 @@ export const BarChart: React.FC = ({ barSpacing = 15, barWidth = DEFAULT_BAR_WIDTH, data = [], - isLink = true, LabelComponent, loading = false, + noLink = false, query, theme = getCustomTheme(ChartThemeColor.blue, ChartThemeVariant.light, barTheme), title, @@ -47,7 +47,7 @@ export const BarChart: React.FC = ({ return ( {data.length ? ( - + {data.map((datum, index) => (
@@ -85,10 +85,10 @@ export const Bar: React.FC = ({ barWidth, delay = undefined, humanize = humanizeNumber, - isLink = true, LabelComponent, metric, namespace, + noLink = false, query, theme, title, @@ -106,9 +106,9 @@ export const Bar: React.FC = ({ barSpacing={barSpacing} barWidth={barWidth} data={data} - isLink={isLink} LabelComponent={LabelComponent} loading={loading} + noLink={noLink} query={query} theme={theme} title={title} @@ -125,9 +125,9 @@ type BarChartProps = { barSpacing?: number; barWidth?: number; data?: DataPoint[]; - isLink?: boolean; LabelComponent?: React.ComponentType; loading?: boolean; + noLink?: boolean; query?: string; theme?: any; // TODO figure out the best way to import VictoryThemeDefinition title?: string; @@ -139,10 +139,10 @@ type BarProps = { barWidth?: number; delay?: number; humanize?: Humanize; - isLink?: boolean; LabelComponent?: React.ComponentType; metric: string; namespace?: string; + noLink?: boolean; query: string; theme?: any; // TODO figure out the best way to import VictoryThemeDefinition title?: string; diff --git a/frontend/public/components/monitoring/dashboards/bar-chart.tsx b/frontend/public/components/monitoring/dashboards/bar-chart.tsx index 6b9d5fa5942..1d6961ebd91 100644 --- a/frontend/public/components/monitoring/dashboards/bar-chart.tsx +++ b/frontend/public/components/monitoring/dashboards/bar-chart.tsx @@ -10,8 +10,8 @@ const BarChart: React.FC = ({ pollInterval, query }) => ( barSpacing={5} barWidth={8} delay={pollInterval} - isLink={false} LabelComponent={Label} + noLink={true} query={query} /> );