Skip to content

Commit

Permalink
feature: 统一语言 Cookie (closed #1648)
Browse files Browse the repository at this point in the history
  • Loading branch information
CohleRustW committed Jul 6, 2023
1 parent acf4c0d commit 49aaf87
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
from blueapps.account.conf import ConfFixture
from django.conf import settings
from django.utils.translation import ugettext as _
from version_log.utils import get_latest_version

from apps.node_man import constants
from apps.node_man.handlers.iam import IamHandler
from apps.utils.local import get_request_username
from version_log.utils import get_latest_version

"""
context_processor for common(setting)
Expand Down Expand Up @@ -99,4 +99,6 @@ def mysetting(request):
"BKAPP_NAV_OPEN_SOURCE_URL": settings.BKAPP_NAV_OPEN_SOURCE_URL,
# 导航栏技术支持地址
"BKAPP_NAV_HELPER_URL": settings.BKAPP_NAV_HELPER_URL,
"BK_DOMAIN": settings.BK_DOMAIN,
"BK_COMPONENT_API_OVERWRITE_URL": settings.BK_COMPONENT_API_OVERWRITE_URL,
}
1 change: 1 addition & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
BK_COMPONENT_API_OVERWRITE_URL = env.BK_COMPONENT_API_URL
BK_APIGW_NAME = "bk-nodeman"
BK_API_URL_TMPL = env.BK_API_URL_TMPL
BK_DOMAIN = env.BK_DOMAIN

BK_NODEMAN_HOST = env.BK_NODEMAN_HOST
# 节点管理后台外网域名,用于构造文件导入导出的API URL
Expand Down
2 changes: 2 additions & 0 deletions env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"BKAPP_OTEL_GRPC_URL",
"BKAPP_NAV_OPEN_SOURCE_URL",
"BKAPP_NAV_HELPER_URL",
"BK_DOMAIN",
"BK_CC_HOST",
"BK_API_URL_TMPL",
"ENVIRONMENT",
Expand Down Expand Up @@ -57,6 +58,7 @@
BKAPP_ENABLE_DHCP = get_type_env(key="BKAPP_ENABLE_DHCP", default=False, _type=bool)
# # 是否为后台配置
BK_BACKEND_CONFIG = BK_BACKEND_CONFIG
BK_DOMAIN = get_type_env(key="BK_DOMAIN", _type=str, default=".example.com")

# ===============================================================================
# 日志
Expand Down
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 @@ -345,6 +345,7 @@ externalRabbitMQ:
| `config.concurrentNumber` | 线程最大并发数 | `50` |
| `config.bkAppNavOpenSourceUrl` | 导航栏开源社区地址 | `https://github.com/TencentBlueKing/bk-nodeman` |
| `config.bkAppNavHelperUrl` | 导航栏技术支持地址 | `https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true` | | `50` |
| `config.bkDomain` | 蓝鲸的根域名,cookie会设置在这个配置的域下 | `.example.com` | | |

## 额外的环境变量

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,6 @@ data:

BKAPP_NAV_OPEN_SOURCE_URL: "{{ .Values.config.bkAppNavOpenSourceUrl }}"
BKAPP_NAV_HELPER_URL: "{{ .Values.config.bkAppNavHelperUrl }}"
BK_DOMAIN: "{{ .Values.config.bkDomain }}"
BK_COMPONENT_API_OVERWRITE_URL: "{{ .Values.config.bkComponentApiUrl }}"

1 change: 1 addition & 0 deletions support-files/kubernetes/helm/bk-nodeman/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ config:
bkAppNavOpenSourceUrl: "https://github.com/TencentBlueKing/bk-nodeman"
## 导航栏技术支持地址
bkAppNavHelperUrl: "https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true"
bkDomain: ".example.com"

## 其他
##
Expand Down

0 comments on commit 49aaf87

Please sign in to comment.