Merge pull request #3860 from jumpserver/1.5.8_bai

[Update] 命令记录导出: 只导出满足搜索条件的数据
pull/3864/head
BaiJiangJie 2020-04-08 01:35:16 +08:00 committed by GitHub
commit a7734812fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -117,6 +117,17 @@ $(document).ready(function () {
.on('click', '#btn_bulk_update', function(){
// var action = $('#slct_bulk_update').val();
var params = getUrlParams(table.ajax.url());
var searchParams = '';
var searchValue = $('input[type=search]').val();
var searchMap = parseTableFilter(searchValue);
if (Object.keys(searchMap).length === 0) {
searchParams = searchValue;
} else {
$.each(searchMap, function (k, v) {
searchParams += k + '=' + v + '&'
})
}
params += '&' + searchParams;
var exportPath = "{% url 'api-terminal:command-export' %}";
var url = exportPath + "?" + params;