Skip to content

Commit

Permalink
feature: 导航规范 (closed TencentBlueKing#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
CohleRustW committed Apr 26, 2023
1 parent 69b201f commit 088e384
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,7 @@ def mysetting(request):
# TAM前端监控
"TAM_ID": os.getenv("BKAPP_TAM_ID"),
"TAM_URL": os.getenv("BKAPP_TAM_URL"),
# 导航跳转链接
"BKAPP_NAV_OPEN_SOURCE_LINK": os.getenv("BKAPP_NAV_OPEN_SOURCE_LINK"),
"BKAPP_NAV_HELPER_LINK": os.getenv("BKAPP_NAV_HELPER_LINK"),
}
2 changes: 2 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@
BK_IAM_SKIP = False

BK_DOCS_CENTER_HOST = os.getenv("BK_DOCS_CENTER_HOST")
BKAPP_NAV_HELPER_LINK = os.getenv("BKAPP_NAV_HELPER_LINK")
BKAPP_NAV_OPEN_SOURCE_LINK = os.getenv("BKAPP_NAV_OPEN_SOURCE_LINK")

INIT_SUPERUSER = ["admin"]
DEBUG = False
Expand Down
10 changes: 10 additions & 0 deletions env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"BKAPP_OTEL_SAMPLER",
"BKAPP_OTEL_BK_DATA_TOKEN",
"BKAPP_OTEL_GRPC_URL",
"BKAPP_NAV_OPEN_SOURCE_LINK",
"BKAPP_NAV_HELPER_LINK",
"BK_CC_HOST",
"BK_API_URL_TMPL",
"ENVIRONMENT",
Expand Down Expand Up @@ -98,3 +100,11 @@

# APIGW API 地址模板,在 PaaS 3.0 部署的应用,可从环境变量中获取 BK_API_URL_TMPL
BK_API_URL_TMPL = get_type_env(key="BK_API_URL_TMPL", default=BK_COMPONENT_API_URL + "/api/{api_name}", _type=str)

# 导航栏链接地址
BKAPP_NAV_OPEN_SOURCE_LINK = get_type_env(
key="BKAPP_NAV_OPEN_SOURCE_LINK", default="https://bk.tencent.com/s-mart/community/question", _type=str
)
BKAPP_NAV_HELPER_LINK = get_type_env(
key="BKAPP_NAV_HELPER_LINK", default="https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true", _type=str
)
2 changes: 2 additions & 0 deletions support-files/kubernetes/helm/bk-nodeman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ externalRabbitMQ:
| `bkNodemanApiUrl` | 节点管理后台访问地址 | `http://bk-nodeman-backend-api` |
| `bkJobUrl` | 蓝鲸作业平台浏览器访问地址 | `http://job.example.com` |
| `bkCmdbUrl` | 蓝鲸配置平台浏览器访问地址 | `http://cmdb.example.com` |
| `bkOpenSourceUrl` | 蓝鲸开源社区访问地址 | `https://bk.tencent.com/s-mart/community/question` |
| `bkNavHelpUrl` | 蓝鲸技术支持访问地址 | `http://bknavhelper.example.com` |
| `bkIamUrl` | 蓝鲸权限中心 SaaS 地址 | `http://bkiam.example.com` |
| `bkIamApiUrl` | 蓝鲸权限中心后台 API 地址 | `http://bkiam-api.example.com` |
| `bkRepoUrl` | 蓝鲸制品库浏览器访问域名和后台 API http://bkiam-api.example.com 域名同一个 | `http://bkrepo.example.com` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ data:
CONCURRENT_NUMBER: "{{ .Values.config.concurrentNumber }}"

SAAS_API_PORT: "{{ .Values.saas.api.service.port }}"

BKAPP_NAV_OPEN_SOURCE_LINK: "{{ .Values.bkOpenSourceUrl }}"
BKAPP_NAV_HELPER_LINK: "{{ .Values.bkNavHelpUrl }}"

3 changes: 3 additions & 0 deletions support-files/kubernetes/helm/bk-nodeman/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ bkIamApiUrl: "http://bkiam-api.example.com"
## 蓝鲸制品库浏览器访问域名和后台 API http://bkiam-api.example.com 域名同一个
bkRepoUrl: "http://bkrepo.example.com"

## 导航栏链接地址
bkOpenSourceUrl: "https://bk.tencent.com/s-mart/community/question"
bkNavHelpUrl: "http://bknavhelper.example.com"

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

0 comments on commit 088e384

Please sign in to comment.