2021-03-08 15:39:49 -08:00
|
|
|
const fs = require("fs");
|
|
|
|
|
2021-08-10 19:46:02 -04:00
|
|
|
function list_ids_in_directory(directory, hardcoded_labels) {
|
|
|
|
if (hardcoded_labels === undefined) {
|
|
|
|
hardcoded_labels = {};
|
|
|
|
}
|
|
|
|
|
2021-05-11 11:17:53 -07:00
|
|
|
const files = fs.readdirSync(`../${directory}`).sort();
|
2021-03-08 15:39:49 -08:00
|
|
|
let ids = [];
|
|
|
|
for (const name of files) {
|
|
|
|
if (fs.lstatSync(`../${directory}/${name}`).isDirectory()) {
|
|
|
|
// Recurse into the directory.
|
|
|
|
const inner_ids = list_ids_in_directory(`${directory}/${name}`);
|
|
|
|
ids = ids.concat(inner_ids);
|
|
|
|
} else {
|
|
|
|
if (name.endsWith(".md")) {
|
2021-05-11 11:17:53 -07:00
|
|
|
const slug = name.replace(/\.md$/, "");
|
|
|
|
let id = `${directory}/${slug}`;
|
|
|
|
if (id.match(/\/\d+-.+/)) {
|
|
|
|
id = id.replace(/\/\d+-/, "/");
|
|
|
|
}
|
2021-08-10 19:46:02 -04:00
|
|
|
|
|
|
|
if (id in hardcoded_labels) {
|
|
|
|
label = hardcoded_labels[id];
|
|
|
|
ids.push({ type: "doc", id, label });
|
|
|
|
} else {
|
|
|
|
ids.push({ type: "doc", id });
|
|
|
|
}
|
2021-03-08 15:39:49 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ids;
|
|
|
|
}
|
|
|
|
|
2021-07-28 14:38:13 -07:00
|
|
|
// note: to handle errors where you don't want a markdown file in the sidebar, add it as a comment.
|
|
|
|
// this will fix errors like `Error: File not accounted for in sidebar: ...`
|
2021-03-05 00:12:12 -08:00
|
|
|
module.exports = {
|
|
|
|
// users
|
|
|
|
// architects
|
|
|
|
// modelers
|
|
|
|
// developers
|
|
|
|
// operators
|
|
|
|
|
|
|
|
overviewSidebar: {
|
|
|
|
DataHub: [
|
|
|
|
"README",
|
2021-06-30 16:50:03 -07:00
|
|
|
// "docs/faq", // hide from sidebar: out of date
|
2021-03-05 00:12:12 -08:00
|
|
|
"docs/features",
|
2021-11-24 12:41:07 -08:00
|
|
|
{
|
|
|
|
Architecture: [
|
|
|
|
"docs/architecture/architecture",
|
|
|
|
"docs/components",
|
|
|
|
"docs/architecture/metadata-ingestion",
|
|
|
|
"docs/architecture/metadata-serving",
|
|
|
|
// "docs/what/gma",
|
|
|
|
// "docs/what/gms",
|
|
|
|
],
|
|
|
|
},
|
2021-03-05 00:12:12 -08:00
|
|
|
"docs/roadmap",
|
|
|
|
"docs/CONTRIBUTING",
|
|
|
|
"docs/demo",
|
2021-05-25 18:51:24 -07:00
|
|
|
"docs/saas",
|
2021-06-29 10:41:44 -07:00
|
|
|
"releases",
|
2021-03-05 00:12:12 -08:00
|
|
|
],
|
|
|
|
"Getting Started": [
|
|
|
|
"docs/quickstart",
|
2021-11-24 00:21:44 -08:00
|
|
|
"docs/cli",
|
2021-04-05 19:11:28 -07:00
|
|
|
"metadata-ingestion/README",
|
2021-11-24 12:41:07 -08:00
|
|
|
"docs/debugging",
|
2021-03-05 00:12:12 -08:00
|
|
|
],
|
2021-08-10 19:46:02 -04:00
|
|
|
"Metadata Ingestion": [
|
|
|
|
// add a custom label since the default is 'Metadata Ingestion'
|
|
|
|
// note that we also have to add the path to this file in sidebarsjs_hardcoded_titles in generateDocsDir.ts
|
2021-08-08 16:40:51 -04:00
|
|
|
{
|
2021-08-10 19:46:02 -04:00
|
|
|
type: "doc",
|
|
|
|
label: "Quickstart",
|
|
|
|
id: "metadata-ingestion/README",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Sources: list_ids_in_directory("metadata-ingestion/source_docs", {
|
|
|
|
"metadata-ingestion/source_docs/s3": "S3",
|
|
|
|
}),
|
2021-08-08 16:40:51 -04:00
|
|
|
},
|
2021-11-24 00:06:45 +05:30
|
|
|
"metadata-ingestion/transformers",
|
2021-08-08 16:40:51 -04:00
|
|
|
{
|
|
|
|
Sinks: list_ids_in_directory("metadata-ingestion/sink_docs"),
|
|
|
|
},
|
2022-01-02 22:48:38 +05:30
|
|
|
{
|
|
|
|
"Custom Integrations": [
|
|
|
|
"metadata-ingestion/as-a-library",
|
|
|
|
"metadata-integration/java/as-a-library",
|
|
|
|
],
|
|
|
|
},
|
2021-12-07 23:39:59 +05:30
|
|
|
{
|
|
|
|
Scheduling: [
|
|
|
|
"metadata-ingestion/schedule_docs/intro",
|
|
|
|
"metadata-ingestion/schedule_docs/cron",
|
|
|
|
"metadata-ingestion/schedule_docs/airflow",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Lineage: [
|
|
|
|
"docs/lineage/intro",
|
|
|
|
"docs/lineage/airflow",
|
|
|
|
"docker/airflow/local_airflow",
|
|
|
|
"docs/lineage/sample_code",
|
2022-01-04 01:41:09 -08:00
|
|
|
"metadata-integration/java/spark-lineage/README",
|
2021-12-07 23:39:59 +05:30
|
|
|
],
|
|
|
|
},
|
2021-12-10 11:02:09 +05:30
|
|
|
{
|
|
|
|
Guides: [
|
|
|
|
"metadata-ingestion/adding-source",
|
|
|
|
"docs/how/add-custom-ingestion-source",
|
|
|
|
"docs/how/add-custom-data-platform",
|
|
|
|
"docs/how/add-user-data",
|
|
|
|
],
|
|
|
|
},
|
2021-08-08 16:40:51 -04:00
|
|
|
],
|
2021-03-05 00:12:12 -08:00
|
|
|
"Metadata Modeling": [
|
2021-06-03 13:24:33 -07:00
|
|
|
"docs/modeling/metadata-model",
|
|
|
|
"docs/modeling/extending-the-metadata-model",
|
2021-03-05 00:12:12 -08:00
|
|
|
// TODO: change the titles of these, removing the "What is..." portion from the sidebar"
|
2021-06-03 13:24:33 -07:00
|
|
|
// "docs/what/entity",
|
|
|
|
// "docs/what/aspect",
|
|
|
|
// "docs/what/urn",
|
|
|
|
// "docs/what/relationship",
|
|
|
|
// "docs/what/search-document",
|
|
|
|
// "docs/what/snapshot",
|
|
|
|
// "docs/what/delta",
|
|
|
|
// "docs/what/mxe",
|
2021-03-05 00:12:12 -08:00
|
|
|
],
|
2021-09-22 17:30:15 -07:00
|
|
|
"GraphQL API": [
|
|
|
|
{
|
|
|
|
label: "Overview",
|
|
|
|
type: "doc",
|
|
|
|
id: "docs/api/graphql/overview",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Reference: [
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Queries",
|
|
|
|
id: "graphql/queries",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Mutations",
|
|
|
|
id: "graphql/mutations",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Objects",
|
|
|
|
id: "graphql/objects",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Inputs",
|
|
|
|
id: "graphql/inputObjects",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Interfaces",
|
|
|
|
id: "graphql/interfaces",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Unions",
|
|
|
|
id: "graphql/unions",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Enums",
|
|
|
|
id: "graphql/enums",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Scalars",
|
|
|
|
id: "graphql/scalars",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Guides: [
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Getting Started",
|
|
|
|
id: "docs/api/graphql/getting-started",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Querying Metadata Entities",
|
|
|
|
id: "docs/api/graphql/querying-entities",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2021-11-24 12:41:07 -08:00
|
|
|
"Usage Guides": ["docs/policies"],
|
2021-03-05 00:12:12 -08:00
|
|
|
"Developer Guides": [
|
|
|
|
// TODO: the titles of these should not be in question form in the sidebar
|
|
|
|
"docs/developers",
|
|
|
|
"docs/docker/development",
|
2021-08-10 19:46:02 -04:00
|
|
|
{
|
|
|
|
type: "doc",
|
|
|
|
label: "Ingesting files from S3",
|
|
|
|
id: "metadata-ingestion/source_docs/s3",
|
|
|
|
},
|
2021-07-28 14:38:13 -07:00
|
|
|
//"metadata-ingestion/examples/transforms/README"
|
2021-06-03 13:24:33 -07:00
|
|
|
//"docs/what/graph",
|
|
|
|
//"docs/what/search-index",
|
|
|
|
//"docs/how/add-new-aspect",
|
|
|
|
//"docs/how/build-metadata-service",
|
|
|
|
//"docs/how/graph-onboarding",
|
|
|
|
//"docs/demo/graph-onboarding",
|
2021-07-02 06:31:01 -07:00
|
|
|
"docs/how/auth/jaas",
|
|
|
|
"docs/how/auth/sso/configure-oidc-react",
|
|
|
|
"docs/how/auth/sso/configure-oidc-react-google",
|
|
|
|
"docs/how/auth/sso/configure-oidc-react-okta",
|
2021-12-21 18:34:56 -08:00
|
|
|
"docs/how/auth/sso/configure-oidc-react-azure",
|
2021-06-30 16:49:02 -07:00
|
|
|
"docs/how/restore-indices",
|
2021-07-29 15:12:30 -07:00
|
|
|
"docs/how/extract-container-logs",
|
2021-07-29 20:04:40 -07:00
|
|
|
"docs/how/delete-metadata",
|
2021-06-18 16:26:39 -07:00
|
|
|
"datahub-web-react/src/app/analytics/README",
|
2021-07-30 17:41:03 -07:00
|
|
|
"metadata-ingestion/developing",
|
2021-11-24 12:41:07 -08:00
|
|
|
{
|
|
|
|
"Module READMEs": [
|
|
|
|
"datahub-web-react/README",
|
|
|
|
"datahub-frontend/README",
|
|
|
|
"datahub-graphql-core/README",
|
|
|
|
"metadata-service/README",
|
|
|
|
// "metadata-jobs/README",
|
|
|
|
"metadata-jobs/mae-consumer-job/README",
|
|
|
|
"metadata-jobs/mce-consumer-job/README",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Advanced: [
|
|
|
|
"docs/advanced/no-code-modeling",
|
2021-12-14 11:18:02 +09:00
|
|
|
"docs/advanced/db-retention",
|
2021-11-24 12:41:07 -08:00
|
|
|
"docs/advanced/aspect-versioning",
|
|
|
|
"docs/advanced/es-7-upgrade",
|
|
|
|
"docs/advanced/high-cardinality",
|
|
|
|
"docs/advanced/no-code-upgrade",
|
|
|
|
"docs/how/migrating-graph-service-implementation",
|
|
|
|
"docs/advanced/mcp-mcl",
|
|
|
|
"docs/advanced/field-path-spec-v2",
|
|
|
|
"docs/advanced/monitoring",
|
|
|
|
// WIP "docs/advanced/backfilling",
|
|
|
|
// WIP "docs/advanced/derived-aspects",
|
|
|
|
// WIP "docs/advanced/entity-hierarchy",
|
|
|
|
// WIP "docs/advanced/partial-update",
|
|
|
|
// WIP "docs/advanced/pdl-best-practices",
|
2021-12-03 21:00:35 +05:30
|
|
|
// WIP "docs/introducing-metadata-service-authentication"
|
|
|
|
// WIP "metadata-models-custom/README"
|
2021-11-24 12:41:07 -08:00
|
|
|
],
|
|
|
|
},
|
2021-03-05 00:12:12 -08:00
|
|
|
],
|
2021-11-24 12:41:07 -08:00
|
|
|
"Deployment Guides": [
|
2021-03-05 00:12:12 -08:00
|
|
|
"docs/how/kafka-config",
|
|
|
|
"docker/README",
|
2021-07-08 19:27:19 -07:00
|
|
|
"docs/deploy/kubernetes",
|
2021-06-03 13:24:33 -07:00
|
|
|
"docker/datahub-upgrade/README",
|
2021-05-26 21:37:37 -07:00
|
|
|
"docs/deploy/aws",
|
2021-06-25 06:39:46 -07:00
|
|
|
"docs/deploy/gcp",
|
2021-08-11 08:52:30 -07:00
|
|
|
"docs/deploy/confluent-cloud",
|
|
|
|
// Purposely not including the following:
|
|
|
|
// - "docker/datahub-frontend/README",
|
|
|
|
// - "docker/datahub-gms/README",
|
|
|
|
// - "docker/datahub-mae-consumer/README",
|
|
|
|
// - "docker/datahub-mce-consumer/README",
|
|
|
|
// - "docker/datahub-ingestion/README",
|
|
|
|
// - "docker/elasticsearch-setup/README",
|
|
|
|
// - "docker/ingestion/README",
|
|
|
|
// - "docker/kafka-setup/README",
|
|
|
|
// - "docker/mariadb/README",
|
|
|
|
// - "docker/mysql/README",
|
|
|
|
// - "docker/neo4j/README",
|
|
|
|
// - "docker/postgres/README",
|
2021-09-07 23:06:15 -07:00
|
|
|
// - "perf-test/README",
|
2021-03-05 00:12:12 -08:00
|
|
|
],
|
|
|
|
Community: [
|
|
|
|
"docs/slack",
|
|
|
|
"docs/links",
|
|
|
|
"docs/townhalls",
|
|
|
|
"docs/townhall-history",
|
|
|
|
"docs/CODE_OF_CONDUCT",
|
|
|
|
"docs/rfc",
|
|
|
|
{
|
2021-03-08 15:39:49 -08:00
|
|
|
RFCs: list_ids_in_directory("docs/rfc/active"),
|
2021-03-05 00:12:12 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|