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
6db57424
Commit
6db57424
authored
Sep 23, 2019
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修改 API key table 的前端变量名 ak_table
parent
7dc8b128
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
_access_key_modal.html
...ntication/templates/authentication/_access_key_modal.html
+6
-11
No files found.
apps/authentication/templates/authentication/_access_key_modal.html
View file @
6db57424
...
...
@@ -37,12 +37,8 @@
</tbody>
</table>
{#
<div
id=
"uc"
hidden
>
#}
{#
<button
class=
"btn btn-primary btn-sm"
id=
"create-btn"
href=
"#"
>
{% trans "Create" %}
</button>
#}
{#
</div>
#}
<script>
var
table
=
null
;
var
ak_
table
=
null
;
function
initAccessKeyTable
()
{
var
options
=
{
ele
:
$
(
'#access_key_list_table'
),
...
...
@@ -88,14 +84,13 @@ function initAccessKeyTable() {
{
data
:
"date_created"
},
{
data
:
"id"
,
orderable
:
false
}
],
{
#
uc_html
:
$
(
'#uc'
).
html
()
#
}
};
table
=
jumpserver
.
initServerSideDataTable
(
options
);
ak_
table
=
jumpserver
.
initServerSideDataTable
(
options
);
}
$
(
document
).
ready
(
function
()
{
}).
on
(
"show.bs.modal"
,
"#access_key_modal"
,
function
()
{
if
(
!
table
)
{
if
(
!
ak_
table
)
{
initAccessKeyTable
()
}
}).
on
(
"click"
,
"#create-btn"
,
function
()
{
...
...
@@ -104,7 +99,7 @@ $(document).ready(function () {
url
:
url
,
method
:
'POST'
,
success
:
function
()
{
table
.
ajax
.
reload
();
ak_
table
.
ajax
.
reload
();
}
};
requestApi
(
data
)
...
...
@@ -123,7 +118,7 @@ $(document).ready(function () {
body
:
JSON
.
stringify
({
"is_active"
:
true
}),
method
:
"PATCH"
,
success
:
function
()
{
table
.
ajax
.
reload
();
ak_
table
.
ajax
.
reload
();
}
};
requestApi
(
data
)
...
...
@@ -135,7 +130,7 @@ $(document).ready(function () {
body
:
JSON
.
stringify
({
"is_active"
:
false
}),
method
:
"PATCH"
,
success
:
function
()
{
table
.
ajax
.
reload
();
ak_
table
.
ajax
.
reload
();
}
};
requestApi
(
data
)
...
...
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