Skip to content

Commit 0b5ad68

Browse files
-
1 parent 3b8b63c commit 0b5ad68

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

templates/Embed/shard_reroute_cluster.html.twig renamed to templates/Embed/shard_reroute_cluster_embed.html.twig

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% import 'Import/app_import.html.twig' as appImport %}
2+
13
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#modal{{ modalReference }}">
24
{{ title }}
35
</button>
@@ -21,7 +23,18 @@
2123
<strong>{{ 'shard'|trans }}</strong><br>
2224
{{ row.number }}
2325
</p>
24-
26+
<p>
27+
<strong>{{ 'type'|trans }}</strong><br>
28+
{% if row.isPrimary %}
29+
{{ appImport.badge({'title': 'primary'|trans, 'context': 'true'}) }}
30+
{% else %}
31+
{{ appImport.badge({'title': 'replica'|trans, 'context': 'false'}) }}
32+
{% endif %}
33+
</p>
34+
<p>
35+
<strong>{{ 'state'|trans }}</strong><br>
36+
{{ appImport.badge({'title': row.state|trans, 'context': row.state}) }}
37+
</p>
2538
{% block content %}
2639
{% endblock %}
2740
</div>

templates/Modules/shard/shard_list.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
<td>
152152
{% if is_granted_shards_reroute and 'relocating' != row.state %}
153153
{% if nodesAvailable[row.index][row.number] is defined and 0 < nodesAvailable[row.index][row.number]|length and row.node %}
154-
{% embed 'Embed/shard_reroute_cluster.html.twig' with {'title': 'reroute_commands.move'|trans, 'form_action': path('shards_move', {'index': row.index, 'number': row.number})} %}
154+
{% embed 'Embed/shard_reroute_cluster_embed.html.twig' with {'title': 'reroute_commands.move'|trans, 'form_action': path('shards_move', {'index': row.index, 'number': row.number})} %}
155155
{% block content %}
156156
<p>
157157
<strong>{{ 'from_node'|trans }}</strong><br>
@@ -175,7 +175,7 @@
175175
{% endif %}
176176

177177
{% if row.node %}
178-
{% embed 'Embed/shard_reroute_cluster.html.twig' with {'title': 'reroute_commands.cancel'|trans, 'form_action': path('shards_cancel_allocation', {'index': row.index, 'number': row.number})} %}
178+
{% embed 'Embed/shard_reroute_cluster_embed.html.twig' with {'title': 'reroute_commands.cancel'|trans, 'form_action': path('shards_cancel_allocation', {'index': row.index, 'number': row.number})} %}
179179
{% block content %}
180180
<p>
181181
<strong>{{ 'node'|trans }}</strong><br>
@@ -190,7 +190,7 @@
190190
{% endif %}
191191

192192
{% if nodesAvailable[row.index][row.number] is defined and 0 < nodesAvailable[row.index][row.number]|length and 'unassigned' == row.state %}
193-
{% embed 'Embed/shard_reroute_cluster.html.twig' with {'title': 'reroute_commands.allocate_replica'|trans, 'form_action': path('shards_allocate_replica', {'index': row.index, 'number': row.number})} %}
193+
{% embed 'Embed/shard_reroute_cluster_embed.html.twig' with {'title': 'reroute_commands.allocate_replica'|trans, 'form_action': path('shards_allocate_replica', {'index': row.index, 'number': row.number})} %}
194194
{% block content %}
195195
<input type="hidden" name="redirect" value="{{ redirect_url }}">
196196
<div class="form-group mb-3">

0 commit comments

Comments
 (0)