diff --git a/.gitignore b/.gitignore index bc5ae94..62be209 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ app/scanned.db *.xml **/*.pyc +**/*.swp diff --git a/app/static/css/style.css b/app/static/css/style.css index a2019f9..c4cece9 100755 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -41,6 +41,9 @@ tbody tr:hover td { cursor: pointer; } +tbody tr.active td { + background-color: #FFEFC6; +} table tr:last-child td:first-child { border-bottom-left-radius: 10px; diff --git a/app/static/js/table.js b/app/static/js/table.js index b327d01..283e159 100644 --- a/app/static/js/table.js +++ b/app/static/js/table.js @@ -1,20 +1,9 @@ -function filter_ports(filter) { - let portCol = document.querySelectorAll("tbody tr td:last-child"); - portCol.forEach((item) => { - if(!new RegExp(filter).test(item.innerText)){ - item.parentNode.style.display = "none"; - } else { - item.parentNode.style.display = "table-row"; - } - }); -} - -document.querySelector("#ports").addEventListener("keyup", (event) => { - if (event.key === "Enter") { - filter_ports(event.srcElement.value); - } -}); - function count_rows() { return document.querySelectorAll('tr:not([style*="display:none"]):not([style*="display: none"])').length; -} \ No newline at end of file +} + +document.querySelectorAll("tbody tr").forEach(function(elem) { + elem.addEventListener("click", function() { + elem.classList.toggle('active'); + }); +}); \ No newline at end of file diff --git a/app/templates/.base.html.swp b/app/templates/.base.html.swp deleted file mode 100644 index e64c759..0000000 Binary files a/app/templates/.base.html.swp and /dev/null differ diff --git a/app/templates/404.html b/app/templates/404.html index ec83c23..ca65a3d 100644 --- a/app/templates/404.html +++ b/app/templates/404.html @@ -24,5 +24,5 @@ {% block main %}
That page doesn't even exist.
-Why don't you just go back home?
+Why don't you just go back home?
{% endblock %} \ No newline at end of file diff --git a/app/templates/home.html b/app/templates/home.html index 28d3709..e5c12c6 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -7,26 +7,26 @@| OS - | HOSTNAME - | ADDRESS - | + | |
|---|---|---|---|---|
![]() |
{{ target.hostname }} | {{ target.address }} | -{{ target.ports }} | +{{ target.ports[1:-1]|replace('|', ', ') }} |