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
a242bdd3
Unverified
Commit
a242bdd3
authored
Jul 18, 2019
by
BaiJiangJie
Committed by
GitHub
Jul 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2983 from jumpserver/dev
Dev
parents
1b220326
97bc3d5e
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
83 additions
and
60 deletions
+83
-60
domain.py
apps/assets/models/domain.py
+2
-1
cmd_filter.py
apps/assets/serializers/cmd_filter.py
+9
-9
admin_user_list.html
apps/assets/templates/assets/admin_user_list.html
+1
-1
cmd_filter_list.html
apps/assets/templates/assets/cmd_filter_list.html
+2
-2
cmd_filter_rule_list.html
apps/assets/templates/assets/cmd_filter_rule_list.html
+2
-2
domain_detail.html
apps/assets/templates/assets/domain_detail.html
+1
-1
domain_gateway_list.html
apps/assets/templates/assets/domain_gateway_list.html
+1
-1
domain_list.html
apps/assets/templates/assets/domain_list.html
+2
-2
label_list.html
apps/assets/templates/assets/label_list.html
+1
-1
ftp_log_list.html
apps/audits/templates/audits/ftp_log_list.html
+2
-1
task_adhoc.html
apps/ops/templates/ops/task_adhoc.html
+2
-2
task_history.html
apps/ops/templates/ops/task_history.html
+2
-2
task_list.html
apps/ops/templates/ops/task_list.html
+7
-1
mixin.py
apps/perms/api/mixin.py
+15
-1
user_permission.py
apps/perms/api/user_permission.py
+1
-0
asset_permission_asset.html
apps/perms/templates/perms/asset_permission_asset.html
+4
-4
asset_permission_detail.html
apps/perms/templates/perms/asset_permission_detail.html
+4
-4
asset_permission_list.html
apps/perms/templates/perms/asset_permission_list.html
+3
-3
asset_permission_user.html
apps/perms/templates/perms/asset_permission_user.html
+4
-4
remote_app_permission_detail.html
apps/perms/templates/perms/remote_app_permission_detail.html
+2
-2
remote_app_permission_remote_app.html
...rms/templates/perms/remote_app_permission_remote_app.html
+2
-2
remote_app_permission_user.html
apps/perms/templates/perms/remote_app_permission_user.html
+2
-2
jumpserver.js
apps/static/js/jumpserver.js
+2
-2
command_list.html
apps/terminal/templates/terminal/command_list.html
+2
-2
session_list.html
apps/terminal/templates/terminal/session_list.html
+5
-5
terminal_list.html
apps/terminal/templates/terminal/terminal_list.html
+1
-1
user_group_list.html
apps/users/templates/users/user_group_list.html
+2
-2
No files found.
apps/assets/models/domain.py
View file @
a242bdd3
...
@@ -75,7 +75,8 @@ class Gateway(AssetUser):
...
@@ -75,7 +75,8 @@ class Gateway(AssetUser):
pkey
=
self
.
private_key_obj
)
pkey
=
self
.
private_key_obj
)
except
(
paramiko
.
AuthenticationException
,
except
(
paramiko
.
AuthenticationException
,
paramiko
.
BadAuthenticationType
,
paramiko
.
BadAuthenticationType
,
paramiko
.
SSHException
)
as
e
:
paramiko
.
SSHException
,
paramiko
.
ssh_exception
.
NoValidConnectionsError
)
as
e
:
return
False
,
str
(
e
)
return
False
,
str
(
e
)
try
:
try
:
...
...
apps/assets/serializers/cmd_filter.py
View file @
a242bdd3
...
@@ -35,12 +35,12 @@ class CommandFilterRuleSerializer(BulkOrgResourceModelSerializer):
...
@@ -35,12 +35,12 @@ class CommandFilterRuleSerializer(BulkOrgResourceModelSerializer):
fields
=
'__all__'
fields
=
'__all__'
list_serializer_class
=
AdaptedBulkListSerializer
list_serializer_class
=
AdaptedBulkListSerializer
def
validate_content
(
self
,
content
):
#
def validate_content(self, content):
tp
=
self
.
initial_data
.
get
(
"type"
)
#
tp = self.initial_data.get("type")
if
tp
==
CommandFilterRule
.
TYPE_REGEX
:
#
if tp == CommandFilterRule.TYPE_REGEX:
return
content
#
return content
if
self
.
invalid_pattern
.
search
(
content
):
#
if self.invalid_pattern.search(content):
invalid_char
=
self
.
invalid_pattern
.
pattern
.
replace
(
'
\\
'
,
''
)
#
invalid_char = self.invalid_pattern.pattern.replace('\\', '')
msg
=
_
(
"Content should not be contain: {}"
)
.
format
(
invalid_char
)
#
msg = _("Content should not be contain: {}").format(invalid_char)
raise
serializers
.
ValidationError
(
msg
)
#
raise serializers.ValidationError(msg)
return
content
#
return content
apps/assets/templates/assets/admin_user_list.html
View file @
a242bdd3
...
@@ -117,7 +117,7 @@ function initTable() {
...
@@ -117,7 +117,7 @@ function initTable() {
columns
:
[
columns
:
[
{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"username"
},
{
data
:
"assets_amount"
,
orderable
:
false
},
{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"username"
},
{
data
:
"assets_amount"
,
orderable
:
false
},
{
#
{
data
:
"connectivity_amount"
},
{
data
:
"connectivity_amount"
},
{
data
:
"connectivity_amount"
},
#
}
{
#
{
data
:
"connectivity_amount"
},
{
data
:
"connectivity_amount"
},
{
data
:
"connectivity_amount"
},
#
}
{
data
:
"comment"
},
{
data
:
"id"
}
{
data
:
"comment"
},
{
data
:
"id"
,
orderable
:
false
}
]
]
};
};
admin_user_table
=
jumpserver
.
initServerSideDataTable
(
options
);
admin_user_table
=
jumpserver
.
initServerSideDataTable
(
options
);
...
...
apps/assets/templates/assets/cmd_filter_list.html
View file @
a242bdd3
...
@@ -62,8 +62,8 @@ function initTable() {
...
@@ -62,8 +62,8 @@ function initTable() {
],
],
ajax_url
:
'{% url "api-assets:cmd-filter-list" %}'
,
ajax_url
:
'{% url "api-assets:cmd-filter-list" %}'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"rules"
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"rules"
,
orderable
:
false
},
{
data
:
"system_users"
},
{
data
:
"comment"
},
{
data
:
"id"
}
{
data
:
"system_users"
,
orderable
:
false
},
{
data
:
"comment"
},
{
data
:
"id"
,
orderable
:
false
}
],
],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
apps/assets/templates/assets/cmd_filter_rule_list.html
View file @
a242bdd3
...
@@ -90,8 +90,8 @@ function initTable() {
...
@@ -90,8 +90,8 @@ function initTable() {
],
],
ajax_url
:
'{% url "api-assets:cmd-filter-rule-list" filter_pk=object.id %}'
,
ajax_url
:
'{% url "api-assets:cmd-filter-rule-list" filter_pk=object.id %}'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"type.display"
},
{
data
:
'content'
},
{
data
:
'priority'
},
{
data
:
"id"
},
{
data
:
"type.display"
,
orderable
:
false
},
{
data
:
'content'
},
{
data
:
'priority'
},
{
data
:
'action.display'
},
{
data
:
"comment"
},
{
data
:
"id"
}
{
data
:
'action.display'
,
orderable
:
false
},
{
data
:
"comment"
},
{
data
:
"id"
,
orderable
:
false
}
],
],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
apps/assets/templates/assets/domain_detail.html
View file @
a242bdd3
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
9
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
class=
"label"
><b>
{{ object.name }}
</b></span>
<span
class=
"label"
><b>
{{ object.name }}
</b></span>
...
...
apps/assets/templates/assets/domain_gateway_list.html
View file @
a242bdd3
...
@@ -106,7 +106,7 @@ function initTable() {
...
@@ -106,7 +106,7 @@ function initTable() {
ajax_url
:
'{% url "api-assets:gateway-list" %}?domain={{ object.id }}'
,
ajax_url
:
'{% url "api-assets:gateway-list" %}?domain={{ object.id }}'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
'ip'
},
{
data
:
'port'
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
'ip'
},
{
data
:
'port'
},
{
data
:
"protocol"
},
{
data
:
"username"
},
{
data
:
"comment"
},
{
data
:
"id"
}
{
data
:
"protocol"
,
orderable
:
false
},
{
data
:
"username"
},
{
data
:
"comment"
},
{
data
:
"id"
,
orderable
:
false
}
],
],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
apps/assets/templates/assets/domain_list.html
View file @
a242bdd3
...
@@ -58,8 +58,8 @@ function initTable() {
...
@@ -58,8 +58,8 @@ function initTable() {
],
],
ajax_url
:
'{% url "api-assets:domain-list" %}'
,
ajax_url
:
'{% url "api-assets:domain-list" %}'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"asset_count"
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"asset_count"
,
orderable
:
false
},
{
data
:
"gateway_count"
},
{
data
:
"comment"
},
{
data
:
"id"
}
{
data
:
"gateway_count"
,
orderable
:
false
},
{
data
:
"comment"
},
{
data
:
"id"
,
orderable
:
false
}
],
],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
apps/assets/templates/assets/label_list.html
View file @
a242bdd3
...
@@ -44,7 +44,7 @@ function initTable() {
...
@@ -44,7 +44,7 @@ function initTable() {
ajax_url
:
'{% url "api-assets:label-list" %}?sort=name'
,
ajax_url
:
'{% url "api-assets:label-list" %}?sort=name'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"value"
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"value"
},
{
data
:
"asset_count"
},
{
data
:
"id"
}
{
data
:
"asset_count"
,
orderable
:
false
},
{
data
:
"id"
,
orderable
:
false
}
],
],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
apps/audits/templates/audits/ftp_log_list.html
View file @
a242bdd3
...
@@ -113,7 +113,8 @@
...
@@ -113,7 +113,8 @@
"searching"
:
false
,
"searching"
:
false
,
"paging"
:
false
,
"paging"
:
false
,
"bInfo"
:
false
,
"bInfo"
:
false
,
"order"
:
[]
"order"
:
[],
"columnDefs"
:
[{
"targets"
:
6
,
"orderable"
:
false
}]
});
});
$
(
'.select2'
).
select2
({
$
(
'.select2'
).
select2
({
dropdownAutoWidth
:
true
,
dropdownAutoWidth
:
true
,
...
...
apps/ops/templates/ops/task_adhoc.html
View file @
a242bdd3
...
@@ -120,8 +120,8 @@ $(document).ready(function () {
...
@@ -120,8 +120,8 @@ $(document).ready(function () {
}}
}}
],
],
ajax_url
:
'{% url "api-ops:adhoc-list" %}?task={{ object.pk }}'
,
ajax_url
:
'{% url "api-ops:adhoc-list" %}?task={{ object.pk }}'
,
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"short_id"
},
{
data
:
"hosts"
},
{
data
:
"pattern"
},
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"short_id"
},
{
data
:
"hosts"
,
orderable
:
false
},
{
data
:
"pattern"
,
orderable
:
false
},
{
data
:
"run_as"
},
{
data
:
"become"
},
{
data
:
"date_created"
},
{
data
:
"id"
}]
{
data
:
"run_as"
},
{
data
:
"become"
,
orderable
:
false
},
{
data
:
"date_created"
},
{
data
:
"id"
,
orderable
:
false
}]
};
};
jumpserver
.
initDataTable
(
options
);
jumpserver
.
initDataTable
(
options
);
}).
on
(
'click'
,
'.celery-task-log'
,
function
()
{
}).
on
(
'click'
,
'.celery-task-log'
,
function
()
{
...
...
apps/ops/templates/ops/task_history.html
View file @
a242bdd3
...
@@ -140,8 +140,8 @@ function initTable() {
...
@@ -140,8 +140,8 @@ function initTable() {
}}
}}
],
],
ajax_url
:
'{% url "api-ops:history-list" %}?task={{ object.pk }}'
,
ajax_url
:
'{% url "api-ops:history-list" %}?task={{ object.pk }}'
,
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"date_start"
},
{
data
:
"stat"
},
{
data
:
"stat"
},
{
data
:
"is_finished"
},
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"date_start"
},
{
data
:
"stat"
,
orderable
:
false
},
{
data
:
"stat"
,
orderable
:
false
},
{
data
:
"is_finished"
},
{
data
:
"is_success"
},
{
data
:
"timedelta"
},
{
data
:
'adhoc_short_id'
},
{
data
:
"id"
}]
{
data
:
"is_success"
},
{
data
:
"timedelta"
},
{
data
:
'adhoc_short_id'
},
{
data
:
"id"
,
orderable
:
false
}]
};
};
jumpserver
.
initDataTable
(
options
);
jumpserver
.
initDataTable
(
options
);
}
}
...
...
apps/ops/templates/ops/task_list.html
View file @
a242bdd3
...
@@ -75,7 +75,13 @@ $(document).ready(function() {
...
@@ -75,7 +75,13 @@ $(document).ready(function() {
"searching"
:
false
,
"searching"
:
false
,
"paging"
:
false
,
"paging"
:
false
,
"bInfo"
:
false
,
"bInfo"
:
false
,
"order"
:
[]
"order"
:
[],
"columnDefs"
:
[
{
"targets"
:
0
,
"orderable"
:
false
},
{
"targets"
:
4
,
"orderable"
:
false
},
{
"targets"
:
5
,
"orderable"
:
false
},
{
"targets"
:
8
,
"orderable"
:
false
}
]
});
});
$
(
'.select2'
).
select2
({
$
(
'.select2'
).
select2
({
dropdownAutoWidth
:
true
,
dropdownAutoWidth
:
true
,
...
...
apps/perms/api/mixin.py
View file @
a242bdd3
...
@@ -6,6 +6,8 @@ from django.core.cache import cache
...
@@ -6,6 +6,8 @@ from django.core.cache import cache
from
django.db.models
import
Q
from
django.db.models
import
Q
from
django.conf
import
settings
from
django.conf
import
settings
from
rest_framework.views
import
Response
from
rest_framework.views
import
Response
from
django.utils.decorators
import
method_decorator
from
django.views.decorators.http
import
condition
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
from
common.utils
import
get_logger
from
common.utils
import
get_logger
...
@@ -14,7 +16,7 @@ from ..utils import (
...
@@ -14,7 +16,7 @@ from ..utils import (
AssetPermissionUtil
AssetPermissionUtil
)
)
from
..
import
const
from
..
import
const
from
..hands
import
Asset
,
Node
,
SystemUser
,
Label
from
..hands
import
Asset
,
Node
,
SystemUser
from
..
import
serializers
from
..
import
serializers
logger
=
get_logger
(
__name__
)
logger
=
get_logger
(
__name__
)
...
@@ -22,6 +24,17 @@ logger = get_logger(__name__)
...
@@ -22,6 +24,17 @@ logger = get_logger(__name__)
__all__
=
[
'UserPermissionCacheMixin'
,
'GrantAssetsMixin'
,
'NodesWithUngroupMixin'
]
__all__
=
[
'UserPermissionCacheMixin'
,
'GrantAssetsMixin'
,
'NodesWithUngroupMixin'
]
def
get_etag
(
request
,
*
args
,
**
kwargs
):
cache_policy
=
request
.
GET
.
get
(
"cache_policy"
)
if
cache_policy
!=
'1'
:
return
None
view
=
request
.
parser_context
.
get
(
"view"
)
if
not
view
:
return
None
etag
=
view
.
get_meta_cache_id
()
return
etag
class
UserPermissionCacheMixin
:
class
UserPermissionCacheMixin
:
cache_policy
=
'0'
cache_policy
=
'0'
RESP_CACHE_KEY
=
'_PERMISSION_RESPONSE_CACHE_V2_{}'
RESP_CACHE_KEY
=
'_PERMISSION_RESPONSE_CACHE_V2_{}'
...
@@ -96,6 +109,7 @@ class UserPermissionCacheMixin:
...
@@ -96,6 +109,7 @@ class UserPermissionCacheMixin:
cache
.
set
(
key
,
response
.
data
,
self
.
CACHE_TIME
)
cache
.
set
(
key
,
response
.
data
,
self
.
CACHE_TIME
)
logger
.
debug
(
"Set response to cache: {}"
.
format
(
key
))
logger
.
debug
(
"Set response to cache: {}"
.
format
(
key
))
@method_decorator
(
condition
(
etag_func
=
get_etag
))
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
self
.
cache_policy
=
request
.
GET
.
get
(
'cache_policy'
,
'0'
)
self
.
cache_policy
=
request
.
GET
.
get
(
'cache_policy'
,
'0'
)
...
...
apps/perms/api/user_permission.py
View file @
a242bdd3
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
import
uuid
import
uuid
from
django.shortcuts
import
get_object_or_404
from
django.shortcuts
import
get_object_or_404
from
rest_framework.views
import
APIView
,
Response
from
rest_framework.views
import
APIView
,
Response
from
rest_framework.generics
import
(
from
rest_framework.generics
import
(
ListAPIView
,
get_object_or_404
,
RetrieveAPIView
ListAPIView
,
get_object_or_404
,
RetrieveAPIView
)
)
...
...
apps/perms/templates/perms/asset_permission_asset.html
View file @
a242bdd3
...
@@ -19,17 +19,17 @@
...
@@ -19,17 +19,17 @@
</li>
</li>
<li>
<li>
<a
href=
"{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}"
class=
"text-center"
>
<a
href=
"{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}"
class=
"text-center"
>
<i
class=
"fa fa-
bar-chart-o
"
></i>
{% trans 'Users and user groups' %}
<i
class=
"fa fa-
group
"
></i>
{% trans 'Users and user groups' %}
</a>
</a>
</li>
</li>
<li
class=
"active"
>
<li
class=
"active"
>
<a
href=
"{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}"
class=
"text-center"
>
<a
href=
"{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}"
class=
"text-center"
>
<i
class=
"fa fa-
bar-chart-o
"
></i>
{% trans 'Assets and node' %}
</a>
<i
class=
"fa fa-
inbox
"
></i>
{% trans 'Assets and node' %}
</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
style=
"float: left"
>
{% trans 'Asset list of ' %}
<b>
{{ asset_permission.name }}
</b></span>
<span
style=
"float: left"
>
{% trans 'Asset list of ' %}
<b>
{{ asset_permission.name }}
</b></span>
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
4
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add asset to this permission' %}
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add asset to this permission' %}
...
...
apps/perms/templates/perms/asset_permission_detail.html
View file @
a242bdd3
...
@@ -19,12 +19,12 @@
...
@@ -19,12 +19,12 @@
</li>
</li>
<li>
<li>
<a
href=
"{% url 'perms:asset-permission-user-list' pk=object.id %}"
class=
"text-center"
>
<a
href=
"{% url 'perms:asset-permission-user-list' pk=object.id %}"
class=
"text-center"
>
<i
class=
"fa fa-
bar-chart-o
"
></i>
{% trans 'Users and user groups' %}
<i
class=
"fa fa-
group
"
></i>
{% trans 'Users and user groups' %}
</a>
</a>
</li>
</li>
<li>
<li>
<a
href=
"{% url 'perms:asset-permission-asset-list' pk=object.id %}"
class=
"text-center"
>
<a
href=
"{% url 'perms:asset-permission-asset-list' pk=object.id %}"
class=
"text-center"
>
<i
class=
"fa fa-
bar-chart-o
"
></i>
{% trans 'Assets and node' %}
</a>
<i
class=
"fa fa-
inbox
"
></i>
{% trans 'Assets and node' %}
</a>
</li>
</li>
<li
class=
"pull-right"
>
<li
class=
"pull-right"
>
<a
class=
"btn btn-outline btn-default"
href=
"{% url 'perms:asset-permission-update' pk=object.id %}"
><i
class=
"fa fa-edit"
></i>
{% trans 'Update' %}
</a>
<a
class=
"btn btn-outline btn-default"
href=
"{% url 'perms:asset-permission-update' pk=object.id %}"
><i
class=
"fa fa-edit"
></i>
{% trans 'Update' %}
</a>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
class=
"label"
><b>
{{ object.name }}
</b></span>
<span
class=
"label"
><b>
{{ object.name }}
</b></span>
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
4
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Quick update' %}
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Quick update' %}
...
...
apps/perms/templates/perms/asset_permission_list.html
View file @
a242bdd3
...
@@ -182,9 +182,9 @@ function initTable() {
...
@@ -182,9 +182,9 @@ function initTable() {
],
],
ajax_url
:
'{% url "api-perms:asset-permission-list" %}?display=1'
,
ajax_url
:
'{% url "api-perms:asset-permission-list" %}?display=1'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"users"
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"users"
,
orderable
:
false
},
{
data
:
"user_groups"
},
{
data
:
"assets"
},
{
data
:
"user_groups"
,
orderable
:
false
},
{
data
:
"assets"
,
orderable
:
false
},
{
data
:
"nodes"
},
{
data
:
"system_users"
},
{
data
:
"nodes"
,
orderable
:
false
},
{
data
:
"system_users"
,
orderable
:
false
},
{
data
:
"is_valid"
,
orderable
:
false
},
{
data
:
"id"
,
orderable
:
false
}
{
data
:
"is_valid"
,
orderable
:
false
},
{
data
:
"id"
,
orderable
:
false
}
],
],
select
:
{},
select
:
{},
...
...
apps/perms/templates/perms/asset_permission_user.html
View file @
a242bdd3
...
@@ -19,17 +19,17 @@
...
@@ -19,17 +19,17 @@
</li>
</li>
<li
class=
"active"
>
<li
class=
"active"
>
<a
href=
"{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}"
class=
"text-center"
>
<a
href=
"{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}"
class=
"text-center"
>
<i
class=
"fa fa-
bar-chart-o
"
></i>
{% trans 'Users and user groups' %}
<i
class=
"fa fa-
group
"
></i>
{% trans 'Users and user groups' %}
</a>
</a>
</li>
</li>
<li>
<li>
<a
href=
"{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}"
class=
"text-center"
>
<a
href=
"{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}"
class=
"text-center"
>
<i
class=
"fa fa-
bar-chart-o
"
></i>
{% trans 'Assets and node' %}
</a>
<i
class=
"fa fa-
inbox
"
></i>
{% trans 'Assets and node' %}
</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
style=
"float: left"
>
{% trans 'User list of ' %}
<b>
{{ asset_permission.name }}
</b></span>
<span
style=
"float: left"
>
{% trans 'User list of ' %}
<b>
{{ asset_permission.name }}
</b></span>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
4
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add user to asset permission' %}
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add user to asset permission' %}
...
...
apps/perms/templates/perms/remote_app_permission_detail.html
View file @
a242bdd3
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
class=
"label"
><b>
{{ object.name }}
</b></span>
<span
class=
"label"
><b>
{{ object.name }}
</b></span>
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
4
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Quick update' %}
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Quick update' %}
...
...
apps/perms/templates/perms/remote_app_permission_remote_app.html
View file @
a242bdd3
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
style=
"float: left"
>
{% trans 'RemoteApp list of ' %}
<b>
{{ remote_app_permission.name }}
</b></span>
<span
style=
"float: left"
>
{% trans 'RemoteApp list of ' %}
<b>
{{ remote_app_permission.name }}
</b></span>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
4
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add RemoteApp to this permission' %}
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add RemoteApp to this permission' %}
...
...
apps/perms/templates/perms/remote_app_permission_user.html
View file @
a242bdd3
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
8
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<span
style=
"float: left"
>
{% trans 'User list of ' %}
<b>
{{ remote_app_permission.name }}
</b></span>
<span
style=
"float: left"
>
{% trans 'User list of ' %}
<b>
{{ remote_app_permission.name }}
</b></span>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
4
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add user to this permission' %}
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Add user to this permission' %}
...
...
apps/static/js/jumpserver.js
View file @
a242bdd3
...
@@ -223,7 +223,7 @@ function formSubmit(props) {
...
@@ -223,7 +223,7 @@ function formSubmit(props) {
return
return
}
}
$
.
each
(
errors
,
function
(
k
,
v
)
{
$
.
each
(
errors
,
function
(
k
,
v
)
{
var
fieldRef
=
props
.
form
.
find
(
'
input
[name="'
+
k
+
'"]'
);
var
fieldRef
=
props
.
form
.
find
(
'[name="'
+
k
+
'"]'
);
var
formGroupRef
=
fieldRef
.
parents
(
'.form-group'
);
var
formGroupRef
=
fieldRef
.
parents
(
'.form-group'
);
var
parentRef
=
fieldRef
.
parent
();
var
parentRef
=
fieldRef
.
parent
();
var
helpBlockRef
=
parentRef
.
children
(
'.help-block.error'
);
var
helpBlockRef
=
parentRef
.
children
(
'.help-block.error'
);
...
@@ -237,7 +237,7 @@ function formSubmit(props) {
...
@@ -237,7 +237,7 @@ function formSubmit(props) {
helpBlockRef
.
html
(
help_msg
);
helpBlockRef
.
html
(
help_msg
);
}
else
{
}
else
{
$
.
each
(
v
,
function
(
kk
,
vv
)
{
$
.
each
(
v
,
function
(
kk
,
vv
)
{
if
(
typeof
errors
===
"object"
)
{
if
(
typeof
vv
===
"object"
)
{
$
.
each
(
vv
,
function
(
kkk
,
vvv
)
{
$
.
each
(
vv
,
function
(
kkk
,
vvv
)
{
noneFieldErrorMsg
+=
" "
+
vvv
+
'<br/>'
;
noneFieldErrorMsg
+=
" "
+
vvv
+
'<br/>'
;
})
})
...
...
apps/terminal/templates/terminal/command_list.html
View file @
a242bdd3
...
@@ -199,8 +199,8 @@ function initTable() {
...
@@ -199,8 +199,8 @@ function initTable() {
ajax_url
:
commandListUrl
,
ajax_url
:
commandListUrl
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"input"
,
orderable
:
false
},
{
data
:
"user"
,
orderable
:
false
},
{
data
:
"id"
},
{
data
:
"input"
,
orderable
:
false
},
{
data
:
"user"
,
orderable
:
false
},
{
data
:
"asset"
},
{
data
:
"system_user"
},
{
data
:
"asset"
,
orderable
:
false
},
{
data
:
"system_user"
,
orderable
:
false
},
{
data
:
"session"
},
{
data
:
"timestamp"
,
width
:
"160px"
},
{
data
:
"session"
,
orderable
:
false
},
{
data
:
"timestamp"
,
width
:
"160px"
,
orderable
:
false
},
],
],
select
:
{},
select
:
{},
op_html
:
$
(
'#actions'
).
html
(),
op_html
:
$
(
'#actions'
).
html
(),
...
...
apps/terminal/templates/terminal/session_list.html
View file @
a242bdd3
...
@@ -155,11 +155,11 @@ function initTable() {
...
@@ -155,11 +155,11 @@ function initTable() {
],
],
ajax_url
:
sessionListUrl
,
ajax_url
:
sessionListUrl
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"id"
},
{
data
:
"user"
,
orderable
:
false
},
{
data
:
"id"
},
{
data
:
"id"
,
orderable
:
false
},
{
data
:
"user"
},
{
data
:
"asset"
,
orderable
:
false
},
{
data
:
"system_user"
,
orderable
:
false
},
{
data
:
"asset"
},
{
data
:
"system_user"
},
{
data
:
"remote_addr"
},
{
data
:
"protocol"
},
{
data
:
"login_from_display"
},
{
data
:
"remote_addr"
},
{
data
:
"protocol"
},
{
data
:
"login_from_display"
,
orderable
:
false
},
{
data
:
"command_amount"
},
{
data
:
"date_start"
},
{
data
:
"command_amount"
,
orderable
:
false
},
{
data
:
"date_start"
},
{
data
:
"date_end"
},
{
data
:
"id"
},
{
data
:
"date_end"
,
orderable
:
false
},
{
data
:
"id"
,
orderable
:
false
},
],
],
op_html
:
$
(
'#actions'
).
html
(),
op_html
:
$
(
'#actions'
).
html
(),
fb_html
:
$
(
"#daterange"
).
html
(),
fb_html
:
$
(
"#daterange"
).
html
(),
...
...
apps/terminal/templates/terminal/terminal_list.html
View file @
a242bdd3
...
@@ -90,7 +90,7 @@ function initTable() {
...
@@ -90,7 +90,7 @@ function initTable() {
],
],
ajax_url
:
'{% url "api-terminal:terminal-list" %}'
,
ajax_url
:
'{% url "api-terminal:terminal-list" %}'
,
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"remote_addr"
},
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"remote_addr"
},
{
data
:
"session_online"
},
{
data
:
"is_active"
},
{
data
:
'is_alive'
},
{
data
:
"id"
}],
{
data
:
"session_online"
,
orderable
:
false
},
{
data
:
"is_active"
,
orderable
:
false
},
{
data
:
'is_alive'
},
{
data
:
"id"
,
orderable
:
false
}],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
jumpserver
.
initDataTable
(
options
);
jumpserver
.
initDataTable
(
options
);
...
...
apps/users/templates/users/user_group_list.html
View file @
a242bdd3
...
@@ -80,8 +80,8 @@ function initTable() {
...
@@ -80,8 +80,8 @@ function initTable() {
}}
}}
],
],
ajax_url
:
'{% url "api-users:user-group-list" %}?display=1'
,
ajax_url
:
'{% url "api-users:user-group-list" %}?display=1'
,
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"users"
},
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"users"
,
orderable
:
false
},
{
data
:
"comment"
},
{
data
:
"id"
}],
{
data
:
"comment"
},
{
data
:
"id"
,
orderable
:
false
}],
order
:
[],
order
:
[],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
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