Merge remote-tracking branch 'github/dev' into dev

pull/2135/head
ibuler 2018-11-12 16:46:21 +08:00
commit e1673334af
3 changed files with 8 additions and 4 deletions

View File

@ -213,7 +213,7 @@ $(document).ready(function() {
field_of_all = [name_id, host_id, port_id, bucket_id, access_key_id, secret_key_id, container_name_id, account_name_id, account_key_id, endpoint_id, endpoint_suffix_id, region_id]; field_of_all = [name_id, host_id, port_id, bucket_id, access_key_id, secret_key_id, container_name_id, account_name_id, account_key_id, endpoint_id, endpoint_suffix_id, region_id];
need_get_field_of_server = [name_id]; need_get_field_of_server = [name_id];
need_get_field_of_s3 = [name_id, bucket_id, access_key_id, secret_key_id, region_id]; need_get_field_of_s3 = [name_id, bucket_id, access_key_id, secret_key_id, region_id];
need_get_field_of_oss = [name_id, access_key_id, secret_key_id, endpoint_id]; need_get_field_of_oss = [name_id, bucket_id, access_key_id, secret_key_id, endpoint_id];
need_get_field_of_azure = [name_id, container_name_id, account_name_id, account_key_id, endpoint_suffix_id]; need_get_field_of_azure = [name_id, container_name_id, account_name_id, account_key_id, endpoint_suffix_id];
need_get_field_of_ceph = [name_id, host_id, port_id, bucket_id, access_key_id, secret_key_id, region_id]; need_get_field_of_ceph = [name_id, host_id, port_id, bucket_id, access_key_id, secret_key_id, region_id];
}) })

View File

@ -508,7 +508,7 @@ jumpserver.initServerSideDataTable = function (options) {
if (data.order !== null && data.order.length === 1) { if (data.order !== null && data.order.length === 1) {
var col = data.order[0].column; var col = data.order[0].column;
var order = options.columns[col].data; var order = options.columns[col].data;
if (data.order[0].dir = "desc") { if (data.order[0].dir === "desc") {
order = "-" + order; order = "-" + order;
} }
data.order = order; data.order = order;

View File

@ -90,8 +90,12 @@ function initTable() {
}}], }}],
ajax_url: '{% url "api-users:user-list" %}', ajax_url: '{% url "api-users:user-list" %}',
columns: [ columns: [
{data: "id"}, {data: "name" }, {data: "username" }, {data: "get_role_display" }, {data: "id"}, {data: "name" }, {data: "username" },
{data: "groups_display" }, {data: "get_source_display" }, {data: "is_valid" }, {data: "id" } {data: "get_role_display", orderable: false},
{data: "groups_display", orderable: false},
{data: "get_source_display", orderable: false},
{data: "is_valid", orderable: false},
{data: "id", orderable: false}
], ],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };