mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-04-06 20:32:43 +00:00
* [Update] 暂存,优化解决不了问题 * [Update] 待续(小白) * [Update] 修改asset user * [Update] 计划再次更改 * [Update] 修改asset user * [Update] 暂存与喜爱 * [Update] Add id in * [Update] 阶段性完成ops task该做 * [Update] 修改asset user api * [Update] 修改asset user 任务,查看认证等 * [Update] 基本完成asset user改造 * [Update] dynamic user only allow 1 * [Update] 修改asset user task * [Update] 修改node admin user task api * [Update] remove file header license * [Update] 添加sftp root * [Update] 暂存 * [Update] 暂存 * [Update] 修改翻译 * [Update] 修改系统用户改为同名后,用户名改为空 * [Update] 基本完成CAS调研 * [Update] 支持cas server * [Update] 支持cas server * [Update] 添加requirements * [Update] 为方便调试添加mysql ipython到包中 * [Update] 添加huaweiyun翻译 * [Update] 增加下载session 录像 * [Update] 只有第一次通知replay离线的使用方法 * [Update] 暂存一下 * [Bugfix] 获取系统用户信息报错 * [Bugfix] 修改system user info * [Update] 改成清理10天git status * [Update] 修改celery日志保留时间 * [Update]修复部分pip包依赖的版本不兼容问题 (#3672) * [Update] 修复用户更新页面会清空用户public_key的问题 * Fix broken dependencies Co-authored-by: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com> * [Update] 修改获取系统用户auth info * [Update] Remove log * [Bugfix] 修复sftp home设置的bug * [Update] 授权的系统用户添加sftp root * [Update] 修改系统用户关联的用户 * [Update] 修改placeholder * [Update] 优化获取授权的系统用户 * [Update] 修改tasks * [Update] tree service update * [Update] 暂存 * [Update] 基本完成用户授权树和资产树改造 * [Update] Dashbaord perf * [update] Add huawei cloud sdk requirements * [Updte] 优化dashboard页面 * [Update] system user auth info 添加id * [Update] 修改系统用户serializer * [Update] 优化api * [Update] LDAP Test Util (#3720) * [Update] LDAPTestUtil 1 * [Update] LDAPTestUtil 2 * [Update] LDAPTestUtil 3 * [Update] LDAPTestUtil 4 * [Update] LDAPTestUtil 5 * [Update] LDAPTestUtil 6 * [Update] LDAPTestUtil 7 * [Update] session 已添加is success,并且添加display serializer * [Bugfix] 修复无法删除空节点的bug * [Update] 命令记录分组织显示 * [Update] Session is_success 添加迁移文件 * [Update] 批量命令添加org_id * [Update] 修复一些文案,修改不绑定MFA,不能ssh登录 * [Update] 修改replay api, 返回session信息 * [Update] 解决无效es导致访问命令记录页面失败的问题 * [Update] 拆分profile view * [Update] 修改一个翻译 * [Update] 修改aysnc api框架 * [Update] 命令列表添加risk level * [Update] 完成录像打包下载 * [Update] 更改登陆otp页面 * [Update] 修改command 存储redis_level * [Update] 修改翻译 * [Update] 修改系统用户的用户列表字段 * [Update] 使用新logo和统一Jumpserver为JumpServer * [Update] 优化cloud task * [Update] 统一period task * [Update] 统一period form serializer字段 * [Update] 修改period task * [Update] 修改资产网关信息 * [Update] 用户授权资产树资产信息添加domain * [Update] 修改翻译 * [Update] 测试可连接性 * 1.5.7 bai (#3764) * [Update] 修复index页面Bug;修复测试资产用户可连接性问题; * [Update] 修改测试资产用户可连接 * [Bugfix] 修复backends问题 * [Update] 修改marksafe依赖版本 * [Update] 修改测试资产用户可连接性 * [Update] 修改检测服务器性能时获取percent值 * [Update] 更新依赖boto3=1.12.14 Co-authored-by: Yanzhe Lee <lee.yanzhe@yanzhe.org> Co-authored-by: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com> Co-authored-by: Bai <bugatti_it@163.com>
477 lines
20 KiB
HTML
477 lines
20 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
{% block content %}
|
|
<div class="wrapper wrapper-content">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<span class="label label-success pull-right">Users</span>
|
|
<h5>{% trans 'Total users' %}</h5>
|
|
</div>
|
|
<div class="ibox-content">
|
|
<h1 class="no-margins"><a href="{% url 'users:user-list' %}">{{ users_count }}</a></h1>
|
|
<small>All users</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<span class="label label-info pull-right">Hosts</span>
|
|
<h5>{% trans 'Total hosts' %}</h5>
|
|
</div>
|
|
<div class="ibox-content">
|
|
<h1 class="no-margins"><a href="{% url 'assets:asset-list' %}">{{ assets_count }}</a></h1>
|
|
<small>All hosts</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<span class="label label-primary pull-right">Online</span>
|
|
<h5>{% trans 'Online users' %}</h5>
|
|
</div>
|
|
<div class="ibox-content">
|
|
<h1 class="no-margins"><a href="{% url 'terminal:session-online-list' %}"> <span id="online_users"></span>{{ online_user_count }}</a></h1>
|
|
<small>Online users</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<span class="label label-danger pull-right">Connected</span>
|
|
<h5>{% trans 'Online sessions' %}</h5>
|
|
|
|
</div>
|
|
<div class="ibox-content">
|
|
<h1 class="no-margins"><a href="{% url 'terminal:session-online-list' %}"> <span id="online_hosts"></span>{{ online_asset_count }}</a></h1>
|
|
<small>Online sessions</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-2 border-bottom white-bg dashboard-header" style="margin-left:15px;height: 346px">
|
|
<small>{% trans 'In the past week, a total of ' %}<span class="text-info">{{ user_visit_count_weekly }}</span>{% trans ' users have logged in ' %}<span class="text-success">{{ asset_visit_count_weekly }}</span>{% trans ' times asset.' %}</small>
|
|
<ul class="list-group clear-list m-t">
|
|
{% for data in user_visit_count_top_five %}
|
|
<li class="list-group-item fist-item">
|
|
<span class="pull-right">
|
|
{{ data.total }}{% trans ' times/week' %}
|
|
</span>
|
|
<span class="label ">{{ forloop.counter }}</span> {{ data.user }}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div class="col-sm-7" id="top10" style="margin-left: -15px;height: 346px;padding: 15px 0 15px 0;"></div>
|
|
<div class="col-sm-3 white-bg" id="top1" style="margin-left: -15px;height: 346px">
|
|
<div class="statistic-box">
|
|
<h4>
|
|
{% trans 'Active user asset ratio' %}
|
|
</h4>
|
|
<p>
|
|
{% trans 'The following graphs describe the percentage of active users per month and assets per user host per month, respectively.' %}
|
|
</p>
|
|
<div class="row text-center">
|
|
<div class="col-sm-6">
|
|
<div id="activeUser" style="width: 140px; height: 140px;">
|
|
</div>
|
|
<h5>{% trans 'User' %}</h5>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div id="activeAsset" style="width: 140px; height: 140px;"></div>
|
|
<h5>{% trans 'Host' %}</h5>
|
|
</div>
|
|
</div>
|
|
<div class="m-t">
|
|
<small></small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<h5>{% trans 'Top 10 assets in a week' %}</h5>
|
|
<div class="ibox-tools">
|
|
<a class="collapse-link">
|
|
<i class="fa fa-chevron-up"></i>
|
|
</a>
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
<i class="fa fa-wrench"></i>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-user"></ul>
|
|
<a class="close-link">
|
|
<i class="fa fa-times"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="ibox-content ibox-heading">
|
|
<h3><i class="fa fa-inbox"></i>{% trans 'Top 10 assets in a week'%}</h3>
|
|
<small><i class="fa fa-map-marker"></i>{% trans 'Login frequency and last login record.' %}</small>
|
|
</div>
|
|
<div class="ibox-content inspinia-timeline">
|
|
{% if week_asset_hot_ten %}
|
|
{% for data in week_asset_hot_ten %}
|
|
<div class="timeline-item">
|
|
<div class="row">
|
|
<div class="col-xs-5 date ellipsis">
|
|
<i class="fa fa-info-circle"></i>
|
|
<strong data-toggle="tooltip" title="{{ data.asset }}">{{ data.asset }}</strong>
|
|
<br/>
|
|
<small class="text-navy">{{ data.total }}{% trans ' times' %}</small>
|
|
</div>
|
|
<div class="col-xs-7 content no-top-border">
|
|
<p class="m-b-xs">{% trans 'The time last logged in' %}</p>
|
|
<p>{% trans 'At' %} {{ data.last|date:"Y-m-d H:i:s" }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p class="text-center">{% trans '(No)' %}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<h5>{% trans 'Last 10 login' %}</h5>
|
|
<div class="ibox-tools">
|
|
<span class="label label-info-light">10 Messages</span>
|
|
</div>
|
|
</div>
|
|
<div class="ibox-content ibox-heading">
|
|
<h3><i class="fa fa-paper-plane-o"></i> {% trans 'Login record' %}</h3>
|
|
<small><i class="fa fa-map-marker"></i>{% trans 'Last 10 login records.' %}</small>
|
|
</div>
|
|
<div class="ibox-content">
|
|
<div>
|
|
<div class="feed-activity-list">
|
|
{% if last_login_ten %}
|
|
{% for login in last_login_ten %}
|
|
<div class="feed-element">
|
|
<a href="#" class="pull-left">
|
|
<img alt="image" class="img-circle" src="{% static 'img/avatar/user.png' %}">
|
|
</a>
|
|
<div class="media-body ">
|
|
{% ifequal login.is_finished 0 %}
|
|
<small class="pull-right text-navy">{{ login.date_start|timesince }} {% trans 'Before' %}</small>
|
|
{% else %}
|
|
<small class="pull-right">{{ login.date_start|timesince }} {% trans 'Before' %}</small>
|
|
{% endifequal %}
|
|
<strong>{{ login.user }}</strong> {% trans 'Login in ' %}{{ login.asset }} <br>
|
|
<small class="text-muted">{{ login.date_start }}</small>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p class="text-center">{% trans '(No)' %}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox-title">
|
|
<h5>{% trans 'Top 10 users in a week' %}</h5>
|
|
<div class="ibox-tools">
|
|
<a class="collapse-link">
|
|
<i class="fa fa-chevron-up"></i>
|
|
</a>
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
<i class="fa fa-wrench"></i>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-user"></ul>
|
|
<a class="close-link">
|
|
<i class="fa fa-times"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="ibox-content ibox-heading">
|
|
<h3><i class="fa fa-user"></i>{% trans 'Top 10 users in a week' %}</h3>
|
|
<small><i class="fa fa-map-marker"></i>{% trans 'User login frequency and last login record.' %}</small>
|
|
</div>
|
|
<div class="ibox-content inspinia-timeline">
|
|
{% if week_user_hot_ten %}
|
|
{% for data in week_user_hot_ten %}
|
|
<div class="timeline-item">
|
|
<div class="row">
|
|
<div class="col-xs-5 date ellipsis">
|
|
<i class="fa fa-info-circle"></i>
|
|
<strong data-toggle="tooltip" title="{{ data.user }}">{{ data.user }}</strong>
|
|
<br/>
|
|
<small class="text-navy">{{ data.total }}{% trans ' times' %}</small>
|
|
</div>
|
|
<div class="col-xs-7 content no-top-border">
|
|
<p class="m-b-xs">{% trans 'The time last logged in' %}</p>
|
|
<p>{% trans 'At' %} {{ data.last|date:"Y-m-d H:i:s" }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p class="text-center">{% trans '(No)' %}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block custom_foot_js %}
|
|
<script src="{% static 'js/plugins/echarts/echarts.js' %}"></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('#show').click(function(){
|
|
$('#show').css('display', 'none');
|
|
$('#more').css('display', 'block');
|
|
});
|
|
$("[data-toggle='tooltip']").tooltip();
|
|
});
|
|
require.config({
|
|
paths: {
|
|
'echarts': '/static/js/plugins/echarts/chart/',
|
|
'echarts/chart/line': '/static/js/plugins/echarts/chart/line',
|
|
'echarts/chart/pie': '/static/js/plugins/echarts/chart/pie'
|
|
}
|
|
});
|
|
require(
|
|
[
|
|
'echarts',
|
|
'echarts/chart/line'
|
|
],
|
|
function (ec) {
|
|
var top10Chart = ec.init(document.getElementById('top10'));
|
|
var option = {
|
|
title : {
|
|
text: "{% trans 'Monthly data overview' %}",
|
|
subtext: "{% trans 'History summary in one month' %}",
|
|
x: 'center'
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
backgroundColor: '#fff',
|
|
legend: {
|
|
data:["{% trans 'Login count' %}", "{% trans 'Active users' %}", "{% trans 'Active assets' %}"],
|
|
y: 'bottom'
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
magicType : {show: true, type: ['line', 'bar']}
|
|
}
|
|
},
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
boundaryGap : false,
|
|
data : {{ month_str|safe}}
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value'
|
|
}
|
|
],
|
|
series : [
|
|
{
|
|
name: "{% trans 'Login count' %}",
|
|
type:'line',
|
|
smooth: true,
|
|
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
|
data: {{ month_total_visit_count|safe}}
|
|
},
|
|
{
|
|
name: "{% trans 'Active users' %}",
|
|
type: 'line',
|
|
smooth: true,
|
|
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
|
data: {{ month_user|safe }}
|
|
},
|
|
{
|
|
name:"{% trans 'Active assets' %}",
|
|
type:'line',
|
|
smooth:true,
|
|
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
|
data: {{ mouth_asset|safe }}
|
|
}
|
|
]
|
|
};
|
|
top10Chart.setOption(option);
|
|
}
|
|
);
|
|
require(
|
|
[
|
|
'echarts',
|
|
'echarts/chart/pie'
|
|
],
|
|
function (ec) {
|
|
var auChart = ec.init(document.getElementById('activeUser'));
|
|
var option = {
|
|
tooltip : {
|
|
trigger: 'item',
|
|
formatter: "{b} <br> {c} ({d}%)"
|
|
},
|
|
legend: {
|
|
show: false,
|
|
orient : 'vertical',
|
|
x : 'left',
|
|
data:["{% trans 'Monthly active users' %}", "{% trans 'Disable user' %}", "{% trans 'Month not logged in user' %}"]
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
mark : {show: true},
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {
|
|
show: true,
|
|
type: ['pie', 'funnel'],
|
|
option: {
|
|
funnel: {
|
|
x: '25%',
|
|
width: '50%',
|
|
funnelAlign: 'center',
|
|
max: 1548
|
|
}
|
|
}
|
|
},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
calculable : true,
|
|
series : [
|
|
{
|
|
name:"{% trans 'Access to the source' %}",
|
|
type:'pie',
|
|
radius : ['50%', '70%'],
|
|
itemStyle : {
|
|
normal : {
|
|
label : {
|
|
show : false
|
|
},
|
|
labelLine : {
|
|
show : false
|
|
}
|
|
},
|
|
emphasis : {
|
|
label : {
|
|
show : true,
|
|
position : 'center',
|
|
textStyle : {
|
|
fontSize : '5',
|
|
fontWeight : 'bold'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
data:[
|
|
{value:{{ month_user_active }}, name:"{% trans 'Monthly active users' %}"},
|
|
{value:{{ month_user_disabled }}, name:"{% trans 'Disable user' %}"},
|
|
{value:{{ month_user_inactive }}, name:"{% trans 'Month not logged in user' %}"}
|
|
]
|
|
}
|
|
]
|
|
};
|
|
auChart.setOption(option);
|
|
}
|
|
);
|
|
require(
|
|
[
|
|
'echarts',
|
|
'echarts/chart/pie'
|
|
],
|
|
function (ec) {
|
|
var aaChart = ec.init(document.getElementById('activeAsset'));
|
|
var option = {
|
|
tooltip : {
|
|
trigger: 'item',
|
|
formatter: "{b} <br> {c} ({d}%)"
|
|
},
|
|
legend: {
|
|
show: false,
|
|
orient : 'vertical',
|
|
x : 'left',
|
|
data:["{% trans 'Month is logged into the host' %}", "{% trans 'Disable host' %}", "{% trans 'Month not logged on host' %}"]
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
mark : {show: true},
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {
|
|
show: true,
|
|
type: ['pie', 'funnel'],
|
|
option: {
|
|
funnel: {
|
|
x: '25%',
|
|
width: '50%',
|
|
funnelAlign: 'center',
|
|
max: 1548
|
|
}
|
|
}
|
|
},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
calculable : true,
|
|
series : [
|
|
{
|
|
name:"{% trans 'Access to the source' %}",
|
|
type:'pie',
|
|
radius : ['50%', '70%'],
|
|
itemStyle : {
|
|
normal : {
|
|
label : {
|
|
show : false
|
|
},
|
|
labelLine : {
|
|
show : false
|
|
}
|
|
},
|
|
emphasis : {
|
|
label : {
|
|
show : true,
|
|
position : 'center',
|
|
textStyle : {
|
|
fontSize : '5',
|
|
fontWeight : 'bold'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
data:[
|
|
{value:{{ month_asset_active }}, name:"{% trans 'Month is logged into the host' %}"},
|
|
{value:{{ month_asset_disabled }}, name:"{% trans 'Disable host' %}"},
|
|
{value:{{ month_asset_inactive }}, name:"{% trans 'Month not logged on host' %}"}
|
|
]
|
|
}
|
|
]
|
|
};
|
|
aaChart.setOption(option);
|
|
}
|
|
);
|
|
</script>
|
|
|
|
{% endblock %}
|