Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search: Be more specific with v-pre #506

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions promgen/templates/promgen/project_row.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{% load i18n %}
<tr>
<td v-pre><a href="{{project.get_absolute_url}}">{{ project.name }}</a></td>
<td><a href="{{project.get_absolute_url}}" v-pre>{{ project.name }}</a></td>

<td>
<table style="width: 100%" v-pre>
<table style="width: 100%">
{% for exporter in project.exporter_set.all %}
<tr {% if not exporter.enabled %}class="promgen-disabled" {% endif %}>
<td>{{ exporter.job }}</td>
<td>{{ exporter.port }}</td>
<td>{{ exporter.path }}</td>
<td v-pre>{{ exporter.job }}</td>
<td v-pre>{{ exporter.port }}</td>
<td v-pre>{{ exporter.path }}</td>
</tr>
{% empty %}
<tr>
Expand All @@ -21,11 +21,11 @@
</td>

<td>
<table style="width: 100%" v-pre>
<table style="width: 100%">
{% for notifier in project.notifiers.all %}
<tr>
<td title="Added by: {{notifier.owner}}">{{ notifier.sender }}</td>
<td>{{ notifier.show_value }}</td>
<td title="Added by: {{notifier.owner}}" v-pre>{{ notifier.sender }}</td>
<td v-pre>{{ notifier.show_value }}</td>
</tr>
{% empty %}
<tr>
Expand Down
14 changes: 7 additions & 7 deletions promgen/templates/promgen/rule_block.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{% load i18n %}

{% for rule in rule_list %}
<tr class="{% if not rule.enabled %}promgen-disabled{% endif %} {% if collapse %}active collapse {{ collapse }}{{overwrite_id}}{% endif %}" v-pre>
<tr class="{% if not rule.enabled %}promgen-disabled{% endif %} {% if collapse %}active collapse {{ collapse }}{{overwrite_id}}{% endif %}">
<td>
<a title="{{rule.description}}" data-toggle="tooltip" data-placement="right" href="{% url 'rule-detail' rule.id %}">{{ rule.name }}</a>
<a title="{{rule.description}}" data-toggle="tooltip" data-placement="right" href="{% url 'rule-detail' rule.id %}" v-pre>{{ rule.name }}</a>
{% if rule.parent %}
<a class="pull-right" title="{% trans "View Parent" %}" href="{% url 'rule-detail' rule.parent.id %}">
<span class="glyphicon glyphicon-upload"></span>
</a>
{% endif %}
<ul>
{% for k,v in rule.labels.items|dictsort:0 %}
<li class="label label-primary">{{k}}:{{v}}</li>
<li class="label label-primary" v-pre>{{k}}:{{v}}</li>
{% endfor %}
</ul>
</td>
<td class="promgen-clause">{{ rule.clause }}</td>
<td class="promgen-clause" v-pre>{{ rule.clause }}</td>

<td>{{ rule.duration }}</td>
<td v-pre>{{ rule.duration }}</td>

{% if toggle %}
<td style="white-space: nowrap">
Expand Down Expand Up @@ -48,8 +48,8 @@
</tr>
{% empty %}
{% if show_empty %}
<tr v-pre>
<td colspan=5>No rules found for {{show_empty}}</td>
<tr>
<td colspan=5 v-pre>No rules found for {{show_empty}}</td>
</tr>
{% endif %}
{% endfor %}
20 changes: 10 additions & 10 deletions promgen/templates/promgen/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>Hosts</h1>
</ol>

{% if service_list %}
<div class="panel panel-default" v-pre>
<div class="panel panel-default">
<div class="panel-heading">Services</div>
<table class="table table-bordered table-condensed">
<tr>
Expand All @@ -22,18 +22,18 @@ <h1>Hosts</h1>
</tr>
{% for service in service_list %}
<tr>
<td><a href="{% url 'service-detail' service.id %}">{{ service.name }}</a></td>
<td><a href="{% url 'service-detail' service.id %}" v-pre>{{ service.name }}</a></td>
<td>
<ul class="list-unstyled">
{% for project in service.project_set.all %}
<li><a href="{% url 'project-detail' project.id %}">{{ project.name }}</a></li>
<li><a href="{% url 'project-detail' project.id %}" v-pre>{{ project.name }}</a></li>
{% endfor %}
</ul>
</td>
<td>
<ul class="list-unstyled">
{% for rule in service.rule_set.all %}
<li><a href="{% url 'rule-detail' rule.id %}">{{ rule.name }}</a></li>
<li><a href="{% url 'rule-detail' rule.id %}" v-pre>{{ rule.name }}</a></li>
{% endfor %}
</ul>
</td>
Expand Down Expand Up @@ -61,7 +61,7 @@ <h1>Hosts</h1>
{% endif %}

{% if farm_list %}
<div class="panel panel-default" v-pre>
<div class="panel panel-default">
<div class="panel-heading">Farms</div>
<table class="table table-bordered table-condensed">
<tr>
Expand All @@ -71,19 +71,19 @@ <h1>Hosts</h1>
</tr>
{% for farm in farm_list %}
<tr>
<td><a href="{% url 'farm-detail' farm.id %}">{{ farm.name }}</a></td>
<td><a href="{% url 'farm-detail' farm.id %}" v-pre>{{ farm.name }}</a></td>
<td>
<ul class="list-unstyled">
{% for project in farm.project_set.all %}
<li><a href="{% url 'project-detail' project.id %}">{{ project.name }}</a></li>
<li><a href="{% url 'project-detail' project.id %}" v-pre>{{ project.name }}</a></li>
{% endfor %}
</ul>
</td>
<td>
<ul class="list-unstyled">
{% for host in farm.host_set.all %}
<li>
<a href="{% url 'host-detail' host.name %}">{{ host.name }}</a>
<a href="{% url 'host-detail' host.name %}" v-pre>{{ host.name }}</a>
<a
@click="setSilenceDataset"
class="btn btn-warning btn-xs"
Expand All @@ -100,12 +100,12 @@ <h1>Hosts</h1>
{% endif %}

{% if host_list %}
<div class="panel panel-default" v-pre>
<div class="panel panel-default">
<div class="panel-heading">Hosts</div>
<table class="table">
{% for host in host_list %}
<tr>
<td><a href="{% url 'host-detail' host.name %}">{{ host.name }}</a></td>
<td><a href="{% url 'host-detail' host.name %}" v-pre>{{ host.name }}</a></td>
<td><a
@click="setSilenceDataset"
class="btn btn-warning btn-xs"
Expand Down