forked from karmi/elasticsearch-paramedic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
196 lines (179 loc) · 6.71 KB
/
index.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
<!doctype html>
<html>
<head>
<title>Paramedic</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<link rel="stylesheet" href="css/libs/style.css">
<link rel="stylesheet" href="css/libs/cubism.css">
<link rel="stylesheet" href="css/app.css">
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
<header class="clearfix">
<script type="text/x-handlebars">
{{#with App.cluster}}
<section {{bindAttr class=":cluster_name status"}}>
<span class="label">Cluster Name</span>
<h1>{{cluster_name}}</h1>
<p>
<span class="label">Status</span>
<span {{bindAttr class=":status status"}}>{{status}}</span>
<span class="label">Nodes</span>
{{number_of_nodes}}
<span class="label">Docs</span>
{{#bind docs_count}}{{number_with_delimiter docs_count}}{{/bind}}
</p>
</section>
<section class="shards">
<p><span class="label">Shards</span></p>
<p><span class="label darker">Primary</span>
{{active_primary_shards}}</p>
<p><span class="label darker">Relocating</span>
{{relocating_shards}}</p>
</section>
<section class="shards">
<p><span class="label"> </span></p>
<p><span class="label darker">Initializing</span>
{{initializing_shards}}</p>
<p><span class="label darker">Unassigned</span>
{{unassigned_shards}}</p>
</section>
{{#with App }}
<section {{bindAttr class=":endpoint refresh_allowed:polling-active refreshing:polling-in-progress"}}>
{{/with}}
<p title="Change ElasticSearch URL">
<span class="label">URL</span>
{{view Ember.TextField valueBinding="App.elasticsearch_url" id="elasticsearch_url"}}
</p>
<p class="refresh">
<span class="icon-refresh"></span>
<span class="refresh-label">Refresh every</span>
<span class="refresh-controls">
{{view Ember.Select
contentBinding="App.refresh_intervals"
selectionBinding="App.refresh_interval"
optionLabelPath="content.label"
optionValuePath="content.value"}}
<button {{action "toggle" target="App.toggleRefreshAllowedButton"}}>{{App.toggleRefreshAllowedButton.text}}</button>
</span>
</p>
<p class="alerts">
{{view Ember.Checkbox id="sound-enabled" checkedBinding="App.sounds_enabled"}}
<label for="sound-enabled" class="dimmed">Sounds?</label>
</p>
</section>
{{/with}}
</script>
</header>
<section id="cubism">
<script type="text/x-handlebars">
<h2 class="label clear">
Stats
<small><a {{action "toggle" target="App.toggleChart"}}>{{App.toggleChart.text}}</a></small>
</h2>
</script>
<div id="chart"></div>
</section>
<h2 class="label">Nodes</h2>
<script type="text/x-handlebars">
<div id="nodes" class="clearfix">
{{#each App.nodes}}
<div {{bindAttr class=":node master"}}>
<h3><span {{bindAttr class="master:icon-star"}}></span> {{name}}</h3>
<div class="meta">
<p><span class="label">ID: </span>{{id}}</p>
<p><span class="label">IP: </span>{{http_address}}</p>
<p><span class="label">Host: </span>{{hostname}}</p>
<p><span class="label">Load: </span>{{load}}</p>
<p><span class="label">Size: </span>{{disk}}</p>
<p><span class="label">Docs: </span>{{#bind docs}}{{number_with_delimiter docs}}{{/bind}}</p>
<p><span class="label">Heap: </span>{{jvm_heap_used}}
<small class="dimmed" title="Heap max">/{{jvm_heap_max}}</small></p>
</div>
</div>
{{/each}}
</div>
</script>
<br>
<h2 class="label">Indices</h2>
<script type="text/x-handlebars">
<div id="indices">
{{#each index in App.indices.sorted}}
{{#with index}}
<div {{bindAttr class=":index :clearfix state show_detail:expanded"}}>
<div class="basic-info clearfix">
<h3><a {{bindAttr href="url"}} title="Browse Index">{{name}}</a></h3>
<div class="buttons">
{{#unless closed}}
<button {{action "showDetail" target="App.indices"}}>
{{#if show_detail}}Hide details{{else}}Show details{{/if}}
</button>
{{/unless}}
</div>
<div class="shards">
{{#each shards}}
<div {{bindAttr class=":shard primary state recovery.stage" title="state"}}>
{{name}}
</div>
{{/each}}
</div>
<div class="meta">
<p>
{{settings.number_of_shards}} shards /
{{settings.number_of_replicas}} replicas /
{{#bind docs}}{{number_with_delimiter docs}}{{/bind}} docs /
{{size}} /
{{indexing.index_time}} indexing /
{{search.query_time}} querying /
{{state}}
</p>
</div>
</div>
<!-- Shard Allocation -->
{{#if show_detail}}
<div class="extra-info shards clearfix">
{{#unless show_detail_loaded}}
<div class="loading">Waiting for data...</div>
{{/unless}}
{{#each nodes}}
<div class="node">
<h3>{{name}} <small>{{hostname}}</small></h3>
<div class="clearfix">
{{#each shards}}
<div {{bindAttr class=":shard primary state recovery.stage" title="state"}}>
<h3>{{name}}</h3>
<div class="meta">
<p>{{state}}/{{recovery.stage}}</p>
<p>
{{recovery.time}}
{{recovery.size}}
</p>
</div>
</div>
{{/each}}
</div>
</div>
{{/each}}
</div>
{{/if}}
</div>
{{/with}}
{{/each}}
</ul>
</script>
<audio id="alert-green" src="audio/alert-green.mp3"></audio>
<audio id="alert-yellow" src="audio/alert-yellow.mp3"></audio>
<audio id="alert-red" src="audio/alert-red.mp3"></audio>
<script src="js/libs/jquery-1.7.2.min.js"></script>
<!-- <script src="js/libs/ember-0.9.8.min.js"></script> -->
<script src="js/libs/ember-0.9.8.js"></script>
<script src="js/libs/colorbrewer.min.js"></script>
<script src="js/libs/d3.v2.min.js"></script>
<script src="js/libs/cubism.v1.js"></script>
<script src="js/libs/cubism.elasticsearch.js"></script>
<script src="js/app.js"></script>
<script src="js/cubism.js"></script>
</body>
</html>