blob: d16ab45644758b3657a6bfaf290010f313825998 [file] [log] [blame]
giof6ad2982024-08-23 17:42:49 +04001{{ define "header" }}
2<h1>Cluster - {{ .Cluster.Name }}</h1>
3{{ end }}
4
5{{ define "content" }}
gio8f290322024-09-21 15:37:45 +04006{{ $c := .Cluster }}
7<form action="/clusters/{{ $c.Name }}/remove" method="POST">
giof6ad2982024-08-23 17:42:49 +04008 <button type="submit" name="remove-cluster">remove cluster</button>
9</form>
gio8f290322024-09-21 15:37:45 +040010<form action="/clusters/{{ $c.Name }}/servers" method="POST" autocomplete="off">
giof6ad2982024-08-23 17:42:49 +040011 <details class="dropdown">
12 <summary id="type">worker</summary>
13 <ul>
14 <li>
15 <label>
16 <input type="radio" name="type" value="worker" checked />
17 worker
18 </label>
19 </li>
20 <li>
21 <label>
22 <input type="radio" name="type" value="controller" />
23 controller
24 </label>
25 </li>
26 </ul>
27 </details>
28 <input type="text" name="ip" placeholder="ip" />
29 <input type="text" name="port" placeholder="22 (optional)" />
30 <input type="text" name="user" placeholder="user" />
31 <input type="password" name="password" placeholder="password" />
32 <button type="submit" name="add-server">add server</button>
33</form>
gio8f290322024-09-21 15:37:45 +040034{{- if $c.StorageEnabled }}
35Supports persistent storage<br/>
36{{- else }}
37<form action="/clusters/{{ $c.Name }}/setup-storage" method="POST">
38 <button type="submit" name="remove-cluster">setup persistent storage</button>
39</form>
40{{- end }}
giof6ad2982024-08-23 17:42:49 +040041<table class="striped">
42 <thead>
43 <tr>
44 <th scope="col">type</th>
45 <th scope="col">hostname</th>
46 <th scope="col">ip</th>
47 <th scope="col">remove</th>
48 </tr>
49 </thead>
50 <tbody>
gio8f290322024-09-21 15:37:45 +040051 {{ range $s := $c.Controllers }}
giof6ad2982024-08-23 17:42:49 +040052 <tr>
53 <th>controller</th>
54 <th scope="row">{{ $s.Name }}</th>
55 <td>{{ $s.IP }} </td>
56 <td>
57 <form action="/clusters/{{ $c.Name }}/servers/{{ $s.Name }}/remove" method="POST">
58 <button type="submit">remove</button>
59 </form>
60 </td>
61 </tr>
62 {{ end }}
gio8f290322024-09-21 15:37:45 +040063 {{ range $s := $c.Workers }}
giof6ad2982024-08-23 17:42:49 +040064 <tr>
65 <th>worker</th>
66 <th scope="row">{{ $s.Name }}</th>
67 <td>{{ $s.IP }} </td>
68 <td>
69 <form action="/clusters/{{ $c.Name }}/servers/{{ $s.Name }}/remove" method="POST">
70 <button type="submit">remove</button>
71 </form>
72 </td>
73 </tr>
74 {{ end }}
75 </tbody>
76</table>
77{{ end }}