Skip to content

Commit 39eebf6

Browse files
authored
docs: fix broken links from Semrush report (#7025)
1 parent e03f143 commit 39eebf6

File tree

18 files changed

+99
-90
lines changed

18 files changed

+99
-90
lines changed
Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import React from 'react';
2-
import classes from './AlertBox.module.css';
3-
import classnames from 'classnames/bind';
1+
import React from "react";
2+
import classes from "./AlertBox.module.css";
3+
import classnames from "classnames/bind";
44
const cn = classnames.bind(classes);
55

66
export enum AlertBoxTypes {
7-
DANGER = 'danger',
8-
INFO = 'info',
9-
SUCCESS = 'success',
10-
WARNING = 'warning',
7+
DANGER = "danger",
8+
INFO = "info",
9+
SUCCESS = "success",
10+
WARNING = "warning",
1111
}
1212

1313
declare const TypeToEmoji: {
@@ -19,55 +19,64 @@ declare const TypeToEmoji: {
1919
type CalloutType = keyof typeof TypeToEmoji;
2020

2121
export type AlertBoxProps = {
22-
children: string;
22+
children: React.ReactNode;
2323
heading?: string;
2424
type: AlertBoxTypes;
25-
}
25+
};
2626

2727
const typeMapping: Record<AlertBoxTypes, CalloutType> = {
28-
'danger': 'error',
29-
info: 'info',
30-
warning: 'warning',
31-
success: 'default',
32-
}
28+
danger: "error",
29+
info: "info",
30+
warning: "warning",
31+
success: "default",
32+
};
3333

3434
const iconMapping: Record<string, any> = {
35-
'danger': '🚫',
36-
info: 'ℹ️',
37-
warning: '⚠️',
38-
success: '✅',
35+
danger: "🚫",
36+
info: "ℹ️",
37+
warning: "⚠️",
38+
success: "✅",
3939
};
4040

4141
export const AlertBox = ({ children, heading, type }: AlertBoxProps) => {
42-
const header = heading
43-
? (
44-
<div className={classes.AlertBox__header}>
45-
<span className={cn('AlertBox__HeaderIcon')}>{iconMapping[type]}</span>
46-
{heading}
47-
</div>
48-
)
49-
: null;
42+
const header = heading ? (
43+
<div className={classes.AlertBox__header}>
44+
<span className={cn("AlertBox__HeaderIcon")}>{iconMapping[type]}</span>
45+
{heading}
46+
</div>
47+
) : null;
5048

5149
return (
52-
<div className={cn('AlertBox__Wrapper', `AlertBox__Wrapper--${typeMapping[type]}`)}>
50+
<div
51+
className={cn(
52+
"AlertBox__Wrapper",
53+
`AlertBox__Wrapper--${typeMapping[type]}`
54+
)}
55+
>
5356
{header}
54-
<div className={classes.AlertBox__content}>
55-
{children}
56-
</div>
57+
<div className={classes.AlertBox__content}>{children}</div>
5758
</div>
58-
)
59-
}
59+
);
60+
};
6061

61-
export type AlertBoxSubclass = Omit<AlertBoxProps, 'type'>;
62+
export type AlertBoxSubclass = Omit<AlertBoxProps, "type">;
6263

6364
export type DangerBoxProps = AlertBoxSubclass;
64-
export const DangerBox = (props: DangerBoxProps) => <AlertBox type={AlertBoxTypes.DANGER} {...props} />;
65+
export const DangerBox = (props: DangerBoxProps) => (
66+
<AlertBox type={AlertBoxTypes.DANGER} {...props} />
67+
);
6568

6669
export type InfoBoxProps = AlertBoxSubclass;
67-
export const InfoBox = (props: InfoBoxProps) => <AlertBox type={AlertBoxTypes.INFO} {...props} />;
70+
export const InfoBox = (props: InfoBoxProps) => (
71+
<AlertBox type={AlertBoxTypes.INFO} {...props} />
72+
);
6873

6974
export type SuccessBoxProps = AlertBoxSubclass;
70-
export const SuccessBox = (props: SuccessBoxProps) => <AlertBox type={AlertBoxTypes.SUCCESS} {...props} />;
75+
export const SuccessBox = (props: SuccessBoxProps) => (
76+
<AlertBox type={AlertBoxTypes.SUCCESS} {...props} />
77+
);
7178

7279
export type WarningBoxProps = AlertBoxSubclass;
73-
export const WarningBox = (props: WarningBoxProps) => <AlertBox type={AlertBoxTypes.WARNING} {...props} />;
80+
export const WarningBox = (props: WarningBoxProps) => (
81+
<AlertBox type={AlertBoxTypes.WARNING} {...props} />
82+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { WarningBox } from "@/components/mdx/AlertBox/AlertBox";
2+
import { Link } from "@/components/overrides/Anchor/Link";
3+
4+
export interface CommunitySupportedDriverProps {
5+
dataSource: string;
6+
}
7+
8+
export const CommunitySupportedDriver = ({
9+
dataSource,
10+
}: CommunitySupportedDriverProps) => {
11+
return (
12+
<WarningBox>
13+
The driver for {dataSource} is{" "}
14+
<Link href="/product/configuration/data-sources#driver-support">
15+
community-supported
16+
</Link>{" "}
17+
and is not supported by Cube or the vendor.
18+
</WarningBox>
19+
);
20+
};

docs/docs-new/components/mdx/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { Table } from '@/components/overrides/Table/Table';
2626
import { Td } from '@/components/overrides/Table/Td';
2727
import { Th } from '@/components/overrides/Table/Th';
2828
import { Tr } from '@/components/overrides/Table/Tr';
29+
import { CommunitySupportedDriver } from '@/components/mdx/Banners/CommunitySupportedDriver';
2930

3031
export const components = {
3132
...Buttons,
@@ -54,6 +55,8 @@ export const components = {
5455
Diagram,
5556
YouTubeVideo,
5657

58+
CommunitySupportedDriver,
59+
5760
// Overrides
5861
h1: H1,
5962
a: Link,

docs/docs-new/pages/product/apis-integrations/rest-api/real-time-data-fetch.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ const Chart = ({ query }) => {
108108
## Refresh Rate
109109

110110
As in the case of a regular data fetch, real-time data fetch obeys
111-
[`refresh_key` refresh rules](caching#refresh-keys). In order to provide a
112-
desired refresh rate, `refresh_key` should reflect the rate of change of the
113-
underlying data set; the querying time should also be much less than the desired
114-
refresh rate. Please use the
111+
[`refresh_key` refresh rules](/product/caching#refresh-keys). In order to
112+
provide a desired refresh rate, `refresh_key` should reflect the rate of change
113+
of the underlying data set; the querying time should also be much less than the
114+
desired refresh rate. Please use the
115115
[`every`](/product/data-modeling/reference/cube#refresh_key) parameter to adjust
116116
the refresh interval.

docs/docs-new/pages/product/configuration/data-sources/_meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
"elasticsearch": "Elasticsearch",
88
"firebolt": "Firebolt",
99
"google-bigquery": "Google BigQuery",
10-
"hive": "Hive",
10+
"hive": "Hive / SparkSQL",
1111
"ksqldb": "ksqlDB",
1212
"materialize": "Materialize",
1313
"mongodb": "MongoDB",

docs/docs-new/pages/product/configuration/data-sources/druid.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ redirect_from:
55

66
# Druid
77

8-
<WarningBox>
9-
The driver for Druid is{" "}
10-
<a href="../databases#driver-support">community-supported</a> and is not
11-
supported by Cube or the vendor.
12-
</WarningBox>
8+
<CommunitySupportedDriver dataSource="Druid" />
139

1410
## Prerequisites
1511

docs/docs-new/pages/product/configuration/data-sources/elasticsearch.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ redirect_from:
55

66
# Elasticsearch
77

8-
<WarningBox>
9-
The driver for Elasticsearch is{" "}
10-
<a href="../databases#driver-support">community-supported</a> and is not
11-
supported by Cube or the vendor.
12-
</WarningBox>
8+
<CommunitySupportedDriver dataSource="Elasticsearch" />
139

1410
## Prerequisites
1511

docs/docs-new/pages/product/configuration/data-sources/hive.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ redirect_from:
33
- /config/databases/hive-sparksql
44
---
55

6-
# Hive
6+
# Hive / SparkSQL
77

8-
<WarningBox>
9-
The driver for Hive/SparkSQL is{" "}
10-
<a href="../databases#driver-support">community-supported</a> and is not
11-
supported by Cube or the vendor.
12-
</WarningBox>
8+
<CommunitySupportedDriver dataSource="Hive / SparkSQL" />
139

1410
## Prerequisites
1511

docs/docs-new/pages/product/configuration/data-sources/mongodb.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ redirect_from:
55

66
# MongoDB
77

8-
<WarningBox>
9-
The driver for MongoDB is{" "}
10-
<a href="../databases#driver-support">community-supported</a> and is not
11-
supported by Cube or the vendor.
12-
</WarningBox>
8+
<CommunitySupportedDriver dataSource="MongoDB" />
139

1410
## Prerequisites
1511

docs/docs-new/pages/product/configuration/data-sources/oracle.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ redirect_from:
55

66
# Oracle
77

8-
<WarningBox>
9-
The driver for Oracle is{" "}
10-
<a href="../databases#driver-support">community-supported</a> and is not
11-
supported by Cube or the vendor.
12-
</WarningBox>
8+
<CommunitySupportedDriver dataSource="Oracle" />
139

1410
## Prerequisites
1511

0 commit comments

Comments
 (0)