mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	* Initial work on new search backend * Clean up search backends * Return only the most relevant result per object * Clear any pre-existing cached entries on cache() * #6003: Implement global search functionality for custom field values * Tweak field weights & document guidance * Extend search() to accept a lookup type * Move get_registry() out of SearchBackend * Enforce object permissions when returning search results * Add indexers for remaining models * Avoid calling remove() on non-cacheable objects * Use new search backend by default * Extend search backend to filter by object type * Clean up search view form * Enable specifying lookup logic * Add indexes for value field * Remove object type selector from search bar * Introduce SearchTable and enable HTMX for results * Enable pagination * Remove legacy search backend * Cleanup * Use a UUID for CachedValue primary key * Refactoring search methods * Define max search results limit * Extend reindex command to support specifying particular models * Add clear() and size to SearchBackend * Optimize bulk caching performance * Highlight matched portion of field value * Performance improvements for reindexing * Started on search tests * Cleanup & docs * Documentation updates * Clean up SearchIndex * Flatten search registry to register by app_label.model_name * Clean up search backend classes * Clean up RestrictedGenericForeignKey and RestrictedPrefetch * Resolve migrations conflict
		
			
				
	
	
		
			39 lines
		
	
	
		
			1016 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1016 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% extends 'base/layout.html' %}
 | 
						|
{% load helpers %}
 | 
						|
{% load form_helpers %}
 | 
						|
{% load render_table from django_tables2 %}
 | 
						|
 | 
						|
{% block title %}Search{% endblock %}
 | 
						|
 | 
						|
{% block tabs %}
 | 
						|
  <ul class="nav nav-tabs px-3">
 | 
						|
    <li class="nav-item" role="presentation">
 | 
						|
      <button class="nav-link active" type="button" role="tab">
 | 
						|
        Results
 | 
						|
      </button>
 | 
						|
    </li>
 | 
						|
  </ul>
 | 
						|
{% endblock tabs %}
 | 
						|
 | 
						|
{% block content %}
 | 
						|
  <div class="row px-3">
 | 
						|
    <div class="col col-6 offset-3 py-3">
 | 
						|
      <form action="{% url 'search' %}" method="get" class="form form-horizontal">
 | 
						|
        {% render_form form %}
 | 
						|
        <div class="text-end">
 | 
						|
          <button type="submit" class="btn btn-primary">
 | 
						|
            <span class="mdi mdi-magnify" aria-hidden="true"></span> Search
 | 
						|
          </button>
 | 
						|
        </div>
 | 
						|
      </form>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
  <div class="row px-3">
 | 
						|
    <div class="card">
 | 
						|
      <div class="card-body" id="object_list">
 | 
						|
        {% include 'htmx/table.html' %}
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
{% endblock content %}
 |