Skip to content

Commit

Permalink
feature: 文档中心跳转路由改造 (closed TencentBlueKing#1975)
Browse files Browse the repository at this point in the history
  • Loading branch information
CohleRustW committed Jan 4, 2024
1 parent 35d1ad1 commit 3505165
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


def get_docs_center_url():
docs_suffix = "markdown/节点管理/产品白皮书/Introduce/Overview.md"
docs_suffix: str = "markdown/NodeMan/UserGuide/Introduce/Overview.md"
if settings.BK_DOCS_CENTER_HOST:
docs_prefix = settings.BK_DOCS_CENTER_HOST
return f"{docs_prefix}/{docs_suffix}"
Expand Down
2 changes: 1 addition & 1 deletion config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
BK_IAM_MIGRATION_APP_NAME = "iam_migrations"
BK_IAM_SKIP = False

BK_DOCS_CENTER_HOST = os.getenv("BK_DOCS_CENTER_HOST")
BK_DOCS_CENTER_HOST = env.BK_DOCS_CENTER_HOST
# 导航栏技术支持地址
BKAPP_NAV_HELPER_URL = env.BKAPP_NAV_HELPER_URL
# 导航栏开源社区地址
Expand Down
4 changes: 4 additions & 0 deletions env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"BKAPP_MONITOR_REPORTER_CHUNK_SIZE",
"BKAPP_NAV_OPEN_SOURCE_URL",
"BKAPP_NAV_HELPER_URL",
"BK_DOCS_CENTER_HOST",
"BK_CC_HOST",
"BK_API_URL_TMPL",
"ENVIRONMENT",
Expand Down Expand Up @@ -172,3 +173,6 @@
BKAPP_NAV_HELPER_URL = get_type_env(
key="BKAPP_NAV_HELPER_URL", default="https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true", _type=str
)
# 文档中心跳转路由

BK_DOCS_CENTER_HOST = get_type_env(key="BK_DOCS_CENTER_HOST", default="", _type=str)
1 change: 1 addition & 0 deletions support-files/kubernetes/helm/bk-nodeman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ externalRabbitMQ:
| `bkIamUrl` | 蓝鲸权限中心 SaaS 地址 | `http://bkiam.example.com` |
| `bkIamApiUrl` | 蓝鲸权限中心后台 API 地址 | `http://bkiam-api.example.com` |
| `bkRepoUrl` | 蓝鲸制品库浏览器访问域名和后台 API http://bkiam-api.example.com 域名同一个 | `http://bkrepo.example.com` |
| `bkDocsCenterHost` | 蓝鲸文档中心跳转链接 | `http://apps.example.com/bk--docs--center/` |


### GSE 证书配置
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,4 @@ data:
BKAPP_NAV_HELPER_URL: "{{ .Values.config.bkAppNavHelperUrl }}"
BKPAAS_BK_DOMAIN: "{{ .Values.global.bkDomain }}"
BKPAAS_BK_CRYPTO_TYPE: "{{ .Values.global.bkCryptoType | default "CLASSIC" }}"
BK_DOCS_CENTER_HOST: "{{ .Values.bkDocsCenterHost }}"
2 changes: 2 additions & 0 deletions support-files/kubernetes/helm/bk-nodeman/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ bkIamApiUrl: "http://bkiam-api.example.com"
## 蓝鲸制品库浏览器访问域名和后台 API http://bkiam-api.example.com 域名同一个
bkRepoUrl: "http://bkrepo.example.com"

# 文档中心跳转链接
bkDocsCenterHost: ""

## --------------------------------------
## GSE 证书
Expand Down

0 comments on commit 3505165

Please sign in to comment.