"Fossies" - the Fresh Open Source Software Archive 
Member "phpMyAdmin-5.1.0-all-languages/templates/columns_definitions/partitions.twig" (24 Feb 2021, 8066 Bytes) of package /linux/www/phpMyAdmin-5.1.0-all-languages.zip:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 {% set partition_options = [
2 '',
3 'HASH',
4 'LINEAR HASH',
5 'KEY',
6 'LINEAR KEY',
7 'RANGE',
8 'RANGE COLUMNS',
9 'LIST',
10 'LIST COLUMNS'
11 ] %}
12 {% set sub_partition_options = ['', 'HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY'] %}
13 {% set value_type_options = ['', 'LESS THAN', 'LESS THAN MAXVALUE', 'IN'] %}
14
15 <table class="pma-table" id="partition_table">
16 <tr class="vmiddle">
17 <td><label for="partition_by">{% trans 'Partition by:' %}</label></td>
18 <td>
19 <select name="partition_by" id="partition_by">
20 {% for option in partition_options %}
21 <option value="{{ option }}"
22 {%- if partition_details['partition_by'] == option %}
23 selected="selected"
24 {%- endif %}>
25 {{ option }}
26 </option>
27 {% endfor %}
28 </select>
29 </td>
30 <td>
31 (<input name="partition_expr" type="text"
32 placeholder="{% trans 'Expression or column list' %}"
33 value="{{ partition_details['partition_expr'] }}">)
34 </td>
35 </tr>
36 <tr class="vmiddle">
37 <td><label for="partition_count">{% trans 'Partitions:' %}</label></td>
38 <td colspan="2">
39 <input name="partition_count" type="number" min="2"
40 value="{{ partition_details['partition_count'] }}">
41 </td>
42 </tr>
43 {% if partition_details['can_have_subpartitions'] %}
44 <tr class="vmiddle">
45 <td><label for="subpartition_by">{% trans 'Subpartition by:' %}</label></td>
46 <td>
47 <select name="subpartition_by" id="subpartition_by">
48 {% for option in sub_partition_options %}
49 <option value="{{ option }}"
50 {%- if partition_details['subpartition_by'] == option %}
51 selected="selected"
52 {%- endif %}>
53 {{ option }}
54 </option>
55 {% endfor %}
56 </select>
57 </td>
58 <td>
59 (<input name="subpartition_expr" type="text"
60 placeholder="{% trans 'Expression or column list' %}"
61 value="{{ partition_details['subpartition_expr'] }}">)
62 </td>
63 </tr>
64 <tr class="vmiddle">
65 <td><label for="subpartition_count">{% trans 'Subpartitions:' %}</label></td>
66 <td colspan="2">
67 <input name="subpartition_count" type="number" min="2"
68 value="{{ partition_details['subpartition_count'] }}">
69 </td>
70 </tr>
71 {% endif %}
72 </table>
73 {% if partition_details['partition_count'] > 1 %}
74 <table class="pma-table" id="partition_definition_table">
75 <thead><tr>
76 <th>{% trans 'Partition' %}</th>
77 {% if partition_details['value_enabled'] %}
78 <th>{% trans 'Values' %}</th>
79 {% endif %}
80 {% if partition_details['can_have_subpartitions']
81 and partition_details['subpartition_count'] > 1 %}
82 <th>{% trans 'Subpartition' %}</th>
83 {% endif %}
84 <th>{% trans 'Engine' %}</th>
85 <th>{% trans 'Comment' %}</th>
86 <th>{% trans 'Data directory' %}</th>
87 <th>{% trans 'Index directory' %}</th>
88 <th>{% trans 'Max rows' %}</th>
89 <th>{% trans 'Min rows' %}</th>
90 <th>{% trans 'Table space' %}</th>
91 <th>{% trans 'Node group' %}</th>
92 </tr></thead>
93 {% for partition in partition_details['partitions'] %}
94 {% set rowspan = partition['subpartition_count'] is not empty
95 ? partition['subpartition_count'] + 1 : 2 %}
96 <tr>
97 <td rowspan="{{ rowspan }}">
98 <input type="text" name="{{ partition['prefix'] }}[name]"
99 value="{{ partition['name'] }}">
100 </td>
101 {% if partition_details['value_enabled'] %}
102 <td rowspan="{{ rowspan }}" class="vmiddle">
103 <select class="partition_value"
104 name="{{ partition['prefix'] }}[value_type]">
105 {% for option in value_type_options %}
106 <option value="{{ option }}"
107 {%- if partition['value_type'] == option %}
108 selected="selected"
109 {%- endif %}>
110 {{ option }}
111 </option>
112 {% endfor %}
113 </select>
114 <input type="text" class="partition_value"
115 name="{{ partition['prefix'] }}[value]"
116 value="{{ partition['value'] }}">
117 </td>
118 {% endif %}
119 </tr>
120
121 {% if partition['subpartitions'] is defined %}
122 {% set subpartitions = partition['subpartitions'] %}
123 {% else %}
124 {% set subpartitions = [partition] %}
125 {% endif %}
126
127 {% for subpartition in subpartitions %}
128 <tr>
129 {% if partition_details['can_have_subpartitions']
130 and partition_details['subpartition_count'] > 1 %}
131 <td>
132 <input type="text" name="{{ subpartition['prefix'] }}[name]"
133 value="{{ subpartition['name'] }}">
134 </td>
135 {% endif %}
136 <td>
137 <select name="{{ subpartition['prefix'] }}[engine]" aria-label="{% trans 'Storage engine' %}">
138 <option value=""></option>
139 {% for engine in storage_engines %}
140 <option value="{{ engine.name }}"{% if engine.comment is not empty %} title="{{ engine.comment }}"{% endif %}
141 {{- engine.name|lower == subpartition['engine']|lower ? ' selected' }}>
142 {{- engine.name -}}
143 </option>
144 {% endfor %}
145 </select>
146 </td>
147 <td>
148 <textarea name="{{ subpartition['prefix'] }}[comment]">
149 {{- subpartition['comment'] -}}
150 </textarea>
151 </td>
152 <td>
153 <input type="text" name="{{ subpartition['prefix'] }}[data_directory]"
154 value="{{ subpartition['data_directory'] }}">
155 </td>
156 <td>
157 <input type="text" name="{{ subpartition['prefix'] }}[index_directory]"
158 value="{{ subpartition['index_directory'] }}">
159 </td>
160 <td>
161 <input type="number" name="{{ subpartition['prefix'] }}[max_rows]"
162 value="{{ subpartition['max_rows'] }}">
163 </td>
164 <td>
165 <input type="number" min="0" name="{{ subpartition['prefix'] }}[min_rows]"
166 value="{{ subpartition['min_rows'] }}">
167 </td>
168 <td>
169 <input type="text" min="0" name="{{ subpartition['prefix'] }}[tablespace]"
170 value="{{ subpartition['tablespace'] }}">
171 </td>
172 <td>
173 <input type="text" name="{{ subpartition['prefix'] }}[node_group]"
174 value="{{ subpartition['node_group'] }}">
175 </td>
176 </tr>
177 {% endfor %}
178 {% endfor %}
179 </table>
180 {% endif %}