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
340aaf42
Commit
340aaf42
authored
Mar 27, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ˢ
parent
59414dad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
24 deletions
+33
-24
urls.py
jperm/urls.py
+0
-1
sudo_list.html
templates/jperm/sudo_list.html
+33
-23
No files found.
jperm/urls.py
View file @
340aaf42
from
django.conf.urls
import
patterns
,
include
,
url
from
jumpserver.api
import
view_splitter
from
jperm.views
import
*
urlpatterns
=
patterns
(
'jperm.views'
,
...
...
templates/jperm/sudo_list.html
View file @
340aaf42
...
...
@@ -37,7 +37,7 @@
<li
id=
"tab1"
class=
"active"
><a
href=
"/jperm/sudo_list/"
>
查看Sudo授权
</a></li>
<li
id=
"tab2"
class=
""
><a
href=
"/jperm/cmd_list/"
>
查看命令组
</a></li>
<li
id=
"tab3"
class=
""
><a
href=
"/jperm/cmd_add/"
>
添加命令组
</a></li>
<button
class=
"btn btn-primary btn-sm pull-right"
style=
"margin-right: 20px;"
data-toggle=
"tooltip"
data-placement=
"left"
title=
""
data-original-title=
"Refresh inbox"
>
<button
id=
"refresh"
class=
"btn btn-primary btn-sm pull-right"
style=
"margin-right: 20px;"
data-toggle=
"tooltip"
data-placement=
"left"
title=
""
data-original-title=
"Refresh inbox"
>
<i
class=
"fa fa-refresh"
></i>
刷新
</button>
</ul>
...
...
@@ -105,30 +105,39 @@
<script>
$
(
document
).
ready
(
function
(){
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"70%"
,
height
:
"70%"
});
});
$
(
document
).
ready
(
function
(){
$
(
'#search_btn'
).
click
(
function
(){
if
(
$
(
'#tab2'
).
attr
(
'class'
)
==
'active'
){
var
tab
=
'tab2'
}
else
{
var
tab
=
'tab1'
}
var
search
=
$
(
'#search_input'
).
val
()
$
.
post
(
'/jperm/perm_list_ajax/'
,
{
'tab'
:
tab
,
'search'
:
search
},
$
(
"#refresh"
).
click
(
function
(){
$
.
get
(
'/jperm/sudo_refresh/'
,
{
'test'
:
''
},
function
(
data
){
if
(
$
(
'#tab2'
).
attr
(
'class'
)
==
'active'
){
$
(
'#tab-2'
).
html
(
data
)
}
else
{
$
(
'#tab-1'
).
html
(
data
)
}
})
alert
(
data
)
}
)
})
})
});
{
#
$
(
document
).
ready
(
function
(){
#
}
{
#
$
(
'#search_btn'
).
click
(
function
(){
#
}
{
#
if
(
$
(
'#tab2'
).
attr
(
'class'
)
==
'active'
){
#
}
{
#
var
tab
=
'tab2'
#
}
{
#
}
else
{
#
}
{
#
var
tab
=
'tab1'
#
}
{
#
}
#
}
{
##
}
{
#
var
search
=
$
(
'#search_input'
).
val
()
#
}
{
##
}
{
#
$
.
post
(
'/jperm/perm_list_ajax/'
,
#
}
{
#
{
'tab'
:
tab
,
'search'
:
search
},
#
}
{
#
function
(
data
){
#
}
{
#
if
(
$
(
'#tab2'
).
attr
(
'class'
)
==
'active'
){
#
}
{
#
$
(
'#tab-2'
).
html
(
data
)
#
}
{
#
}
else
{
#
}
{
#
$
(
'#tab-1'
).
html
(
data
)
#
}
{
#
}
#
}
{
#
})
#
}
{
##
}
{
#
})
#
}
{
#
})
#
}
</script>
{% endblock %}
\ No newline at end of file
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