mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修改 API key table 的前端变量名 ak_table
parent
7dc8b128d6
commit
6db57424aa
|
@ -37,12 +37,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{#<div id="uc" hidden>#}
|
|
||||||
{# <button class="btn btn-primary btn-sm" id="create-btn" href="#"> {% trans "Create" %} </button>#}
|
|
||||||
{#</div>#}
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var table = null;
|
var ak_table = null;
|
||||||
function initAccessKeyTable() {
|
function initAccessKeyTable() {
|
||||||
var options = {
|
var options = {
|
||||||
ele: $('#access_key_list_table'),
|
ele: $('#access_key_list_table'),
|
||||||
|
@ -88,14 +84,13 @@ function initAccessKeyTable() {
|
||||||
{data: "date_created"},
|
{data: "date_created"},
|
||||||
{data: "id", orderable: false}
|
{data: "id", orderable: false}
|
||||||
],
|
],
|
||||||
{#uc_html: $('#uc').html()#}
|
|
||||||
};
|
};
|
||||||
table = jumpserver.initServerSideDataTable(options);
|
ak_table = jumpserver.initServerSideDataTable(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
}).on("show.bs.modal", "#access_key_modal", function () {
|
}).on("show.bs.modal", "#access_key_modal", function () {
|
||||||
if (!table) {
|
if (!ak_table) {
|
||||||
initAccessKeyTable()
|
initAccessKeyTable()
|
||||||
}
|
}
|
||||||
}).on("click", "#create-btn", function () {
|
}).on("click", "#create-btn", function () {
|
||||||
|
@ -104,7 +99,7 @@ $(document).ready(function () {
|
||||||
url: url,
|
url: url,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
success: function () {
|
success: function () {
|
||||||
table.ajax.reload();
|
ak_table.ajax.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
requestApi(data)
|
requestApi(data)
|
||||||
|
@ -123,7 +118,7 @@ $(document).ready(function () {
|
||||||
body: JSON.stringify({"is_active": true}),
|
body: JSON.stringify({"is_active": true}),
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
success: function () {
|
success: function () {
|
||||||
table.ajax.reload();
|
ak_table.ajax.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
requestApi(data)
|
requestApi(data)
|
||||||
|
@ -135,7 +130,7 @@ $(document).ready(function () {
|
||||||
body: JSON.stringify({"is_active": false}),
|
body: JSON.stringify({"is_active": false}),
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
success: function () {
|
success: function () {
|
||||||
table.ajax.reload();
|
ak_table.ajax.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
requestApi(data)
|
requestApi(data)
|
||||||
|
|
Loading…
Reference in New Issue