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 27, 2023
1 parent 69b201f commit 98ede78
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 3 deletions.
4 changes: 4 additions & 0 deletions common/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,8 @@ def mysetting(request):
# TAM前端监控
"TAM_ID": os.getenv("BKAPP_TAM_ID"),
"TAM_URL": os.getenv("BKAPP_TAM_URL"),
# 导航栏开源社区地址
"BKAPP_NAV_OPEN_SOURCE_URL": os.getenv("BKAPP_NAV_OPEN_SOURCE_URL"),
# 导航栏技术支持地址
"BKAPP_NAV_HELPER_URL": os.getenv("BKAPP_NAV_HELPER_URL"),
}
4 changes: 4 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
BK_IAM_SKIP = False

BK_DOCS_CENTER_HOST = os.getenv("BK_DOCS_CENTER_HOST")
# 导航栏技术支持地址
BKAPP_NAV_HELPER_URL = env.BKAPP_NAV_HELPER_URL
# 导航栏开源社区地址
BKAPP_NAV_OPEN_SOURCE_URL = env.BKAPP_NAV_OPEN_SOURCE_URL

INIT_SUPERUSER = ["admin"]
DEBUG = False
Expand Down
11 changes: 11 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_URL",
"BKAPP_NAV_HELPER_URL",
"BK_CC_HOST",
"BK_API_URL_TMPL",
"ENVIRONMENT",
Expand Down Expand Up @@ -98,3 +100,12 @@

# 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_URL = get_type_env(
key="BKAPP_NAV_OPEN_SOURCE_URL", default="https://bk.tencent.com/s-mart/community/question", _type=str
)
# 导航栏技术支持地址
BKAPP_NAV_HELPER_URL = get_type_env(
key="BKAPP_NAV_HELPER_URL", default="https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true", _type=str
)
6 changes: 5 additions & 1 deletion frontend/index-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
const LOGIN_URL = ''
const VERSION = ''
const CMDB_URL = ''
const BKAPP_NAV_OPEN_SOURCE_URL = ''
const BKAPP_NAV_HELPER_URL = ''

return {
SITE_URL: SITE_URL,
Expand Down Expand Up @@ -66,7 +68,9 @@
TAM_ID,
LOGIN_URL,
VERSION,
CMDB_URL
CMDB_URL,
BKAPP_NAV_OPEN_SOURCE_URL,
BKAPP_NAV_HELPER_URL
}
})()
window.$DHCP = window.PROJECT_CONFIG.BKAPP_ENABLE_DHCP === 'True'
Expand Down
6 changes: 5 additions & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
const LOGIN_URL = '{{ LOGIN_URL }}'
const VERSION = '{{ VERSION }}'
const CMDB_URL = '{{ CMDB_URL }}'
const BKAPP_NAV_OPEN_SOURCE_URL = '{{ BKAPP_NAV_OPEN_SOURCE_URL }}'
const BKAPP_NAV_HELPER_URL = '{{ BKAPP_NAV_HELPER_URL }}'

return {
SITE_URL: SITE_URL,
Expand Down Expand Up @@ -70,7 +72,9 @@
TAM_ID,
LOGIN_URL,
VERSION,
CMDB_URL
CMDB_URL,
BKAPP_NAV_OPEN_SOURCE_URL,
BKAPP_NAV_HELPER_URL
}
})()
window.$DHCP = window.PROJECT_CONFIG.BKAPP_ENABLE_DHCP === 'True'
Expand Down
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` |
| `bkAppNavOpenSourceUrl` | 蓝鲸开源社区访问地址 | `https://bk.tencent.com/s-mart/community/question` |
| `bkAppNavHelperUrl` | 蓝鲸技术支持访问地址 | `https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true` |
| `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_URL: "{{ .Values.config.bkAppNavOpenSourceUrl }}"
BKAPP_NAV_HELPER_URL: "{{ .Values.config.bkAppNavHelperUrl }}"

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


## --------------------------------------
## GSE 证书
## --------------------------------------
Expand Down Expand Up @@ -415,6 +414,11 @@ config:
bkAppOtelBkDataToken: ""
bkAppOtelGrpcUrl: ""

## 导航栏开源社区地址
bkAppNavOpenSourceUrl: "https://bk.tencent.com/s-mart/community/question"
## 导航栏技术支持地址
bkAppNavHelperUrl: "https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true"

## 其他
##
## 线程最大并发数
Expand Down

0 comments on commit 98ede78

Please sign in to comment.