mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
update instances button
This commit is contained in:
parent
4ad0596ad6
commit
b2b54965f8
2 changed files with 4 additions and 20 deletions
|
|
@ -19,16 +19,8 @@ def instances_builder(instances: List[Instance]) -> str:
|
|||
|
||||
for instance in instances:
|
||||
# setup actions buttons
|
||||
actions = (
|
||||
["restart", "stop"]
|
||||
if instance.hostname in ("localhost", "127.0.0.1") and instance.status == "up"
|
||||
else (
|
||||
["reload", "stop"]
|
||||
if instance.hostname not in ("localhost", "127.0.0.1") and instance.status == "up"
|
||||
else ["start"] if instance.hostname in ("localhost", "127.0.0.1") and instance.status != "up" else []
|
||||
)
|
||||
)
|
||||
|
||||
actions = ["reload", "stop"] if instance.status == "up" else ["start"]
|
||||
|
||||
buttons = [
|
||||
{
|
||||
"attrs": {
|
||||
|
|
|
|||
|
|
@ -9,16 +9,8 @@ def instances_builder(instances: List[Instance]) -> str:
|
|||
|
||||
for instance in instances:
|
||||
# setup actions buttons
|
||||
actions = (
|
||||
["restart", "stop"]
|
||||
if instance.hostname in ("localhost", "127.0.0.1") and instance.status == "up"
|
||||
else (
|
||||
["reload", "stop"]
|
||||
if instance.hostname not in ("localhost", "127.0.0.1") and instance.status == "up"
|
||||
else ["start"] if instance.hostname in ("localhost", "127.0.0.1") and instance.status != "up" else []
|
||||
)
|
||||
)
|
||||
|
||||
actions = ["reload", "stop"] if instance.status == "up" else ["start"]
|
||||
|
||||
buttons = [
|
||||
{
|
||||
"attrs": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue