Browse Source

[Update] Message可以关闭

pull/3454/head
ibuler 5 years ago
parent
commit
611d5fc1fa
  1. 4
      apps/applications/templates/applications/remote_app_list.html
  2. 2
      apps/assets/templates/assets/admin_user_list.html
  3. 10
      apps/assets/templates/assets/asset_list.html
  4. 2
      apps/assets/templates/assets/cmd_filter_list.html
  5. 4
      apps/assets/templates/assets/domain_list.html
  6. 2
      apps/assets/templates/assets/system_user_list.html
  7. 6
      apps/static/css/style.css
  8. 26
      apps/templates/base.html

4
apps/applications/templates/applications/remote_app_list.html

@ -1,10 +1,8 @@
{% extends '_base_list.html' %}
{% load i18n static %}
{% block help_message %}
<div class="alert alert-info help-message">
{% trans 'Before using this feature, make sure that the application loader has been uploaded to the application server and successfully published as a RemoteApp application' %}
<b><a href="https://github.com/jumpserver/Jmservisor/releases" target="view_window" >{% trans 'Download application loader' %}</a></b>
</div>
{% endblock %}
{% block table_search %}{% endblock %}
{% block table_container %}
@ -84,4 +82,4 @@ $(document).ready(function(){
}, 3000);
});
</script>
{% endblock %}
{% endblock %}

2
apps/assets/templates/assets/admin_user_list.html

@ -1,10 +1,8 @@
{% extends '_base_list.html' %}
{% load i18n static %}
{% block help_message %}
<div class="alert alert-info help-message">
{% trans 'Admin users are asset (charged server) on the root, or have NOPASSWD: ALL sudo permissions users, '%}
{% trans 'Jumpserver users of the system using the user to `push system user`, `get assets hardware information`, etc. '%}
</div>
{% endblock %}
{% block table_search %}
<div class="" style="float: right">

10
apps/assets/templates/assets/asset_list.html

@ -3,16 +3,16 @@
{% load i18n %}
{% block help_message %}
<div class="alert alert-info help-message">
{# <div class="alert alert-info help-message">#}
{# <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>#}
{# 左侧是资产树,右击可以新建、删除、更改树节点,授权资产也是以节点方式组织的,右侧是属于该节点下的资产#}
{% trans 'The left side is the asset tree, right click to create, delete, and change the tree node, authorization asset is also organized as a node, and the right side is the asset under that node' %}
</div>
{# </div>#}
{% endblock %}
{% block custom_head_css_js %}
<link href="{% static 'css/plugins/ztree/awesomeStyle/awesome.css' %}" rel="stylesheet">
{# <link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">#}
<script type="text/javascript" src="{% static 'js/plugins/ztree/jquery.ztree.all.min.js' %}"></script>
{# <link href="{% static 'css/plugins/ztree/awesomeStyle/awesome.css' %}" rel="stylesheet">#}
{# <script type="text/javascript" src="{% static 'js/plugins/ztree/jquery.ztree.all.min.js' %}"></script>#}
<script src="{% static 'js/jquery.form.min.js' %}"></script>
<style type="text/css">
div#rMenu {

2
apps/assets/templates/assets/cmd_filter_list.html

@ -2,14 +2,12 @@
{% load i18n static %}
{% block table_search %}{% endblock %}
{% block help_message %}
<div class="alert alert-info help-message">
{% trans 'System user bound some command filter, each command filter has some rules,'%}
{% trans 'When user login asset with this system user, then run a command,' %}
{% trans 'The command will be filter by rules, higher priority rule run first,' %}
{% trans 'When a rule matched, if rule action is allow, then allow command execute,' %}
{% trans 'else if action is deny, then command with be deny,' %}
{% trans 'else match next rule, if none matched, allowed' %}
</div>
{% endblock %}
{% block table_container %}
<div class="uc pull-left m-r-5">

4
apps/assets/templates/assets/domain_list.html

@ -3,13 +3,9 @@
{% block table_search %}{% endblock %}
{% block help_message %}
<div class="alert alert-info help-message">
{# 网域功能是为了解决部分环境(如:混合云)无法直接连接而新增的功能,原理是通过网关服务器进行跳转登录。<br>#}
{# JMS => 网域网关 => 目标资产#}
{% trans 'The domain function is added to address the fact that some environments (such as the hybrid cloud) cannot be connected directly by jumping on the gateway server.' %}
<br>
{% trans 'JMS => Domain gateway => Target assets' %}
</div>
{% endblock %}
{% block table_container %}

2
apps/assets/templates/assets/system_user_list.html

@ -2,11 +2,9 @@
{% load i18n %}
{% block help_message %}
<div class="alert alert-info help-message">
{% trans 'System user is Jumpserver jump login assets used by the users, can be understood as the user login assets, such as web, sa, the dba (` ssh web@some-host `), rather than using a user the username login server jump (` ssh xiaoming@some-host `); '%}
{% trans 'In simple terms, users log into Jumpserver using their own username, and Jumpserver uses system users to log into assets. '%}
{% trans 'When system users are created, if you choose auto push Jumpserver to use Ansible push system users into the asset, if the asset (Switch) does not support ansible, please manually fill in the account password.' %}
</div>
{% endblock %}
{% block table_search %}

6
apps/static/css/style.css

@ -1588,9 +1588,9 @@ table.dataTable thead .sorting_desc_disabled {
/*.dataTables_length {*/
/*float: left;*/
/*}*/
.dataTables_filter label {
margin-right: 5px;
}
/*.dataTables_filter label {*/
/* margin-right: 5px;*/
/*}*/
.html5buttons {
float: right;
}

26
apps/templates/base.html

@ -11,13 +11,16 @@
<link href="{% static 'css/jumpserver.css' %}" rel="stylesheet">
{% block custom_head_css_js %} {% endblock %}
</head>
<body>
<div id="wrapper">
{% include '_left_side_bar.html' %}
<div id="page-wrapper" class="gray-bg">
{% include '_header_bar.html' %}
{% block help_message %} {% endblock %}
<div class="alert alert-info help-message alert-dismissable page-message" style="display: none">
<button aria-hidden="true" data-dismiss="alert" class="close hide-btn" type="button">×</button>
{% block help_message %}
{% endblock %}
</div>
{% include '_message.html' %}
{% block content %}{% endblock %}
{% include '_footer.html' %}
@ -27,4 +30,23 @@
</body>
{% include '_foot_js.html' %}
{% block custom_foot_js %} {% endblock %}
<script>
function getMessagePathKey() {
var path = window.location.pathname;
var key = 'message_' + btoa(path);
return key
}
$(document).ready(function () {
var pathKey = getMessagePathKey();
var hidden = window.localStorage.getItem(pathKey);
var hasMessage = $('.page-message').text().trim().length > 5;
if (!hidden && hasMessage) {
$(".help-message").show();
}
}).on('click', '.hide-btn', function () {
var pathKey = getMessagePathKey();
window.localStorage.setItem(pathKey, '1')
})
</script>
</html>

Loading…
Cancel
Save