feat: 支持备案配置

pull/12201/head
wangruidong 2023-11-23 16:58:58 +08:00 committed by 老广
parent 805c78c0de
commit 64f3509c8c
7 changed files with 69 additions and 16 deletions

View File

@ -12,6 +12,8 @@ default_interface = dict((
('login_title', _('JumpServer Open Source Bastion Host')),
('theme', 'classic_green'),
('theme_info', {}),
('beian_link', ''),
('beian_text', '')
))
default_context = {

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:185acf00dbd3e3ef37e9faf300c438e120f257fc876e72135cecb1234dd5e453
size 166353

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-22 16:43+0800\n"
"POT-Creation-Date: 2023-11-24 10:34+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1574,7 +1574,7 @@ msgstr "ボタンセレクターを確認する"
msgid "API mode"
msgstr "APIモード"
#: assets/const/types.py:224
#: assets/const/types.py:247
msgid "All types"
msgstr "いろんなタイプ"
@ -4728,7 +4728,9 @@ msgstr "{}に送信されたテストメールを確認してください"
#: settings/api/ldap.py:101
msgid ""
"Users are not synchronized, please click the user synchronization button"
msgstr "ユーザーは同期されていません。「ユーザーを同期」ボタンをクリックしてください。"
msgstr ""
"ユーザーは同期されていません。「ユーザーを同期」ボタンをクリックしてくださ"
"い。"
#: settings/api/ldap.py:137
msgid "Get ldap users is None"
@ -8685,7 +8687,15 @@ msgstr "ログアウトページのロゴ"
msgid "Theme"
msgstr "テーマ"
#: xpack/plugins/interface/models.py:44 xpack/plugins/interface/models.py:85
#: xpack/plugins/interface/models.py:42
msgid "Beian link"
msgstr "公安オンライン申告ジャンプリンク"
#: xpack/plugins/interface/models.py:43
msgid "Beian text"
msgstr "公安網登録番号"
#: xpack/plugins/interface/models.py:46 xpack/plugins/interface/models.py:87
msgid "Interface setting"
msgstr "インターフェイスの設定"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e4af35b685fe0eb73e4dd9790669164bb823065d994a24f5441c9cff7a6e99e7
size 135811

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-22 16:42+0800\n"
"POT-Creation-Date: 2023-11-24 10:34+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -1565,7 +1565,7 @@ msgstr "确认按钮选择器"
msgid "API mode"
msgstr "API 模式"
#: assets/const/types.py:224
#: assets/const/types.py:247
msgid "All types"
msgstr "所有类型"
@ -8567,7 +8567,15 @@ msgstr "退出页面logo"
msgid "Theme"
msgstr "主题"
#: xpack/plugins/interface/models.py:44 xpack/plugins/interface/models.py:85
#: xpack/plugins/interface/models.py:42
msgid "Beian link"
msgstr "公安联网备案跳转链接"
#: xpack/plugins/interface/models.py:43
msgid "Beian text"
msgstr "公安联网备案号"
#: xpack/plugins/interface/models.py:46 xpack/plugins/interface/models.py:87
msgid "Interface setting"
msgstr "界面设置"

BIN
apps/static/img/beian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -10,13 +10,40 @@
<script src="{% static 'js/plugins/select2/select2.full.min.js' %}"></script>
<script src="{% static 'js/plugins/select2/i18n/zh-CN.js' %}"></script>
<script>
activeNav("{{ FORCE_SCRIPT_NAME }}");
$(document).ready(function(){
setAjaxCSRFToken();
$('textarea').attr('rows', 5);
if ($('.tooltip')[0]) {
$('.tooltip').tooltip();
}
$.fn.select2.defaults.set('language', getUserLang())
});
activeNav("{{ FORCE_SCRIPT_NAME }}");
$(document).ready(function () {
setAjaxCSRFToken();
$('textarea').attr('rows', 5);
if ($('.tooltip')[0]) {
$('.tooltip').tooltip();
}
$.fn.select2.defaults.set('language', getUserLang())
});
</script>
{% if INTERFACE.beian_text %}
<style>
.footer_beian a {
color: #737373;
}
.footer_beian {
position: absolute;
top: 97%;
left: 50%;
transform: translate(-50%, -50%);
}
.footer_beian img {
width: 16px;
height: 16px;
object-fit: contain;
}
</style>
<div class="footer_beian">
<img alt="beian" src="{% static "img/beian.png" %}"/>
<a target="_blank" rel="noopener noreferrer"
href={{ INTERFACE.gongan_link }}>
{{ INTERFACE.beian_text }}
</a>
</div>
{% endif %}