Skip to content

Commit 9c5b703

Browse files
committed
version 2.3.1
1 parent c5b4cb3 commit 9c5b703

File tree

11 files changed

+150
-97
lines changed

11 files changed

+150
-97
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# ============ Kuiper Platform
33
# enable debugging mode
4-
FLASK_DEBUG=False
4+
FLASK_DEBUG=True
55
# remove raw files uploaded to Kuiper, as consequences enable this will allow upload the file multiple times
66
FLASK_REMOVE_RAW_FILES=True
77
# log level stored in the app logs (INFO, WARNING, DEBUG, and ERROR)

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ kuiper/app/parsers/WinEvents/temp/**
1010
kuiper/app/parsers/MFT_Parser/temp/**
1111
kuiper/**/*.pyc
1212
system_health/**/*.pyc
13-
mongodb/db/**
13+
mongodb/**
14+
!mongodb/empty.md
1415
redis/dump.rdb
15-
elasticsearch/nodes/**
16+
elasticsearch/**
17+
!elasticsearch/empty.md

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# **Changelog**
22
This page list the Changelog for Kuiper project
33

4+
## **[2.3.1] - 2022-02-07**
5+
### **Fixes:**
6+
- Fixed dynamic add for folder `kuiper/app/parsers/temp`
7+
- Fixed issue of uploading files to a previously created machine
8+
- Fixed issue of handling error message in elasticsearch version 7.16.2 during the indexing
9+
- Fixed issue to preserve the selected record in browse artifact table if detailed table clicked
10+
- Fixes the system health for celery if the task has large number of arguments
11+
12+
413

514
## **[2.3.0] - 2022-01-25**
615

kuiper/app/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@
105105
app.config['UPLOADED_FILES_DEST_RAW'] ,
106106
app.config['TIMELINE_FOLDER'],
107107
logs_folder,
108-
app.config['SYSTEM_HEALTH_PATH']
108+
app.config['SYSTEM_HEALTH_PATH'],
109+
os.path.join(app.config['PARSER_PATH'] , "temp")
110+
109111
]
110112
for d in built_in_dirs:
111113
try:

kuiper/app/controllers/case_management.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,7 @@ def all_machines(case_id , group_name):
469469
case = db_cases.get_case_by_id(case_id)
470470
parsers_details = db_parsers.get_parser()
471471
groups_list = db_groups.get_groups(case_id)
472-
473-
# check if there is error getting the information
472+
# check if there is error getting the information
474473
error = None
475474
if machines[0] == False:
476475
error = ["Case["+case_id+"]: Failed getting case machines" , machines[1]]
@@ -488,9 +487,9 @@ def all_machines(case_id , group_name):
488487
if group_name is not None:
489488
for i in groups_list[1]:
490489
if i['_id'] == case_id + "_" + group_name:
491-
i['selected'] = True
492-
490+
i['selected'] = True
493491

492+
494493
if error is not None:
495494
logger.logger(level=logger.ERROR , type="case", message=error[0], reason=error[1])
496495
return render_template('case/error_page.html',case_details=case_id ,SIDEBAR=SIDEBAR , CASE_FIELDS=CASE_FIELDS[1] , message=error[0] + "<br />" + error[1])
@@ -624,18 +623,20 @@ def case_upload_machine(case_id):
624623

625624
# ================================ Upload Artifacts
626625
# upload artifacts for specific machine
627-
@app.route('/case/<main_case_id>/uploadartifacts/<machine_case_id>', methods=['GET', 'POST'])
626+
@app.route('/case/<main_case_id>/uploadartifacts/<machine_case_id>', methods=['POST'])
628627
def main_upload_artifacts(main_case_id,machine_case_id):
628+
629629
if request.method == 'POST':
630630
try:
631-
631+
632632
# get file
633633
file = request.files['files[]']
634634

635-
635+
636636
# if there is a file to upload
637637
if file:
638638
base64_name = None if 'base64_name' not in request.form else request.form['base64_name']
639+
639640
# start handling uploading the file
640641
uf = upload_file(file , main_case_id , machine_case_id , base64_name=base64_name)
641642
return json.dumps(uf[1])

kuiper/app/database/elkdb.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,10 @@ def bulk_to_elasticsearch_fix_errors(self, indx, errors):
463463
try:
464464

465465

466-
if 'caused_by' in doc['index']['error']:
467-
doc_reason = doc['index']['error']['caused_by']['reason']
468-
else:
466+
if 'reason' in doc['index']['error']:
469467
doc_reason = doc['index']['error']['reason']
468+
else:
469+
doc_reason = doc['index']['error']['caused_by']['reason']
470470

471471
logger.logger(level=logger.WARNING , type="elasticsearch", message=record_msg_info + ": record failed" , reason=doc_reason)
472472

kuiper/app/templates/case/browse_artifacts.html

+12-31
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ <h3 class="box-title"> <i class="fa fa-cubes"></i> Artifacts </h3>
200200

201201

202202

203-
204203
<!-- ===================== Records details ===================== -->
205204

206205
<div id="record_details_block" class="col-md-4">
@@ -282,8 +281,6 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
282281
<script src="../../static/dist/air-datepicker/dist/js/i18n/datepicker.en.js"></script>
283282

284283

285-
286-
287284
<!-- This will take the AdminLTE input style and use it with the tags input style -->
288285
<style type="text/css">
289286
/* START ====== tagsinput */
@@ -500,7 +497,7 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
500497

501498
// ====================================== Variables
502499

503-
var clicked_id_record; // store the records clicked on the table
500+
var clicked_id_record = 0; // store the records clicked on the table
504501

505502
var rules = ({{rules|tojson|safe}}) // get list of all rules
506503
var toast = $.toast; // toast object
@@ -1269,6 +1266,11 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
12691266

12701267

12711268

1269+
$('#' + clicked_id_record).addClass('table_events_clicked_tr disabled');
1270+
$('#' + clicked_id_record).css('background-color' , '#636777');
1271+
1272+
// change records clicked status to clicked
1273+
is_record_tr_clicked = true
12721274

12731275
}
12741276

@@ -1422,18 +1424,9 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
14221424
// build records table
14231425
rebuild_records(ajax_records);
14241426

1425-
// build data type drop-down list
1426-
//console.log(r)
1427-
/*
1428-
var list = ""
1429-
if(r['res_total'] != 0){
1430-
var aggs = r['aggs']
1431-
for(var i = 0 ; i <aggs.length ; i++)
1432-
list += '<li class="clickable"><a id="data_type:'+aggs[i]['key']+'" class="clickable add_to_search_query">'+aggs[i]['key']+' <span class="badge bg-red">'+aggs[i]['doc_count']+'</span></a></li>'
1433-
}
1434-
$('#artifacts_list').html(list);
1435-
$('.artifacts_list_button').dropdown()
1436-
*/
1427+
1428+
1429+
14371430
if (is_record_tr_clicked){
14381431
// click the first raw in the table
14391432
$("#table_events tr#" + wanted_record.toString()).click()
@@ -2047,9 +2040,6 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
20472040

20482041

20492042

2050-
2051-
2052-
20532043
// if save as rule button clicked, add the rule to dmango
20542044
$(document).on('click' , '.sample_search_save_as_rule' , function(){
20552045
var query_search_content = $('#sample_query_search h5 #sample_query_search_content').text().trim()
@@ -2712,6 +2702,8 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
27122702
$('#record_details_block').slideUp('fast' , function(){
27132703
$('#content_table').removeClass('col-md-8');
27142704
});
2705+
2706+
27152707
})
27162708

27172709

@@ -2888,19 +2880,8 @@ <h3 class="box-title"><i class="fa fa-cubes"></i> Record Details</h3>
28882880
handle_query_param(search)
28892881
})
28902882

2891-
$(document).click(function(e){
2892-
//For descendants of menu_content being clicked, remove this check if you do not want to put constraint on descendants.
2893-
if($(e.target).closest('#table_events').length){
2894-
return;
2895-
} else {
2896-
$('#' + clicked_id_record).removeClass('table_events_clicked_tr disabled');
2897-
$('#' + clicked_id_record).css('background-color' , '');
28982883

2899-
clicked_id_record = null
2900-
is_record_tr_clicked = false
2901-
}
2902-
2903-
})
2884+
29042885

29052886

29062887
// enable the top-down press button

kuiper/app/templates/case/case_sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</aside>
3939
{% endblock %}
4040

41-
<script src="../../static/bower_components/jquery/dist/jquery.min.js"></script>
41+
<script src="{{url_for('static', filename='bower_components/jquery/dist/jquery.min.js')}}"></script>
4242

4343
<script>
4444

0 commit comments

Comments
 (0)