Skip to content

Commit

Permalink
Merge pull request #1222 from hanshuaikang/feature/develop_by_han
Browse files Browse the repository at this point in the history
minor: 文档链接允许通过环境变量配置
  • Loading branch information
hanshuaikang authored Oct 26, 2023
2 parents e592408 + 3429b42 commit a8f6bf0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 33 deletions.
1 change: 0 additions & 1 deletion adapter/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@

TITLE = show_module.get_title
FOOTER = show_module.get_footer
DOC_URL = show_module.DOC_URL
LOGIN_URL = show_module.LOGIN_URL
2 changes: 0 additions & 2 deletions adapter/core/sites/ieod/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
from django.utils.translation import gettext_lazy as _
from django.conf import settings

DOC_URL = settings.BK_IEOD_DOC_URL


def get_title():
return "{} | {}".format(_("流程服务"), _("腾讯蓝鲸智云"))
Expand Down
25 changes: 0 additions & 25 deletions adapter/core/sites/open/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,10 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

import os
from django.utils.translation import gettext_lazy as _
from django.conf import settings


def get_doc_url():
from itsm.component.esb.esbclient import client_backend

try:
res = client_backend.doc_center.get_doc_link_by_path(
{"md_path": "流程服务/产品白皮书/产品简介/README.md"}
)
return os.path.join(settings.BK_PAAS_HOST, "o/bk_docs_center/", res)
except Exception as err:
print(err)
return os.path.join(
settings.BK_PAAS_HOST, "o/bk_docs_center/markdown/流程服务/产品白皮书/产品简介/README.md"
)


# if settings.OPEN_VER == "enterprise":
# TITLE = "{} | {}".format(_("流程服务"), _("腾讯蓝鲸智云"))
# DOC_URL = get_doc_url()
# else:

# 企业版非企业版,统一跳到蓝鲸官网去
DOC_URL = "https://bk.tencent.com/docs/markdown/流程服务/产品白皮书/产品简介/README.md"


def get_title():
TITLE = "{} | {}".format(_("流程服务"), _("腾讯蓝鲸智云"))
return TITLE
Expand Down
2 changes: 1 addition & 1 deletion app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author: 蓝鲸智云
category: 办公应用
introduction: 流程服务是蓝鲸推出的轻量级ITSM,通过可自定义设计的流程模块,覆盖IT服务中的不同管理活动或应用场景。帮助企业用户规范内部管理流程,提升沟通及管理效率。
introduction_en: bk_itsm is a lightweight ITSM created by Blueking. It covers different application scenarios in IT services through customizable workflows and help enterprise users to implement standardize IT workflow, improve communication and management efficiency.
version: 2.6.8-alpha.2
version: 2.6.8-alpha.3
language: python
is_use_celery: True
is_use_celery_with_gevent: False
Expand Down
2 changes: 1 addition & 1 deletion app_desc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spec_version: 2
app_version: "2.6.8-alpha.2"
app_version: "2.6.8-alpha.3"
app:
region: default
bk_app_code: bk_itsm
Expand Down
4 changes: 3 additions & 1 deletion config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,9 @@ def my_before_proxy_func(request, json_data, request_headers):
APIGW_PUBLIC_KEY = base64.b64decode(api_public_key)

# show.py 敏感信息处理, 内部白皮书地址,内部登陆地址
BK_IEOD_DOC_URL = os.environ.get("BK_IEOD_DOC_URL", "")
BK_DOC_URL = os.environ.get(
"BK_DOC_URL", "https://bk.tencent.com/docs/markdown/流程服务/产品白皮书/产品简介/README.md"
)
BK_IEOD_LOGIN_URL = os.environ.get("BK_IEOD_LOGIN_URL", "")

# itsm-tapd 网关API地址
Expand Down
4 changes: 2 additions & 2 deletions itsm/sites/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def init(request):
@login_exempt
def index(request):
"""首页"""
from adapter.core import TITLE, DOC_URL, LOGIN_URL
from adapter.core import TITLE, LOGIN_URL

# 如果发现不是woa过来的域名
if (
Expand Down Expand Up @@ -123,7 +123,7 @@ def index(request):
"BK_USER_MANAGE_HOST": BK_USER_MANAGE_HOST,
"BK_PAAS_ESB_HOST": settings.BK_PAAS_ESB_HOST,
"TAM_PROJECT_ID": settings.TAM_PROJECT_ID,
"DOC_URL": DOC_URL,
"DOC_URL": settings.BK_DOC_URL,
"SOPS_URL": settings.SOPS_SITE_URL,
},
)
Expand Down

0 comments on commit a8f6bf0

Please sign in to comment.