Skip to content

Commit

Permalink
feat: 文档中心链接规范调整 #7577
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed Oct 8, 2024
1 parent 870328c commit af5de72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcloud/conf/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

APP_HOST = env.BK_SOPS_HOST
ESB_GET_ALL_USER = "{}/api/c/compapi/v2/usermanage/fe_list_users/".format(settings.BK_PAAS_ESB_HOST)
BK_DOC_URL = "{}/markdown/ZH/SOPS/3.33/UserGuide/Overview/README.md".format(env.BK_DOC_CENTER_HOST)
BK_DOC_URL = f"{env.BK_DOC_CENTER_HOST}/markdown/{{}}/SOPS/3.33/UserGuide/Overview/README.md"
FEEDBACK_URL = "https://bk.tencent.com/s-mart/community"
APP_MAKER_UPLOAD_LOGO_USER_UIN = "bk_token"
APP_MAKER_UPLOAD_LOGO_USER_KEY = "bk_token_null"
Expand Down
3 changes: 2 additions & 1 deletion gcloud/core/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_cur_pos_from_url(request):
def mysetting(request):
# 嵌入CICD,隐藏头部
language = request.COOKIES.get("blueking_language", "zh-cn")
doc_lang_mappings = {"zh-cn": "ZH", "en": "EN"}
run_ver_key = "BKAPP_RUN_VER_NAME" if language == "zh-cn" else "BKAPP_RUN_VER_NAME_{}".format(language.upper())
file_manager_type = "BKAPP_FILE_MANAGER_TYPE"
hide_header = int(request.GET.get("hide_header", "0") == "1")
Expand Down Expand Up @@ -117,7 +118,7 @@ def mysetting(request):
"FILE_UPLOAD_ENTRY": env.BKAPP_FILE_UPLOAD_ENTRY,
"MEMBER_SELECTOR_DATA_HOST": settings.BK_MEMBER_SELECTOR_DATA_HOST,
"BK_STATIC_URL": frontend_entry_url,
"BK_DOC_URL": settings.BK_DOC_URL,
"BK_DOC_URL": settings.BK_DOC_URL.format(doc_lang_mappings.get(language, "ZH")),
"FEEDBACK_URL": settings.FEEDBACK_URL,
"FILE_MANAGER_TYPE": EnvironmentVariables.objects.get_var(file_manager_type, env.BKAPP_FILE_MANAGER_TYPE),
"MAX_NODE_EXECUTE_TIMEOUT": settings.MAX_NODE_EXECUTE_TIMEOUT,
Expand Down

0 comments on commit af5de72

Please sign in to comment.