forked from lmenezes/cerebro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview.html
288 lines (287 loc) · 14 KB
/
overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<div ng-show="nodes">
<div ng-include src="'stats.html'"></div>
<div class="row">
<div class="col-lg-4">
<div class="row">
<div class="col-lg-6 col-sm-6 form-group">
<input type="text" ng-model="paginator.filter.name" class="form-control form-control-sm"
ng-model-options='{ debounce: 250 }'
placeholder="filter indices by name or aliases">
</div>
<div class="col-lg-3 col-sm-3 col-xs-6 form-group">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="paginator.filter.closed"> closed ({{closed_indices}})
</label>
</div>
</div>
<div class="col-lg-3 col-sm-3 col-xs-6 form-group">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="paginator.filter.special"> .special ({{special_indices}})
</label>
</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="row">
<div class="col-lg-6 col-sm-6 form-group">
<input type="text" ng-model="nodes_filter.name" class="form-control form-control-sm"
placeholder="filter nodes by name">
</div>
</div>
</div>
<div class="col-lg-4 form-group">
<ng-pagination page="page" paginator="paginator" label="'selected indices'"></ng-pagination>
</div>
</div>
<table class="table table-bordered table-condensed table-rounded table-inverse shard-map noselect">
<thead>
<tr>
<td>
<div class="row">
<div class="col-lg-3 col-md-6">
<i class="fa fa-lock fa-2x table-control red normal-action" title="enable shard allocation" ng-click="enableShardAllocation()"
ng-hide="shardAllocation"></i>
<i class="fa fa-unlock fa-2x table-control normal-action" title="disable shard allocation" ng-click="disableShardAllocation()"
ng-show="shardAllocation"></i>
</div>
<div class="col-lg-3 col-md-6">
<i class="fa fa-expand fa-2x normal-action table-control" ng-hide="expandedView"
title="expand view" ng-click="expandedView = true"></i>
<i class="fa fa-compress fa-2x normal-action table-control" ng-show="expandedView"
title="condense view" ng-click="expandedView = false"></i>
</div>
<div class="col-lg-3 col-md-6">
<i class="fa fa-sort-alpha-asc fa-2x normal-action table-control" title="sort ascending"
ng-show="indices_filter.asc" ng-click="indices_filter.asc = false"></i>
<i class="fa fa-sort-alpha-desc fa-2x normal-action table-control" title="sort descending"
ng-hide="indices_filter.asc" ng-click="indices_filter.asc = true"></i>
</div>
<div class="col-lg-3 col-md-6">
<div class="dropdown">
<span class="title normal-action" type="button" id="dropcluster" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" title="more options">
<i class="fa fa-caret-down fa-2x table-control"></i>
</span>
<ul class="dropdown-menu" aria-labelledby="dropcluster">
<li ng-click="closeIndices()" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-folder"> </i> close selected</a>
</li>
<li ng-click="openIndices()" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-folder-open"> </i> open selected</a>
</li>
<li ng-click="forceMerges()" wtarget="_self">
<a target="_self"><i class="fa fa-fw fa-wrench"> </i> force merge selected</a>
</li>
<li ng-click="refreshIndices()" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-refresh"> </i> refresh selected</a>
</li>
<li ng-click="flushIndices()" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-gavel"> </i> flush selected</a>
</li>
<li ng-click="clearIndicesCache()" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-circle-o"> </i> clear selected caches</a>
</li>
<li class="divider" role="separator">
</li>
<li ng-click="deleteIndices()" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-trash red"> </i> delete selected</a>
</li>
</ul>
</div>
</div>
</div>
</td>
<td ng-repeat="index in page.elements track by $index" ng-class="{'closed-index': index.closed}">
<div ng-show="index">
<div class="dropdown">
<span class="title normal-action" type="button" id="drop_{{index.name}}" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fa fa-caret-down pull-right"></i>{{index.name}}
</span>
<ul class="dropdown-menu" aria-labelledby="drop_{{index.name}}">
<li ng-click="getIndexSettings(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-info-circle"> </i> show settings</a>
</li>
<li ng-click="getIndexMapping(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-code"> </i> show mappings</a>
</li>
<li ng-click="indexStats(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-info"> </i> show stats</a>
</li>
<li ng-show="index.closed" ng-click="openIndex(index.name)" data-toggle="modal" href="#confirm_dialog"
target="_self">
<a target="_self"><i class="fa fa-fw fa-folder-open"> </i> open index</a>
</li>
<li ng-hide="index.closed" ng-click="closeIndex(index.name)" data-toggle="modal" href="#confirm_dialog"
target="_self">
<a target="_self"><i class="fa fa-fw fa-folder"> </i> close index</a>
</li>
<li ng-click="forceMerge(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-wrench"> </i> force merge</a>
</li>
<li ng-click="refreshIndex(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-refresh"> </i> refresh index</a>
</li>
<li ng-click="flushIndex(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-gavel"> </i> flush index</a>
</li>
<li ng-click="clearIndexCache(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-circle-o"> </i> clear cache</a>
</li>
<li ng-click="showIndexSettings(index.name)">
<a target="_self"><i class="fa fa-fw fa-cog"> </i> index settings</a>
</li>
<li class="divider"></li>
<li ng-click="deleteIndex(index.name)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-trash red"> </i> delete index</a>
</li>
</ul>
</div>
<div class="subtitle" ng-show="index.aliases.length">
<div class="title">
<i class="fa fa-tag"></i> {{index.aliases[0]}}
<span ng-show="index.aliases.length > 1">(+{{index.aliases.length - 1}})</span>
</div>
</div>
<div class="detail">
<span ng-hide="index.closed">
<span><small>shards: {{index.num_shards}} * {{index.num_replicas + 1}}|</small></span>
<span><small>docs: {{index.doc_count | number}} |</small></span>
<span><small>size: {{index.size_in_bytes | bytes}}</small></span>
</span>
<span ng-show="index.closed">
<span><small><i>index closed</i></small></span>
</span>
</div>
</div>
</td>
</tr>
</thead>
<tbody>
<tr ng-show="unassigned_shards > 0 || relocating_shards > 0 || initializing_shards > 0">
<td>
<div class="subtitle" ng-show="unassigned_shards > 0">
<i class="fa fa-warning alert-warning"> </i> {{unassigned_shards}} unassigned shards
</div>
<div class="subtitle" ng-show="relocating_shards > 0">
<i class="fa fa-refresh fa-spin"> </i> {{relocating_shards}} relocating shards
</div>
<div class="subtitle" ng-show="initializing_shards > 0">
<i class="fa fa-spinner fa-spin"> </i> {{initializing_shards}} initializing shards
</div>
<div>
<span class="normal-action" ng-show="indices_filter.healthy" ng-click="indices_filter.healthy = false"><i><small>show only affected indices</small></i></span>
<span class="normal-action" ng-hide="indices_filter.healthy" ng-click="indices_filter.healthy = true"><i><small>show all indices</small></i></span>
</div>
</td>
<td ng-repeat="index in page.elements track by $index">
<span ng-repeat="shard in index.shards.unassigned | orderBy:'shard' track by $index">
<span class="shard shard-unassigned">
<small>{{shard.shard}}</small>
</span>
</span>
</td>
</tr>
<tr ng-repeat="node in nodes | orderBy:'name' track by $index">
<td>
<div class="row">
<div class="col-lg-12">
<div class="node-badges title">
<div ng-show="node.master">
<i ng-show="node.current_master" class="fa fa-fw fa-star" title="current master"></i>
<i ng-show="!node.current_master" class="fa fa-fw fa-star-o" title="master eligible"></i>
</div>
<div ng-show="node.data">
<i class="fa fa-fw fa-hdd-o" title="data node"></i>
</div>
<div ng-show="node.ingest">
<i class="fa fa-fw fa-crop" title="ingest node"></i>
</div>
</div>
<div class="node-info">
<div class="title">
<span class="normal-action" type="button" ng-click="nodeStats(node.id)" data-toggle="modal"
href="#confirm_dialog" target="_self">
{{node.name}}
</span>
</div>
<div>
<small>{{node.host}}</small>
</div>
</div>
</div>
</div>
<div class="row row-condensed">
<div class="col-lg-3 col-condensed">
<ng-progress
value="node.heap.used_percent"
max="100"
text="'heap'"
tooltip="'used: ' + (node.heap.used | bytes) + '\nmax: ' + (node.heap.max | bytes)"
/>
</div>
<div class="col-lg-3 col-condensed">
<ng-progress
value="node.disk.used_percent"
max="100"
text="'disk'"
tooltip="'free: ' + (node.disk.free | bytes) + '\ntotal: ' + (node.disk.total | bytes)"
/>
</div>
<div class="col-lg-3 col-condensed">
<ng-progress
value="node.cpu_percent"
max="100"
text="'cpu'"
tooltip="'process cpu: ' + node.cpu_percent + '%'"
/>
</div>
<div class="col-lg-3 col-condensed">
<ng-progress
value="node.load_average"
max="node.available_processors"
text="'load'"
tooltip="'1min avg.: ' + (node.load_average | number:2)"
/>
</div>
</div>
<div ng-show="expandedView" class="node-labels">
<span class="label label-details">JVM: {{node.jvm_version}}</span>
<span class="label label-details">ES: {{node.es_version}}</span>
</div>
</td>
<td ng-repeat="index in page.elements track by $index">
<span ng-repeat="shard in index.shards[node.id] | orderBy:'shard' track by $index">
<span class="dropdown">
<span class="shard shard-{{shard.state | lowercase}} normal-action"
ng-class="{'shard-replica': !shard.primary && shard.node}"
data-toggle="dropdown"
id="{{shard.shard}}_{{shard.node}}_{{shard.index}}">
<small>{{shard.shard}}</small>
</span>
<ul class="dropdown-menu"
aria-labelledby="{{shard.shard}}_{{shard.node}}_{{shard.index}}">
<li ng-click="shardStats(shard.index, shard.node, shard.shard)" data-toggle="modal" href="#confirm_dialog" target="_self">
<a target="_self"><i class="fa fa-fw fa-info-circle"> </i> display shard stats</a>
</li>
<li ng-click="select(shard)" ng-hide="isSelected(shard)">
<a target="_self"><i class="fa fa-fw fa-arrows"> </i> select for relocation</a>
</li>
<li ng-click="select()" ng-show="isSelected(shard)">
<a target="_self"><i class="fa fa-fw fa-arrows"> </i> unselect for relocation</a>
</li>
</ul>
</span>
</span>
<span class="shard shard-spot normal-action" ng-click="relocateShard(node)"
ng-show="canReceiveShard(index, node)">
<i class="fa fa-download"></i>
</span>
</td>
</tr>
</tbody>
</table>
</div>