Make more fields searchable and fix tags loading without results

This commit is contained in:
2022-08-09 07:20:30 +01:00
parent a7ee1d531f
commit 89b38111cd
2 changed files with 34 additions and 7 deletions

View File

@@ -26,11 +26,7 @@
inputTags.BulmaTagsInput().on('after.remove', function(item) {
var spl = item.split(": ");
var field = spl[0];
try {
var value = JSON.parse(spl[1]);
} catch {
var value = spl[1].trim();
}
var value = spl[1].trim();
populateSearch(field, value);
});
}
@@ -76,7 +72,7 @@
// }
if (field == "src") {
document.getElementById("source").selectedIndex = 0;
document.getElementById("source").selectedIndex = 2;
}
if (queryElement.value.startsWith(" AND ")) {
queryElement.value = queryElement.value.replace(" AND ", "");
@@ -370,6 +366,10 @@
{% endif %} -->
{% if table %}
{% include 'ui/drilldown/table_results.html' %}
{% else %}
<script>
setupTags();
</script>
{% endif %}
</div>
</div>