mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 02:58:17 -06:00
Added dropdown for Saved Filters.
This commit is contained in:
parent
6ec7fe5fda
commit
6013cc16bf
BIN
netbox/project-static/dist/netbox.js
vendored
BIN
netbox/project-static/dist/netbox.js
vendored
Binary file not shown.
BIN
netbox/project-static/dist/netbox.js.map
vendored
BIN
netbox/project-static/dist/netbox.js.map
vendored
Binary file not shown.
@ -7,14 +7,9 @@ import {isTruthy} from "./util";
|
||||
*/
|
||||
function handleSavedFilterChange(event: Event): void {
|
||||
const savedFilter = event.currentTarget as HTMLSelectElement;
|
||||
const savedFilterLength = savedFilter.options.length;
|
||||
let baseUrl = savedFilter.baseURI.split("?")[0];
|
||||
let preFilter = "?";
|
||||
|
||||
if (savedFilterLength === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedOptions = Array.from(savedFilter.options)
|
||||
.filter(option => option.selected)
|
||||
.map(option => `filter_id=${option.value}`)
|
||||
|
@ -14,10 +14,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 d-print-none">
|
||||
<span id="savedfilter">{{ filter_form.filter_id }}</span>
|
||||
|
||||
<div class="col-sm-auto d-print-none">
|
||||
<label for="id_filter_id" class="my-1">{{ filter_form.filter_id.label }}</label>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-auto d-print-none">
|
||||
{{ filter_form.filter_id }}
|
||||
</div>
|
||||
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
{% if request.user.is_authenticated and table_modal %}
|
||||
|
Loading…
Reference in New Issue
Block a user