containerlist.gohtml RawHistoryFolder
1<div class="flex flex-col p-4" hx-ext="response-targets">
2 <h1 class="text-lg md:text-xl font-bold text-gordonmascot-hblue">
3 {{index .Lang "manager" "content" "h1-containers"}}
4 </h1>
5 <table class="p-4 border-t-2 table-auto">
6 <thead>
7 <tr class="text-center text-gray-400">
8 <th>{{index .Lang "manager" "content" "thName"}}</th>
9 <th>{{index .Lang "manager" "content" "thPorts"}}</th>
10 <th>{{index .Lang "manager" "content" "thEntryPoint"}}</th>
11 <th>{{index .Lang "manager" "content" "thStatus"}}</th>
12 <th>{{index .Lang "manager" "content" "thState"}}</th>
13 <th>{{index .Lang "manager" "content" "thActions"}}</th>
14 </tr>
15 </thead>
16 <tbody>
17 {{ $Lang := .Lang }}
18 {{
19 range.containers
20 }}
21 <tr id="container-{{.ID}}" class="text-center hover:bg-slate-100">
22 <td>
23 <span
24 title="{{.Container.ID}}"
25 class="font-bold"
26 >{{.Name}}</span
27 >
28 </td>
29 <td class="port-container">{{ .Ports }}</td>
30 <td class="entrypoint-container">{{.TraefikEntryPoint}}</td>
31 <td class="status-container">{{.Status}} (Up since {{.UpSince}})</td>
32 <td style="color: {{.StateColor}};">{{.State}}</td>
33 <td>
34 <button
35 id="start-button-{{.ID}}"
36 hx-post="/htmx/container-manager/start/{{.ID}}"
37 hx-target="#actionResponse-{{.ID}}"
38 hx-target-*="#error-message-{{.ID}}"
39 hx-swap="outerHTML"
40 class="py-2 px-4"
41 >
42 <span title="Start the container" class="iconf text-xl text-blue-600 hover:text-gordonmascot-hblue"></span>
43 </button>
44 <!-- EDIT -->
45 <button
46 id="edit-button-{{.ID}}"
47 hx-get="/htmx/container-manager/edit/{{.ID}}"
48 hx-target="#actionResponse-{{.ID}}"
49 hx-target-*="#error-message-{{.ID}}"
50 hx-swap="innerHTML"
51 class="py-2 px-4"
52 data-active="false"
53 _="on click toggle between .visible and .hidden on #actionResponse-{{.ID}}"
54 >
55 <span title="Edit the container" class="iconf text-2xl text-blue-600 hover:text-gordonmascot-hblue"></span>
56 </button>
57 <!-- stop -->
58 <button
59 id="stop-button-{{.ID}}"
60 hx-post="/htmx/container-manager/stop/{{.ID}}"
61 hx-target="#actionResponse-{{.ID}}"
62 hx-target-*="#error-message-{{.ID}}"
63 hx-swap="innerHTML"
64 hx-confirm="{{index $Lang "manager" "content" "confirm-container-stop"}}"
65 class="py-2 px-4"
66 >
67 <span title="Stop the container" class="iconf text-xl text-red-600 hover:text-red-900"></span>
68 </button>
69 <!-- REMOVE -->
70 <button
71 id="remove-button-img-{{.ID}}"
72 hx-delete="/htmx/container-manager/delete/{{.ID}}"
73 hx-target="#actionResponse-{{.ID}}"
74 hx-target-*="#error-message-{{.ID}}"
75 hx-swap="innerHTML"
76 hx-confirm="{{index $Lang "manager" "content" "confirm-delete"}}"
77 class="py-2 px-4"
78 >
79 <!-- iconoir trash -->
80 <span title="Remove the container" class="iconf text-xl text-red-600 hover:text-red-900"></span>
81 </button>
82 </td>
83 </tr>
84 <tr>
85 <td colspan="7">
86 <div id="actionResponse-{{.ID}}"></div>
87 <div id="error-message-{{.ID}}" class="text-red-500"></div>
88 </td>
89 </tr>
90 {{ else }}
91 <tr>
92 <td colspan="7" class="mt-2">
93 <p class="text-center text-gray-400 text-xl">
94 {{index $Lang "manager" "content" "no-containers"}}
95 </p>
96 </td>
97 </tr>
98 {{
99 end
100 }}
101 </tbody>
102 </table>
103</div>