Skip to content

Commit f5f338f

Browse files
authored
archive: dm docs (#571)
1 parent 99cb7de commit f5f338f

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

src/components/Dropdown/VersionSelect.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,6 @@ function generateArchivedWebsiteUrlByLangAndType(lang?: string, type?: string) {
439439
case "tidb-in-kubernetes":
440440
url = `${url}/tidb-in-kubernetes/v1.0`;
441441
break;
442-
case "tidb-data-migration":
443-
url = `${url}/tidb-data-migration/v1.0`;
444-
break;
445442
default:
446443
break;
447444
}

src/shared/resources.ts

-15
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,6 @@ export const TIDB_EN_SEARCH_INDEX_VERSION =
497497
CONFIG["docs"]["tidb"]["searchIndex"]["en"] || [];
498498
export const TIDB_ZH_SEARCH_INDEX_VERSION =
499499
CONFIG["docs"]["tidb"]["searchIndex"]["zh"] || [];
500-
export const DM_EN_LATEST_VERSION =
501-
CONFIG["docs"]["tidb-data-migration"]["languages"]["en"]["versions"][0];
502-
export const DM_EN_STABLE_VERSION = "";
503500
export const OP_EN_STABLE_VERSION =
504501
CONFIG["docs"]["tidb-in-kubernetes"]["stable"];
505502

@@ -510,10 +507,6 @@ export const TIDB_ZH_VERSIONS = CONFIG["docs"]["tidb"]["languages"]["zh"][
510507
"versions"
511508
].map((d) => convertVersionName(d, ""));
512509

513-
export const DM_EN_VERSIONS = CONFIG["docs"]["tidb-data-migration"][
514-
"languages"
515-
]["en"]["versions"].map((d) => convertVersionName(d, DM_EN_STABLE_VERSION));
516-
517510
export const OP_EN_VERSIONS = CONFIG["docs"]["tidb-in-kubernetes"]["languages"][
518511
"en"
519512
]["versions"].map((d) => convertVersionName(d, OP_EN_STABLE_VERSION));
@@ -533,10 +526,6 @@ export const EN_DOC_TYPE_LIST = [
533526
name: "TiDB in Kubernetes",
534527
match: "tidb-in-kubernetes",
535528
},
536-
{
537-
name: "TiDB Data Migration (DM)",
538-
match: "tidb-data-migration",
539-
},
540529
] as const;
541530

542531
export const ZH_DOC_TYPE_LIST = [
@@ -548,10 +537,6 @@ export const ZH_DOC_TYPE_LIST = [
548537
name: "TiDB in Kubernetes",
549538
match: "tidb-in-kubernetes",
550539
},
551-
{
552-
name: "TiDB Data Migration (DM)",
553-
match: "tidb-data-migration",
554-
},
555540
];
556541

557542
export const ARCHIVE_WEBSITE_URL = "https://docs-archive.pingcap.com";

src/templates/DocSearchTemplate.tsx

-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { algoliaClient } from "shared/utils/algolia";
2121
import {
2222
TIDB_EN_STABLE_VERSION,
2323
TIDB_EN_SEARCH_INDEX_VERSION,
24-
DM_EN_LATEST_VERSION,
2524
OP_EN_STABLE_VERSION,
2625
CLOUD_EN_VERSIONS,
2726
EN_DOC_TYPE_LIST,
@@ -34,11 +33,8 @@ import { FeedbackSurveyCampaign } from "components/Campaign/FeedbackSurvey";
3433
// TiDB: get searchable versions from fetchTidbSearchIndcies
3534
// TiDB Cloud: only has one version
3635
// TiDB Operator: get stable version
37-
// TiDB Data Migration: get latest version
3836
const fetchVersionListByDocType = (docType: string, lang: string) => {
3937
switch (docType) {
40-
case "tidb-data-migration":
41-
return [DM_EN_LATEST_VERSION];
4238
case "tidb-in-kubernetes":
4339
return [OP_EN_STABLE_VERSION];
4440
case "tidbcloud":
@@ -63,8 +59,6 @@ function replaceStableVersion(match: string) {
6359
switch (match) {
6460
case "tidb":
6561
return TIDB_EN_STABLE_VERSION;
66-
// case "tidb-data-migration":
67-
// return DM_EN_STABLE_VERSION;
6862
case "tidb-in-kubernetes":
6963
return OP_EN_STABLE_VERSION;
7064
default:
@@ -111,8 +105,6 @@ const getSearchIndexVersion = (
111105
const latestVersion = versions[0];
112106
const stableVersion = TIDB_EN_STABLE_VERSION?.replace("release-", "v");
113107
return latestVersion || stableVersion;
114-
case "tidb-data-migration":
115-
return DM_EN_LATEST_VERSION?.replace("release-", "v");
116108
case "tidb-in-kubernetes":
117109
return OP_EN_STABLE_VERSION?.replace("release-", "v");
118110
default:

0 commit comments

Comments
 (0)