Skip to content

Commit

Permalink
archive: dm docs (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
shhdgit authored Dec 30, 2024
1 parent 99cb7de commit f5f338f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
3 changes: 0 additions & 3 deletions src/components/Dropdown/VersionSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,6 @@ function generateArchivedWebsiteUrlByLangAndType(lang?: string, type?: string) {
case "tidb-in-kubernetes":
url = `${url}/tidb-in-kubernetes/v1.0`;
break;
case "tidb-data-migration":
url = `${url}/tidb-data-migration/v1.0`;
break;
default:
break;
}
Expand Down
15 changes: 0 additions & 15 deletions src/shared/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,6 @@ export const TIDB_EN_SEARCH_INDEX_VERSION =
CONFIG["docs"]["tidb"]["searchIndex"]["en"] || [];
export const TIDB_ZH_SEARCH_INDEX_VERSION =
CONFIG["docs"]["tidb"]["searchIndex"]["zh"] || [];
export const DM_EN_LATEST_VERSION =
CONFIG["docs"]["tidb-data-migration"]["languages"]["en"]["versions"][0];
export const DM_EN_STABLE_VERSION = "";
export const OP_EN_STABLE_VERSION =
CONFIG["docs"]["tidb-in-kubernetes"]["stable"];

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

export const DM_EN_VERSIONS = CONFIG["docs"]["tidb-data-migration"][
"languages"
]["en"]["versions"].map((d) => convertVersionName(d, DM_EN_STABLE_VERSION));

export const OP_EN_VERSIONS = CONFIG["docs"]["tidb-in-kubernetes"]["languages"][
"en"
]["versions"].map((d) => convertVersionName(d, OP_EN_STABLE_VERSION));
Expand All @@ -533,10 +526,6 @@ export const EN_DOC_TYPE_LIST = [
name: "TiDB in Kubernetes",
match: "tidb-in-kubernetes",
},
{
name: "TiDB Data Migration (DM)",
match: "tidb-data-migration",
},
] as const;

export const ZH_DOC_TYPE_LIST = [
Expand All @@ -548,10 +537,6 @@ export const ZH_DOC_TYPE_LIST = [
name: "TiDB in Kubernetes",
match: "tidb-in-kubernetes",
},
{
name: "TiDB Data Migration (DM)",
match: "tidb-data-migration",
},
];

export const ARCHIVE_WEBSITE_URL = "https://docs-archive.pingcap.com";
8 changes: 0 additions & 8 deletions src/templates/DocSearchTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { algoliaClient } from "shared/utils/algolia";
import {
TIDB_EN_STABLE_VERSION,
TIDB_EN_SEARCH_INDEX_VERSION,
DM_EN_LATEST_VERSION,
OP_EN_STABLE_VERSION,
CLOUD_EN_VERSIONS,
EN_DOC_TYPE_LIST,
Expand All @@ -34,11 +33,8 @@ import { FeedbackSurveyCampaign } from "components/Campaign/FeedbackSurvey";
// TiDB: get searchable versions from fetchTidbSearchIndcies
// TiDB Cloud: only has one version
// TiDB Operator: get stable version
// TiDB Data Migration: get latest version
const fetchVersionListByDocType = (docType: string, lang: string) => {
switch (docType) {
case "tidb-data-migration":
return [DM_EN_LATEST_VERSION];
case "tidb-in-kubernetes":
return [OP_EN_STABLE_VERSION];
case "tidbcloud":
Expand All @@ -63,8 +59,6 @@ function replaceStableVersion(match: string) {
switch (match) {
case "tidb":
return TIDB_EN_STABLE_VERSION;
// case "tidb-data-migration":
// return DM_EN_STABLE_VERSION;
case "tidb-in-kubernetes":
return OP_EN_STABLE_VERSION;
default:
Expand Down Expand Up @@ -111,8 +105,6 @@ const getSearchIndexVersion = (
const latestVersion = versions[0];
const stableVersion = TIDB_EN_STABLE_VERSION?.replace("release-", "v");
return latestVersion || stableVersion;
case "tidb-data-migration":
return DM_EN_LATEST_VERSION?.replace("release-", "v");
case "tidb-in-kubernetes":
return OP_EN_STABLE_VERSION?.replace("release-", "v");
default:
Expand Down

0 comments on commit f5f338f

Please sign in to comment.