Further improve detail display and work on inline latency display

This commit is contained in:
2026-02-15 20:08:02 +00:00
parent 1ebd565f44
commit 63af5d234e
17 changed files with 1223 additions and 239 deletions

View File

@@ -51,12 +51,46 @@
</form>
{% endif %}
<div class="osint-results-meta">
<div class="osint-results-meta-left">
<div class="dropdown is-hoverable" id="{{ osint_table_id }}-columns-dropdown">
<div class="dropdown-trigger">
<button class="button is-small is-light" aria-haspopup="true" aria-controls="{{ osint_table_id }}-columns-menu">
<span>Show/Hide Fields</span>
<span class="icon is-small"><i class="fa-solid fa-angle-down"></i></span>
</button>
</div>
<div class="dropdown-menu" id="{{ osint_table_id }}-columns-menu" role="menu">
<div class="dropdown-content">
{% for column in osint_columns %}
<a
class="dropdown-item osint-col-toggle"
data-col-index="{{ forloop.counter0 }}"
href="#"
onclick="return false;">
<span class="icon is-small"><i class="fa-solid fa-check"></i></span>
<span>{{ column.label }}</span>
</a>
{% endfor %}
</div>
</div>
</div>
<button class="button is-small is-light" type="button" disabled>
<span class="icon is-small"><i class="fa-solid fa-database"></i></span>
<span>Static</span>
</button>
</div>
<p class="osint-results-count">
fetched {{ osint_result_count }} result{% if osint_result_count != 1 %}s{% endif %}
</p>
</div>
<div class="table-container osint-results-table-wrap">
<table class="table is-fullwidth is-hoverable osint-results-table">
<thead>
<tr>
{% for column in osint_columns %}
<th>
<th data-osint-col="{{ forloop.counter0 }}" class="osint-col-{{ forloop.counter0 }}">
{% if column.sortable %}
<a
class="osint-sort-link"
@@ -87,7 +121,7 @@
{% for row in osint_rows %}
<tr>
{% for cell in row.cells %}
<td>
<td data-osint-col="{{ forloop.counter0 }}" class="osint-col-{{ forloop.counter0 }}">
{% if cell.kind == "id_copy" %}
<a
class="button is-small has-text-grey"
@@ -219,7 +253,95 @@
</nav>
{% endif %}
<p class="help has-text-grey">
{{ osint_result_count }} result{% if osint_result_count != 1 %}s{% endif %}
</p>
<style>
#{{ osint_table_id }} .osint-results-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.6rem;
flex-wrap: wrap;
margin-bottom: 0.6rem;
}
#{{ osint_table_id }} .osint-results-meta-left {
display: inline-flex;
align-items: center;
gap: 0.42rem;
flex-wrap: wrap;
}
#{{ osint_table_id }} .osint-results-count {
margin: 0;
color: #6c757d;
font-size: 0.75rem;
}
#{{ osint_table_id }} .osint-col-toggle .icon {
color: #3273dc;
}
#{{ osint_table_id }} .osint-col-toggle.is-hidden-col .icon {
color: #b5b5b5;
}
</style>
<script>
(function () {
const tableId = "{{ osint_table_id|escapejs }}";
const shell = document.getElementById(tableId);
if (!shell) {
return;
}
const storageKey = "gia_osint_hidden_cols_v1:" + tableId;
let hidden = [];
try {
hidden = JSON.parse(localStorage.getItem(storageKey) || "[]");
} catch (e) {
hidden = [];
}
if (!Array.isArray(hidden)) {
hidden = [];
}
hidden = hidden.map(String);
const applyVisibility = function () {
const hiddenSet = new Set(hidden);
shell.querySelectorAll("[data-osint-col]").forEach(function (node) {
const idx = String(node.getAttribute("data-osint-col") || "");
node.style.display = hiddenSet.has(idx) ? "none" : "";
});
shell.querySelectorAll(".osint-col-toggle").forEach(function (toggle) {
const idx = String(toggle.getAttribute("data-col-index") || "");
const isHidden = hiddenSet.has(idx);
toggle.classList.toggle("is-hidden-col", isHidden);
const icon = toggle.querySelector("i");
if (icon) {
icon.className = isHidden ? "fa-solid fa-xmark" : "fa-solid fa-check";
}
});
};
const persist = function () {
try {
localStorage.setItem(storageKey, JSON.stringify(hidden));
} catch (e) {
// Ignore storage failures.
}
};
shell.querySelectorAll(".osint-col-toggle").forEach(function (toggle) {
toggle.addEventListener("click", function () {
const idx = String(toggle.getAttribute("data-col-index") || "");
if (!idx) {
return;
}
if (hidden.includes(idx)) {
hidden = hidden.filter(function (item) { return item !== idx; });
} else {
hidden.push(idx);
}
persist();
applyVisibility();
});
});
applyVisibility();
})();
</script>
</div>