{% trans 'Quick modify' %}
@@ -140,34 +137,34 @@
+{#
#}
+{# {% trans 'Enable OTP' %}: | #}
+{# #}
+{# #}
+{# #}
+{# #}
+{# #}
+{# #}
+{# #}
+{# | #}
+{#
#}
- {% trans 'Enable OTP' %}: |
-
-
- |
-
-
- {% trans 'Reset password' %}: |
+ {% trans 'Send reset password mail' %}: |
-
+
|
- {% trans 'Reset ssh key' %}: |
+ {% trans 'Send reset ssh key mail' %}: |
-
+
|
@@ -188,7 +185,7 @@
|
@@ -263,7 +260,7 @@ $(document).ready(function() {
})
.on('select2:unselect', function(evt) {
var data = evt.params.data;
- delete jumpserver.groups_selected[data.id]
+ delete jumpserver.groups_selected[data.id];
})
})
.on('click', '#is_active', function() {
@@ -279,20 +276,20 @@ $(document).ready(function() {
success_message: success
});
})
- .on('click', '#enable_otp', function() {
- var the_url = "{% url 'api-users:user-detail' pk=user_object.id %}";
- var checked = $(this).prop('checked');
- var body = {
- 'enable_otp': checked
- };
- var success = '{% trans "Update successfully!" %}';
- APIUpdateAttr({
- url: the_url,
- body: JSON.stringify(body),
- success_message: success
- });
-})
- .on('click', '#btn_join_group', function() {
+{#.on('click', '#enable_otp', function() {#}
+{# var the_url = "{% url 'api-users:user-detail' pk=user_object.id %}";#}
+{# var checked = $(this).prop('checked');#}
+{# var body = {#}
+{# 'enable_otp': checked#}
+{# };#}
+{# var success = '{% trans "Update successfully!" %}';#}
+{# APIUpdateAttr({#}
+{# url: the_url,#}
+{# body: JSON.stringify(body),#}
+{# success_message: success#}
+{# });#}
+{# });#}
+.on('click', '#btn_join_group', function() {
if (Object.keys(jumpserver.groups_selected).length === 0) {
return false;
}
@@ -300,7 +297,7 @@ $(document).ready(function() {
return $(this).data('gid');
}).get();
$.map(jumpserver.groups_selected, function(value, index) {
- groups.push(parseInt(index));
+ groups.push(index);
$('#opt_' + index).remove();
});
updateUserGroups(groups)
@@ -368,7 +365,7 @@ $(document).ready(function() {
}, function() {
doReset();
});
-}).on('click', '#btn_user_update_pk', function(){
+}).on('click', '#btn-user-update-pk', function(){
var $this = $(this);
var pk = $('#txt_pk').val();
var the_url = '{% url "api-users:user-public-key-reset" pk=user.id %}';
diff --git a/apps/users/templates/users/user_granted_asset.html b/apps/users/templates/users/user_granted_asset.html
index db8ca0800..753e1362e 100644
--- a/apps/users/templates/users/user_granted_asset.html
+++ b/apps/users/templates/users/user_granted_asset.html
@@ -17,9 +17,6 @@
{% trans 'User detail' %}
-
- {% trans 'Asset permission' %}
-
{% trans 'Asset granted' %}
@@ -48,12 +45,9 @@
- |
{% trans 'Hostname' %} |
{% trans 'IP' %} |
- {% trans 'Port' %} |
{% trans 'System user' %} |
- {% trans 'Valid' %} |
@@ -84,7 +78,6 @@
- |
{% trans 'Name' %} |
{% trans 'Asset' %} |
@@ -112,28 +105,15 @@
order: [],
select: [],
columnDefs: [
- {targets: 1, createdCell: function (td, cellData, rowData) {
+ {targets: 0, createdCell: function (td, cellData, rowData) {
var detail_btn = '' + cellData + '';
$(td).html(detail_btn.replace('{{ DEFAULT_PK }}', rowData.id));
- }},
- {targets: 4, createdCell: function (td, cellData, rowData) {
- if (cellData.length > 10){
- $(td).html(cellData.substring(1, 10) + '..')
- } else {
- $(td).html(cellData)
- }
- }},
- {targets: 5, createdCell: function (td, cellData) {
- if (!cellData) {
- $(td).html('')
- } else {
- $(td).html('')
- }
- }}
+ }}
],
ajax_url: '{% url "api-perms:user-assets" pk=user.id %}',
- columns: [{data: function(){return ""}}, {data: "hostname" }, {data: "ip" }, {data: "port"},
- {data: "system_users_join"}, {data: "is_active"}]
+ columns: [{data: "hostname" }, {data: "ip" },
+ {data: "system_users_join"}
+ ]
};
var options2 = {
ele: $('#user_asset_groups_table'),
@@ -141,13 +121,14 @@
order: [],
select: [],
columnDefs: [
- {targets: 1, createdCell: function (td, cellData, rowData) {
+ {targets: 0, createdCell: function (td, cellData, rowData) {
var detail_btn = '' + cellData + '';
$(td).html(detail_btn.replace('{{ DEFAULT_PK }}', rowData.id));
}}
],
ajax_url: '{% url "api-perms:user-asset-groups" pk=user.id %}',
- columns: [{data: function(){return ""}}, {data: "name" }, {data: "assets_amount" }]
+ columns: [{data: "name" }, {data: "assets_amount" }],
+ paging: false
};
jumpserver.initDataTable(options);
jumpserver.initDataTable(options2);
diff --git a/apps/users/templates/users/user_group_asset_permission.html b/apps/users/templates/users/user_group_asset_permission.html
deleted file mode 100644
index a775b8518..000000000
--- a/apps/users/templates/users/user_group_asset_permission.html
+++ /dev/null
@@ -1,181 +0,0 @@
-{% extends 'base.html' %}
-{% load bootstrap3 %}
-{% load static %}
-{% load i18n %}
-
-{% block custom_head_css_js %}
-
-
-{% endblock %}
-{% block content %}
-
-
-
-
-
-
-
-
-
-
{% trans 'Asset permission of ' %} {{ user_group.name }}
-
-
-
-
-
-
-
-
- {% trans 'Quick create permission for user group' %}
-
-
-
-
-
-
-
-
-
-
-{% endblock %}
-{% block custom_foot_js %}
-
-{% endblock %}
diff --git a/apps/users/templates/users/user_group_create_update.html b/apps/users/templates/users/user_group_create_update.html
index 4fc76389e..2a5727244 100644
--- a/apps/users/templates/users/user_group_create_update.html
+++ b/apps/users/templates/users/user_group_create_update.html
@@ -24,20 +24,21 @@
-
+
{% endblock %}
{% block content_bottom_left %}{% endblock %}
@@ -57,11 +46,12 @@ $(document).ready(function() {
} else {
$(td).html(update_btn + del_btn)
}
- }}],
+ }}
+ ],
ajax_url: '{% url "api-users:user-group-list" %}',
columns: [{data: function(){return ""}}, {data: "name" }, {data: "user_amount"},
{data: "comment"}, {data: "id" }],
- order: [4, 'asc'],
+ order: [],
op_html: $('#actions').html()
};
jumpserver.initDataTable(options);
diff --git a/apps/users/templates/users/user_list.html b/apps/users/templates/users/user_list.html
index cd6e8e69e..177819e67 100644
--- a/apps/users/templates/users/user_list.html
+++ b/apps/users/templates/users/user_list.html
@@ -52,24 +52,8 @@
{% block custom_foot_js %}