Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add directories count on Directories list #1050

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions web/startScan/templates/startScan/detail_scan.html
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ <h4 class="header-title mb-0"><span id="endpoint_change_count"><span class="spin
// has been scanned multiple times
html_treeview += `<p class="text-dark">Directory Scan has been performed ${data.length} times.</p>`;
}
html_treeview += `<ul>`;
html_treeview += `<ul class="list-unstyled">`;
var item_pos = 0;
data.forEach(function(item){
var aria_expanded = 'false';
Expand All @@ -1925,12 +1925,12 @@ <h4 class="header-title mb-0"><span id="endpoint_change_count"><span class="spin
show = 'hide';
}
if(item['directory_files'].length == 0){
html_treeview += `<br><span class="text-muted"><i class="fe-folder"></i> No Directories Discovered during the Scan Performed on ${item.scanned_date}</span>`;
html_treeview += `<div class="collapse ${show}" id="dir_${item.formatted_date_for_id}_${item.id}">`;
html_treeview += `<li class="mt-1"><span class="text-muted"><i class="fe-folder"></i> No Directories Discovered during the Scan Performed on ${item.scanned_date}</span></li>`;
html_treeview += `<div class="ml-2 collapse ${show}" id="dir_${item.formatted_date_for_id}_${item.id}">`;
}
else{
html_treeview += `<br><a class="mt-2" data-bs-toggle="collapse" href="#dir_${item.formatted_date_for_id}_${item.id}" aria-expanded="${aria_expanded}" aria-controls="dir_${item.formatted_date_for_id}_${item.id}"><i class="fe-folder-plus"></i> Directory Scan Performed on ${item.scanned_date}</a>`;
html_treeview += `<div class="collapse ${show}" id="dir_${item.formatted_date_for_id}_${item.id}">`;
html_treeview += `<li class="mt-1"><a data-bs-toggle="collapse" href="#dir_${item.formatted_date_for_id}_${item.id}" aria-expanded="${aria_expanded}" aria-controls="dir_${item.formatted_date_for_id}_${item.id}"><i class="fe-folder-plus"></i> <span class="me-1 badge badge-soft-primary badge-link bs-tooltip" title="Directories">${item['directory_files'].length} <i class="far fa-folder"></i></span> found on ${item.scanned_date}</a></li>`;
html_treeview += `<div class="ml-2 collapse ${show}" id="dir_${item.formatted_date_for_id}_${item.id}">`;
var interesting_badge = '';
// console.log(item['directory_files'][i]['name']);
item['directory_files'].forEach(function(file){
Expand Down
Loading