diff --git a/lanscape/core/net_tools.py b/lanscape/core/net_tools.py index e66a9b7..a41961f 100644 --- a/lanscape/core/net_tools.py +++ b/lanscape/core/net_tools.py @@ -98,6 +98,10 @@ def get_metadata(self): if self.alive: self.hostname = self._get_hostname() self._get_mac_addresses() + if not self.manufacturer: + self.manufacturer = self._get_manufacturer( + self.get_mac() + ) # Fallback for pydantic v1: use dict() and enrich output if not _PYD_V2: diff --git a/lanscape/ui/static/css/style.css b/lanscape/ui/static/css/style.css index 3de1c74..c2a6fbb 100644 --- a/lanscape/ui/static/css/style.css +++ b/lanscape/ui/static/css/style.css @@ -66,13 +66,16 @@ body:has(.submodule) footer { #header { background-color: var(--primary-bg); - padding: 8px 20px; + padding: 8px 2%; margin: 0; display: block; position: relative; box-shadow: 0 0 10px var(--box-shadow); width: 100vw; } +#header .title { + font-size: 36px; +} footer { position: sticky; @@ -163,7 +166,12 @@ details { #scan-form { - width: 500px; + width: 60vw; + margin: 0; + min-width: 300px; + max-width: 700px; +} +#scan-form .form-group { margin: 0; } #scan-form label { @@ -304,6 +312,9 @@ details { } #advanced-modal label { font-size: 12px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } #advanced-modal .form-check { width: fit-content; @@ -447,8 +458,10 @@ button { #scan-form #scan-submit { border: none; - padding: 10px 20px; - margin-top: 15px; + padding: 10px 3%; + margin: 0 15px; + min-width: 55px; + height: 42px; } /* Button Styling */ @@ -657,10 +670,6 @@ input[type="range"] { .table thead tr th.detail-col { width: 30px; - /* - background-color: var(--body-bg); - border: 1px solid var(--text-almost-hidden); - */ } .table td:has(.info-icon-container) { width: 30px; @@ -709,6 +718,12 @@ input[type="range"] { span.alt { color: var(--text-accent-color); } +span.no-wrap { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: block; +} .colorful-buttons a{ margin:2px; color: var(--text-color); diff --git a/lanscape/ui/static/js/core.js b/lanscape/ui/static/js/core.js index 50f8950..4046057 100644 --- a/lanscape/ui/static/js/core.js +++ b/lanscape/ui/static/js/core.js @@ -1,10 +1,12 @@ $(document).ready(function() { rightSizeDocLayout(0,showFooter); initTooltips(); + adjustNoWrap(); }) $(window).on('resize', function() { rightSizeDocLayout(); + adjustNoWrap(); }); @@ -36,4 +38,16 @@ function initTooltips() { tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) }) +} + +/* + An imperfect approach to adjusting + text field width within a table +*/ +function adjustNoWrap() { + $('.no-wrap').width(0); + $('.no-wrap').each(function() { + var parentWidth = $(this).parent().width(); + $(this).width(parseInt(parentWidth)); + }); } \ No newline at end of file diff --git a/lanscape/ui/static/js/quietReload.js b/lanscape/ui/static/js/quietReload.js index 564d5fd..11aaad9 100644 --- a/lanscape/ui/static/js/quietReload.js +++ b/lanscape/ui/static/js/quietReload.js @@ -8,6 +8,9 @@ function quietReload() { var newDoc = new DOMParser().parseFromString(data, 'text/html'); // replace current body with the new body content $('body').html($(newDoc.body).html()); + if (typeof adjustNoWrap === 'function') { + adjustNoWrap(); + } }); } setTimeout(function() { diff --git a/lanscape/ui/templates/main.html b/lanscape/ui/templates/main.html index 7939b0e..145d806 100644 --- a/lanscape/ui/templates/main.html +++ b/lanscape/ui/templates/main.html @@ -3,45 +3,43 @@ {% block content %} - +
{{ device.ip }}
{% if device.hostname %} -
{{device.hostname}}
+ {{device.hostname}} {% endif %} - +
{{ device.mac_addr or 'Unknown' }}
{% if device.manufacturer %} -
{{device.manufacturer}}
+ {{device.manufacturer}} {% endif %} - {{ device.ports | join(", ") }} - + {{ device.ports | join(", ") }} + {% if device.stage == 'complete' %} complete {% elif device.stage == 'found' %} diff --git a/lanscape/ui/templates/scan/ip-table.html b/lanscape/ui/templates/scan/ip-table.html index ccab64e..1009366 100644 --- a/lanscape/ui/templates/scan/ip-table.html +++ b/lanscape/ui/templates/scan/ip-table.html @@ -9,10 +9,10 @@ - IP / Host - MAC / Manufacturer - Open Ports - Stage + IP / Host + MAC / Manufacturer + Open Ports + Stage