1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00

fix(templates): the list pages search their rows as text, with one script

The list pages' search (filter-table.js) read what was typed as a
regular expression: a "(" or "[" stopped it with an error. It also
needed jQuery, while the instance list had its own script for the same
search. Both are now static/js/table_filter.js: plain text in any case,
the instance list's state list and host groups where a page has them,
remembered for a day as before. A group's header row is marked as one
(data-group-header) instead of being any row without a state.
This commit is contained in:
catborise 2026-10-25 22:59:36 +03:00
parent b4c999a22f
commit e5c7dc338d
14 changed files with 58 additions and 56 deletions

View file

@ -120,7 +120,7 @@ class StateTests(TestCase):
def test_the_list_offers_each_state_and_marks_each_row_and_host(self):
# static/js/instance_filter.js filters by these (test_instance_filter_js)
# static/js/table_filter.js filters by these (test_table_filter_js)
AppSettings.objects.filter(key="VIEW_INSTANCES_LIST_STYLE").update(value="grouped")
page = html.fromstring(self.get(self.admin, reverse("instances:index")))
options = page.xpath("//select[@id='state-filter']/option/text()")