Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1804143: Graphs: Change Bar component's isLink to noLink #4494

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions frontend/public/components/graphs/bar.tsx
Expand Up @@ -24,9 +24,9 @@ export const BarChart: React.FC<BarChartProps> = ({
barSpacing = 15,
barWidth = DEFAULT_BAR_WIDTH,
data = [],
isLink = true,
LabelComponent,
loading = false,
noLink = false,
query,
theme = getCustomTheme(ChartThemeColor.blue, ChartThemeVariant.light, barTheme),
title,
Expand All @@ -47,7 +47,7 @@ export const BarChart: React.FC<BarChartProps> = ({
return (
<PrometheusGraph ref={containerRef} title={title} className={titleClassName}>
{data.length ? (
<PrometheusGraphLink query={isLink ? query : undefined}>
<PrometheusGraphLink query={noLink ? undefined : query}>
{data.map((datum, index) => (
<React.Fragment key={index}>
<div className="graph-bar__label">
Expand Down Expand Up @@ -85,10 +85,10 @@ export const Bar: React.FC<BarProps> = ({
barWidth,
delay = undefined,
humanize = humanizeNumber,
isLink = true,
LabelComponent,
metric,
namespace,
noLink = false,
query,
theme,
title,
Expand All @@ -106,9 +106,9 @@ export const Bar: React.FC<BarProps> = ({
barSpacing={barSpacing}
barWidth={barWidth}
data={data}
isLink={isLink}
LabelComponent={LabelComponent}
loading={loading}
noLink={noLink}
query={query}
theme={theme}
title={title}
Expand All @@ -125,9 +125,9 @@ type BarChartProps = {
barSpacing?: number;
barWidth?: number;
data?: DataPoint[];
isLink?: boolean;
LabelComponent?: React.ComponentType<LabelComponentProps>;
loading?: boolean;
noLink?: boolean;
query?: string;
theme?: any; // TODO figure out the best way to import VictoryThemeDefinition
title?: string;
Expand All @@ -139,10 +139,10 @@ type BarProps = {
barWidth?: number;
delay?: number;
humanize?: Humanize;
isLink?: boolean;
LabelComponent?: React.ComponentType<LabelComponentProps>;
metric: string;
namespace?: string;
noLink?: boolean;
query: string;
theme?: any; // TODO figure out the best way to import VictoryThemeDefinition
title?: string;
Expand Down
Expand Up @@ -10,8 +10,8 @@ const BarChart: React.FC<BarChartProps> = ({ pollInterval, query }) => (
barSpacing={5}
barWidth={8}
delay={pollInterval}
isLink={false}
LabelComponent={Label}
noLink={true}
query={query}
/>
);
Expand Down