From dbd3ca870db5ac068566b4e4a084ace16ec98d8b Mon Sep 17 00:00:00 2001 From: Vicente Olivert Riera Date: Tue, 30 Apr 2024 11:10:39 +0900 Subject: [PATCH] Fix search: Be more specific with v-pre By putting v-pre in parent elements in order to avoid putting more v-pre elements on some of its children, we have broken the search results. Let's avoid doing this and instance put v-pre on the elements that need them. --- promgen/templates/promgen/project_row.html | 16 ++++++++-------- promgen/templates/promgen/rule_block.html | 14 +++++++------- promgen/templates/promgen/search.html | 20 ++++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/promgen/templates/promgen/project_row.html b/promgen/templates/promgen/project_row.html index ee7880550..80d5eefe4 100644 --- a/promgen/templates/promgen/project_row.html +++ b/promgen/templates/promgen/project_row.html @@ -1,14 +1,14 @@ {% load i18n %} - {{ project.name }} + {{ project.name }} - +
{% for exporter in project.exporter_set.all %} - - - + + + {% empty %} @@ -21,11 +21,11 @@
{{ exporter.job }}{{ exporter.port }}{{ exporter.path }}{{ exporter.job }}{{ exporter.port }}{{ exporter.path }}
- +
{% for notifier in project.notifiers.all %} - - + + {% empty %} diff --git a/promgen/templates/promgen/rule_block.html b/promgen/templates/promgen/rule_block.html index 06b1ed879..c367d3e25 100644 --- a/promgen/templates/promgen/rule_block.html +++ b/promgen/templates/promgen/rule_block.html @@ -1,9 +1,9 @@ {% load i18n %} {% for rule in rule_list %} - + - + - + {% if toggle %} {% empty %} {% if show_empty %} - - + + {% endif %} {% endfor %} diff --git a/promgen/templates/promgen/search.html b/promgen/templates/promgen/search.html index 0c92d7a84..2d86473ce 100644 --- a/promgen/templates/promgen/search.html +++ b/promgen/templates/promgen/search.html @@ -12,7 +12,7 @@

Hosts

{% if service_list %} -
+
Services
{{ notifier.sender }}{{ notifier.show_value }}{{ notifier.sender }}{{ notifier.show_value }}
- {{ rule.name }} + {{ rule.name }} {% if rule.parent %} @@ -11,13 +11,13 @@ {% endif %}
    {% for k,v in rule.labels.items|dictsort:0 %} -
  • {{k}}:{{v}}
  • +
  • {{k}}:{{v}}
  • {% endfor %}
{{ rule.clause }}{{ rule.clause }}{{ rule.duration }}{{ rule.duration }} @@ -48,8 +48,8 @@
No rules found for {{show_empty}}
No rules found for {{show_empty}}
@@ -22,18 +22,18 @@

Hosts

{% for service in service_list %} - + @@ -61,7 +61,7 @@

Hosts

{% endif %} {% if farm_list %} -
+
Farms
{{ service.name }}{{ service.name }}
@@ -71,11 +71,11 @@

Hosts

{% for farm in farm_list %} - + @@ -83,7 +83,7 @@

Hosts

{{ farm.name }}{{ farm.name }}
{% for host in host_list %} - +
{{ host.name }}{{ host.name }}