ajax.php - sort checklists

background_stigs.php - change to support adding sunset STIGs to update_db.php
parse_nessus.php/parse_nmap.php - disable post processing until the end of reading the file
update_db.php - Add sunset STIGs downloading and parsing
database.inc - Removed unnecessary variables ($key, etc), fixed typo (proc_ia_control v. proc_ia_controls), fix typo line 11072, added query_type to other queries in post_Processing method, call update_Target_Count method at the end of post_Processing, convert update_Target_Count to use queries instead of get_pdi_count and get_finding_count views (caused a performance hit), removed calling update_Target_Count from save_Target method to support previously mentioned changes
index.php - removed ajax timeout when bulk removing targets
This commit is contained in:
2018-09-18 19:53:19 -04:00
parent 78e584c1b9
commit 927ae69743
7 changed files with 181 additions and 76 deletions

View File

@ -1493,7 +1493,7 @@ function get_hosts($cat_id = null)
return json_encode(['error' => "Invalid info"]);
}
foreach ($tgts as $key => $tgt) {
foreach ($tgts as $tgt) {
$chks = $db->get_Target_Checklists($tgt->get_ID());
if ($cat_id) {
$exp_scan_srcs = $db->get_Expected_Category_Sources($ste_cat);
@ -1505,6 +1505,7 @@ function get_hosts($cat_id = null)
$icons = [];
$icon_str = '';
$src_str = '';
sort($chks);
foreach ($chks as $chk) {
if (!in_array($chk->get_Icon(), array_keys($icons))) {
@ -1518,7 +1519,7 @@ function get_hosts($cat_id = null)
$icon_str .= "<img src='/img/checklist_icons/$icon' title='{$data['name']}' class='checklist_image' />";
}
foreach ($scan_srcs as $key => $src) {
foreach ($scan_srcs as $src) {
$icon = $src['src']->get_Icon();
if($src['scan_error']) {
$icon = strtolower($src['src']->get_Name()) . "-failed.png";