Skip to content

Commit

Permalink
Merge pull request #287 from OWASP/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Ali Razmjoo authored Jun 1, 2021
2 parents db2156f + 755649a commit 46f9360
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 27 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
setuptools==56.2.0
setuptools==57.0.0
pymongo==3.11.4
netaddr==0.8.0
flask==2.0.0
flask==2.0.1
terminable_thread==0.7.1
watchdog==2.1.1
watchdog==2.1.2
pyshark==0.4.3
oschmod==0.3.12
argparse==1.4.0
47 changes: 25 additions & 22 deletions web/static/js/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,27 +193,29 @@ $.fn.dataTable.pipeline = function ( opts ) {
}
}
json = tmpj
index = Object.keys(json['data'][0])[settings.aLastSort[0].col]
order = settings.aLastSort[0].dir
if (order == "asc"){
json['data'].sort(
(a, b) => {
if (a[index] < b[index])
return -1;
if (a[index] > b[index])
return 1;
return 0;
})

} else {
json['data'].sort(
(a, b) => {
if (a[index] > b[index])
return -1;
if (a[index] < b[index])
return 1;
return 0;
})
if(json['data'].length > 0){
index = Object.keys(json['data'][0])[settings.aLastSort[0].col]
order = settings.aLastSort[0].dir
if (order == "asc") {
json['data'].sort(
(a, b) => {
if (a[index] < b[index])
return -1;
if (a[index] > b[index])
return 1;
return 0;
})

} else {
json['data'].sort(
(a, b) => {
if (a[index] > b[index])
return -1;
if (a[index] < b[index])
return 1;
return 0;
})
}
}
return JSON.stringify( json );
},
Expand Down Expand Up @@ -295,7 +297,8 @@ function get_event_data(api_endpoint, column_list, api_params) {
processing: true,
language:{
loadingRecords: '&nbsp;',
processing: '<div class="spinner">Loading...</div>'
processing: '<div class="spinner">Loading...</div>',
sEmptyTable: '<div>No records are present for given request</div>'
},
oLanguage: {
sStripClasses: "",
Expand Down
4 changes: 2 additions & 2 deletions web/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ window.chartColors = {
blue: "rgb(54, 162, 235)",
purple: "rgb(153, 102, 255)",
grey: "rgb(201, 203, 207)",
cyan: "rgb(0, 255, 255"
cyan: "rgb(0, 255, 255)"
};

var colors_array = ["rgb(255, 0, 0)", "rgb(255, 0, 191)", "rgb(255, 159, 64)", "rgb(255, 205, 86)", "rgb(75, 192, 192)",
"rgb(191, 255, 0)", "rgb(54, 162, 235)", "rgb(153, 102, 255)", "rgb(201, 203, 207)", "rgb(0, 255, 255"]
"rgb(191, 255, 0)", "rgb(54, 162, 235)", "rgb(153, 102, 255)", "rgb(201, 203, 207)", "rgb(0, 255, 255)"]

var color = Chart.helpers.color;
var chartColors = window.chartColors;
Expand Down

0 comments on commit 46f9360

Please sign in to comment.