Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
f7ab1395
Commit
f7ab1395
authored
Mar 02, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复bug,修改celery beat版本依赖
parent
5dcdeddf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
6 deletions
+34
-6
_system_user.html
apps/assets/templates/assets/_system_user.html
+22
-0
django.mo
apps/i18n/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/i18n/zh/LC_MESSAGES/django.po
+0
-0
views.py
apps/jumpserver/views.py
+2
-1
serializers.py
apps/perms/serializers.py
+1
-1
_header_bar.html
apps/templates/_header_bar.html
+6
-1
index.html
apps/templates/index.html
+1
-1
requirements.txt
requirements/requirements.txt
+2
-2
No files found.
apps/assets/templates/assets/_system_user.html
View file @
f7ab1395
...
...
@@ -81,6 +81,14 @@
{% block custom_foot_js %}
<script>
var
auto_generate_key
=
'#'
+
'{{ form.auto_generate_key.id_for_label }}'
;
var
protocol_id
=
'#'
+
'{{ form.protocol.id_for_label }}'
;
var
password_id
=
'#'
+
'{{ form.password.id_for_label }}'
;
var
private_key_id
=
'#'
+
'{{ form.private_key_file.id_for_label }}'
;
var
sudo_id
=
'#'
+
'{{ form.sudo.id_for_label }}'
;
var
shell_id
=
'#'
+
'{{ form.shell.id_for_label }}'
;
var
need_change_field
=
[
auto_generate_key
,
private_key_id
,
sudo_id
,
shell_id
]
;
function
authFieldsDisplay
()
{
if
(
$
(
auto_generate_key
).
prop
(
'checked'
))
{
$
(
'.auth-fields'
).
addClass
(
'hidden'
);
...
...
@@ -88,9 +96,23 @@
$
(
'.auth-fields'
).
removeClass
(
'hidden'
);
}
}
function
protocolChange
()
{
if
(
$
(
protocol_id
).
attr
(
'value'
)
===
'rdp'
)
{
$
.
each
(
need_change_field
,
function
(
index
,
value
)
{
$
(
value
).
addClass
(
'hidden'
)
});
$
(
password_id
).
removeClass
(
'hidden'
)
}
else
{
$
.
each
(
need_change_field
,
function
(
index
,
value
)
{
$
(
value
).
removeClass
(
'hidden'
)
});
}
}
$
(
document
).
ready
(
function
()
{
$
(
'.select2'
).
select2
();
authFieldsDisplay
();
protocolChange
();
$
(
auto_generate_key
).
change
(
function
()
{
authFieldsDisplay
();
});
...
...
apps/i18n/zh/LC_MESSAGES/django.mo
View file @
f7ab1395
No preview for this file type
apps/i18n/zh/LC_MESSAGES/django.po
View file @
f7ab1395
This diff is collapsed.
Click to expand it.
apps/jumpserver/views.py
View file @
f7ab1395
...
...
@@ -45,7 +45,8 @@ class IndexView(LoginRequiredMixin, TemplateView):
return
self
.
session_week
.
values
(
'user'
)
.
distinct
()
.
count
()
def
get_week_login_asset_count
(
self
):
return
self
.
session_week
.
values
(
'asset'
)
.
distinct
()
.
count
()
return
self
.
session_week
.
count
()
# return self.session_week.values('asset').distinct().count()
def
get_month_day_metrics
(
self
):
month_str
=
[
d
.
strftime
(
'
%
m-
%
d'
)
for
d
in
self
.
session_month_dates
]
or
[
'0'
]
...
...
apps/perms/serializers.py
View file @
f7ab1395
...
...
@@ -12,7 +12,7 @@ class AssetPermissionCreateUpdateSerializer(serializers.ModelSerializer):
class
Meta
:
model
=
NodePermission
fields
=
[
'node'
,
'user_group'
,
'system_user'
,
'
id'
,
'
node'
,
'user_group'
,
'system_user'
,
'is_active'
,
'date_expired'
]
...
...
apps/templates/_header_bar.html
View file @
f7ab1395
...
...
@@ -15,7 +15,12 @@
{#
</li>
#}
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle count-info"
data-toggle=
"dropdown"
href=
"#"
>
<span
class=
"m-r-sm text-muted welcome-message"
>
{% trans 'Help' %}
</span>
<span
class=
"m-r-sm text-muted welcome-message"
>
{% trans 'Supports' %}
</span>
</a>
</li>
<li
class=
"dropdown"
>
<a
class=
"count-info"
href=
"http://jumpserver.readthedocs.io/zh/docs/_build/html/"
>
<span
class=
"m-r-sm text-muted welcome-message"
>
{% trans 'Docs' %}
</span>
</a>
</li>
<li
class=
"dropdown"
>
...
...
apps/templates/index.html
View file @
f7ab1395
...
...
@@ -57,7 +57,7 @@
<div
class=
"row"
>
<div
class=
"col-sm-2 border-bottom white-bg dashboard-header"
style=
"margin-left:15px;height: 346px"
>
<h2>
活跃用户TOP5
</h2>
<small>
过去一周共有
<span
class=
"text-info"
>
{{ user_visit_count_weekly }}
</span>
位用户登录
<span
class=
"text-success"
>
{{ asset_visit_count_weekly }}
</span>
次
服务器
.
</small>
<small>
过去一周共有
<span
class=
"text-info"
>
{{ user_visit_count_weekly }}
</span>
位用户登录
<span
class=
"text-success"
>
{{ asset_visit_count_weekly }}
</span>
次
资产
.
</small>
<ul
class=
"list-group clear-list m-t"
>
{% for data in user_visit_count_top_five %}
<li
class=
"list-group-item fist-item"
>
...
...
requirements/requirements.txt
View file @
f7ab1395
...
...
@@ -56,8 +56,8 @@ uritemplate==3.0.0
urllib3==1.22
vine==1.1.4
gunicorn==19.7.1
https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat
#django_celery_beat==1.1.0
#
https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat
django_celery_beat==1.1.1
ephem==3.7.6.0
python-gssapi==0.6.4
jms-es-sdk
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment