
All checks were successful
Build Process Supervisor / build (amd64, .exe, windows) (push) Successful in 2m24s
Build Process Supervisor / build (amd64, , linux) (push) Successful in 2m36s
Build Process Supervisor / build (arm, 6, , linux) (push) Successful in 2m19s
Build Process Supervisor / build (arm64, , linux) (push) Successful in 2m14s
136 lines
3.0 KiB
HTML
136 lines
3.0 KiB
HTML
{{ range .Supervisor.GetProcesses }}
|
|
<li>
|
|
<span class="process-name">📦
|
|
{{ if .Running }}
|
|
🟢 {{ .Name }}{{if ne .Description ""}} <span class="process-description">{{.Description}}</span>{{end}}
|
|
{{ else }}
|
|
🔴 {{ .Name }}{{if ne .Description ""}} <span class="process-description">{{.Description}}</span>{{end}}
|
|
{{ end }}
|
|
</span>
|
|
|
|
<div class="dropdown">
|
|
<button class="dot-button">⋮</button>
|
|
<div class="dropdown-content">
|
|
{{ if not .Running }}
|
|
<button
|
|
hx-post="/start-process"
|
|
hx-vals='{"name": "{{ .Name }}"}'
|
|
hx-trigger="click"
|
|
hx-target="#process-list"
|
|
hx-swap="innerHTML">
|
|
▶️ Start
|
|
</button>
|
|
{{else}}
|
|
<button
|
|
hx-post="/stop-process"
|
|
hx-vals='{"name": "{{ .Name }}"}'
|
|
hx-trigger="click"
|
|
hx-target="#process-list"
|
|
hx-swap="innerHTML">
|
|
⏹️ Stop
|
|
</button>
|
|
<button
|
|
hx-post="/restart-process"
|
|
hx-vals='{"name": "{{ .Name }}"}'
|
|
hx-trigger="click"
|
|
hx-target="#process-list"
|
|
hx-swap="innerHTML">
|
|
🔁 Restart
|
|
</button>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
|
|
<style>
|
|
ul#process-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
ul#process-list li {
|
|
background: #fff;
|
|
margin: 0.75rem 0;
|
|
padding: 1rem 1.25rem;
|
|
border-radius: 10px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
transition: box-shadow 0.25s ease;
|
|
}
|
|
|
|
ul#process-list li:hover {
|
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.process-name {
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
|
|
.process-description {
|
|
font-weight: 400; /* normal or lighter */
|
|
color: #2c3e50; /* optional: same color or adjust if needed */
|
|
}
|
|
|
|
.dot-button {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
color: #777;
|
|
padding: 0 4px;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.dot-button:hover {
|
|
color: #333;
|
|
}
|
|
|
|
.dropdown {
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.dropdown-content {
|
|
display: none;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 1.8rem;
|
|
background-color: #fff;
|
|
min-width: 130px;
|
|
box-shadow: 0 6px 12px rgba(0,0,0,0.1);
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
z-index: 100;
|
|
}
|
|
|
|
.dropdown:hover .dropdown-content {
|
|
display: block;
|
|
}
|
|
|
|
.dropdown-content button {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
text-align: left;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 0.95rem;
|
|
color: #333;
|
|
transition: background 0.2s, color 0.2s;
|
|
}
|
|
|
|
.dropdown-content button:hover {
|
|
background-color: #f0f0f0;
|
|
color: #000;
|
|
}
|
|
</style>
|
|
</html>
|