Appease sonar

This commit is contained in:
amcmanu3 2023-09-04 19:40:27 -04:00
parent 84a24687d0
commit 7134eb2eb8

View File

@ -44,11 +44,11 @@ async function getTreeView(path, unzip = false, upload = false) {
if (responseData.status === "ok") { if (responseData.status === "ok") {
console.log(responseData); console.log(responseData);
process_tree_response(responseData); process_tree_response(responseData);
var x = document.querySelector('.bootbox'); let x = document.querySelector('.bootbox');
if (x) { if (x) {
x.remove() x.remove()
} }
var x = document.querySelector('.modal-backdrop'); x = document.querySelector('.modal-backdrop');
if (x) { if (x) {
x.remove() x.remove()
} }
@ -73,7 +73,7 @@ function process_tree_response(response) {
} }
let path = response.data.root_path.path; let path = response.data.root_path.path;
$(".root-input").val(response.data.root_path.path); $(".root-input").val(response.data.root_path.path);
text = `<ul class="tree-nested d-block" id="${path}ul">`; let text = `<ul class="tree-nested d-block" id="${path}ul">`;
Object.entries(response.data).forEach(([key, value]) => { Object.entries(response.data).forEach(([key, value]) => {
if (key === "root_path" || key === "db_stats") { if (key === "root_path" || key === "db_stats") {
//continue is not valid in for each. Return acts as a continue. //continue is not valid in for each. Return acts as a continue.
@ -120,7 +120,7 @@ function process_tree_response(response) {
console.log("Bad") console.log("Bad")
} }
var toggler = document.getElementById(path + "span"); let toggler = document.getElementById(path + "span");
if (toggler.classList.contains('files-tree-title')) { if (toggler.classList.contains('files-tree-title')) {
document.getElementById(path + "span").addEventListener("click", function caretListener() { document.getElementById(path + "span").addEventListener("click", function caretListener() {