forked from lmenezes/cerebro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnect.html
76 lines (75 loc) · 2.29 KB
/
connect.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
<div class="row" style="padding-top: 80px; padding-bottom: 60px;">
<div class="col-xs-12 text-center">
<img src="img/logo.png" height="160px">
<h4>Cerebro
<small>{{appVersion}}</small>
</h4>
</div>
</div>
<div style="max-width: 400px; margin-left: auto; margin-right: auto">
<div class="text-center">
<span>
<p>
<span ng-show="connecting">
<i class="fa fa-fw fa-circle-o-notch fa-spin"> </i> Connecting...
</span>
<span class="text-danger" ng-show="feedback">
{{feedback}}
</span>
</p>
</span>
</div>
<div ng-hide="unauthorized">
<div ng-show="hosts.length > 0">
<table class="table">
<thead>
<tr>
<th>Known clusters</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="host in hosts | orderBy track by $index">
<td class="normal-action" ng-click="connect(host)">
<span>{{host}}</span>
</td>
</tr>
</tbody>
</table>
</div>
<form>
<div class="form-group">
<label for="host">Node address</label>
<input id="host" type="text" ng-model="host"
class="form-control form-control-sm"
placeholder="e.g.: http://localhost:9200"
ng-enter="connect(host)">
</div>
<button type="submit" class="btn btn-success pull-right"
ng-click="connect(host)"
ng-disabled="!host">
Connect
</button>
</form>
</div>
<div ng-show="unauthorized">
<form>
<div class="form-group">
<label for="username">Username</label>
<input id="username" type="text" ng-model="username"
class="form-control form-control-sm"
placeholder="admin"
ng-enter="authorize(host, username, password)">
</div>
<div class="form-group">
<label for="password">Password</label>
<input id="password" type="password" ng-model="password"
class="form-control form-control-sm"
ng-enter="authorize(host, username, password)">
</div>
<button type="submit" class="btn btn-success pull-right"
ng-click="authorize(host, username, password)">
Authenticate
</button>
</form>
</div>
</div>