Skip to content

Commit

Permalink
Merge pull request #872 from wklken/fix_footer_header_0414
Browse files Browse the repository at this point in the history
fix(footer): 2.14.8, fix login/paas footer
  • Loading branch information
wklken authored Apr 14, 2022
2 parents 4ddad51 + 282f5f7 commit 90a1ad4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion paas2/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.14.7
2.14.8
8 changes: 4 additions & 4 deletions paas2/login/components/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@

import logging
import time
import traceback
from functools import partial
from urllib.parse import urlparse

import requests
from django.conf import settings

from common.log import logger
from components.esb import _remove_sensitive_info

logger = logging.getLogger("component")

Expand Down Expand Up @@ -71,7 +70,8 @@ def _http_request(method, url, headers=None, data=None, timeout=None, verify=Fal
else:
return False, {"error": "method not supported"}
except requests.exceptions.RequestException as e:
logger.exception("http request error! %s %s, data: %s, request_id: %s", method, url, data, request_id)
logger.exception("http request error! %s %s, data: %s, request_id: %s",
method, url, _remove_sensitive_info(data), request_id)
return False, {"error": str(e)}
else:
# record for /metrics
Expand All @@ -86,7 +86,7 @@ def _http_request(method, url, headers=None, data=None, timeout=None, verify=Fal
error_msg = (
"http request fail! %s %s, data: %s, request_id: %s, response.status_code: %s, response.body: %s"
)
logger.error(error_msg, method, url, str(data), request_id, resp.status_code, content)
logger.error(error_msg, method, url, str(_remove_sensitive_info(data)), request_id, resp.status_code, content)

return False, {
"error": (
Expand Down
2 changes: 1 addition & 1 deletion paas2/login/templates/account/login_ce.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<span class="qr-box" style="right: -20px;"><img class="qr" src="{{STATIC_URL}}img/logo_ce/qr.png" alt=""></span>
</a>
</p>
<p>Copyright © 2012-{{NOW.year}} Tencent BlueKing. All Rights Reserved. </p>
<p>Copyright © 2012-{{NOW.year}} Tencent BlueKing. All Rights Reserved. V6</p>
<p>{% trans '蓝鲸智云 版权所有' %}</p>
</footer>
</div>
Expand Down
2 changes: 2 additions & 0 deletions paas2/paas/common/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ def site_settings(request):
"BK_APIGW_URL": settings.BK_APIGW_URL,
# API 网关文档中心地址
"BK_APIGW_DOC_URL": settings.BK_APIGW_DOC_URL,
# paas版本号
"PLATFORM_VERSION": settings.PLATFORM_VERSION,
}
3 changes: 2 additions & 1 deletion paas2/paas/conf/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@

STATIC_VERSION = "0.2.1"

PLATFORM_VERSION = "2.0.0"
# NOTE: SHOULD NOT CHANGE THIS LINE, WILL BE REPLACED WITH THE VERSION in pipeline
PLATFORM_VERSION = '2.0.0'

MEDIA_ROOT = os.path.join(PROJECT_ROOT, "media")
MEDIA_URL = "/media/"
Expand Down
6 changes: 1 addition & 5 deletions paas2/paas/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,8 @@
<a href="https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true" class="link">${_(u'技术支持')}</a>
| <a href="https://bk.tencent.com/s-mart/community/" target="_blank" hotrep="hp.footer.feedback" class="link">${_(u'社区论坛')}</a>
| <a href="http://bk.tencent.com/" target="_blank" hotrep="hp.footer.feedback" class="link">${_(u'产品官网')}</a>
| <a href="###" hotrep="hp.footer.feedback" class="link follow-us" style="z-index:101;">
${_(u'关注我们')}
<span class="qr-box"><img class="qr" src="../../../static/img/qr.png" alt=""></span>
</a>

<p>Copyright © 2012-${NOW.year} Tencent BlueKing. All Rights Reserved.</p>
<p>Copyright © 2012-${NOW.year} Tencent BlueKing. All Rights Reserved. ${PLATFORM_VERSION}</p>
<p class="copyright">${_(u'蓝鲸智云 版权所有')}</p>
</li>
</ul>
Expand Down
6 changes: 1 addition & 5 deletions paas2/paas/templates/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,7 @@
<a href="https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true" class="link">${_(u'技术支持')}</a>
| <a href="https://bk.tencent.com/s-mart/community/" target="_blank" hotrep="hp.footer.feedback" class="link">${_(u'社区论坛')}</a>
| <a href="http://bk.tencent.com/" target="_blank" hotrep="hp.footer.feedback" class="link">${_(u'产品官网')}</a>
| <a href="###" hotrep="hp.footer.feedback" class="link follow-us" style="z-index:101;">
${_(u'关注我们')}
<span class="qr-box"><img class="qr" src="../../../static/img/qr.png" alt=""></span>
</a>
<p>Copyright © 2012-${NOW.year}</p>
<p>Copyright © 2012-${NOW.year} Tencent BlueKing. All Rights Reserved. ${PLATFORM_VERSION}</p>
<p>${_(u'蓝鲸智云 版权所有')}</p>
</footer>
<script src="${STATIC_URL}assets/jquery-1.10.2.min.js"></script>
Expand Down
4 changes: 4 additions & 0 deletions paas2/release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Release Log
===============================
# 2.14.8
- update: login remove sensitive info from log
- update: login/paas footer

# 2.14.7
- update: header and footer of pages

Expand Down

0 comments on commit 90a1ad4

Please sign in to comment.