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
b0aa9f19
Commit
b0aa9f19
authored
Aug 06, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复跳转错误的问题
parent
fc156e23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
_user_asset_detail_modal.html
apps/assets/templates/assets/_user_asset_detail_modal.html
+6
-3
domain_list.html
apps/assets/templates/assets/domain_list.html
+2
-2
user_asset_list.html
apps/assets/templates/assets/user_asset_list.html
+1
-1
views.py
apps/jumpserver/views.py
+5
-3
No files found.
apps/assets/templates/assets/_user_asset_detail_modal.html
View file @
b0aa9f19
{% extends '_modal.html' %}
{% extends '_modal.html' %}
{% load i18n %}
{% load i18n %}
{% load static %}
{% load static %}
<style>
.modal-body
{
background-color
:
white
!important
;
}
</style>
{% block modal_id %}user_asset_detail_modal{% endblock %}
{% block modal_id %}user_asset_detail_modal{% endblock %}
{% block modal_title %}{% trans "Asset detail" %}{% endblock %}
{% block modal_title %}{% trans "Asset detail" %}{% endblock %}
{% block modal_body %}
{% block modal_body %}
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
style=
"background-color: inherit"
>
<table
class=
"table"
>
<table
class=
"table"
>
<tbody
id=
"asset_detail_tbody"
>
<tbody
id=
"asset_detail_tbody"
>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
{% endblock %}
{% endblock %}
{% block modal_button %}
{% block modal_button %}
...
...
apps/assets/templates/assets/domain_list.html
View file @
b0aa9f19
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
{% block help_message %}
{% block help_message %}
<div
class=
"alert alert-info help-message"
>
<div
class=
"alert alert-info help-message"
>
网域功能是为了解决部分环境(如:混合云)无法直接连接而新增的功能,原理是通过网关服务器进行跳转登
网域功能是为了解决部分环境(如:混合云)无法直接连接而新增的功能,原理是通过网关服务器进行跳转登
录。
<br>
录。
JMS => 网域网关 => 目标资产
</div>
</div>
{% endblock %}
{% endblock %}
...
...
apps/assets/templates/assets/user_asset_list.html
View file @
b0aa9f19
...
@@ -193,7 +193,7 @@ $(document).ready(function () {
...
@@ -193,7 +193,7 @@ $(document).ready(function () {
$
.
each
(
data
,
function
(
index
,
value
){
$
.
each
(
data
,
function
(
index
,
value
){
if
(
value
.
id
===
asset_id
){
if
(
value
.
id
===
asset_id
){
for
(
var
i
in
desc
){
for
(
var
i
in
desc
){
trs
+=
"<tr>
\n
"
+
trs
+=
"<tr
class='no-borders-tr'
>
\n
"
+
"<td>"
+
desc
[
i
]
+
":</td>"
+
"<td>"
+
desc
[
i
]
+
":</td>"
+
"<td><b>"
+
(
value
[
i
]
===
null
?
''
:
value
[
i
])
+
"</b></td>
\n
"
+
"<td><b>"
+
(
value
[
i
]
===
null
?
''
:
value
[
i
])
+
"</b></td>
\n
"
+
"</tr>"
;
"</tr>"
;
...
...
apps/jumpserver/views.py
View file @
b0aa9f19
...
@@ -5,15 +5,15 @@ from django.views.generic import TemplateView, View
...
@@ -5,15 +5,15 @@ from django.views.generic import TemplateView, View
from
django.utils
import
timezone
from
django.utils
import
timezone
from
django.db.models
import
Count
from
django.db.models
import
Count
from
django.shortcuts
import
redirect
from
django.shortcuts
import
redirect
from
django.contrib.auth.mixins
import
LoginRequiredMixin
from
users.models
import
User
from
users.models
import
User
from
assets.models
import
Asset
from
assets.models
import
Asset
from
terminal.models
import
Session
from
terminal.models
import
Session
from
common.permissions
import
AdminUserRequiredMixin
from
orgs.utils
import
current_org
from
orgs.utils
import
current_org
class
IndexView
(
AdminUser
RequiredMixin
,
TemplateView
):
class
IndexView
(
Login
RequiredMixin
,
TemplateView
):
template_name
=
'index.html'
template_name
=
'index.html'
session_week
=
None
session_week
=
None
...
@@ -22,7 +22,9 @@ class IndexView(AdminUserRequiredMixin, TemplateView):
...
@@ -22,7 +22,9 @@ class IndexView(AdminUserRequiredMixin, TemplateView):
session_month_dates_archive
=
[]
session_month_dates_archive
=
[]
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
if
not
request
.
user
.
is_authenticated
or
not
request
.
user
.
is_org_admin
:
if
not
request
.
user
.
is_authenticated
:
return
self
.
handle_no_permission
()
if
not
request
.
user
.
is_org_admin
:
return
redirect
(
'assets:user-asset-list'
)
return
redirect
(
'assets:user-asset-list'
)
return
super
(
IndexView
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
return
super
(
IndexView
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
...
...
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