fix: ops dict declared at top of loop, remove duplicate
This commit is contained in:
parent
30d247c411
commit
6a79d6b5b6
1 changed files with 2 additions and 9 deletions
|
|
@ -144,6 +144,7 @@ def main():
|
||||||
|
|
||||||
n = 2
|
n = 2
|
||||||
node_map = {}
|
node_map = {}
|
||||||
|
ops = {}
|
||||||
for name in undeployed:
|
for name in undeployed:
|
||||||
print(f" [{n}] Deploy {name} (port {cfg[name].get('port','?')})")
|
print(f" [{n}] Deploy {name} (port {cfg[name].get('port','?')})")
|
||||||
node_map[str(n)] = name
|
node_map[str(n)] = name
|
||||||
|
|
@ -170,15 +171,7 @@ def main():
|
||||||
str(nc.get("upstream_port","80")), "",
|
str(nc.get("upstream_port","80")), "",
|
||||||
nc.get("mode","monitoring"))
|
nc.get("mode","monitoring"))
|
||||||
deployed.add(name)
|
deployed.add(name)
|
||||||
# Track what number each action got
|
elif c == ops.get('edit') and deployed:
|
||||||
ops = {}
|
|
||||||
if deployed:
|
|
||||||
ops['edit'] = str(n); n += 1
|
|
||||||
ops['del'] = str(n); n += 1
|
|
||||||
ops['status'] = str(n); n += 1
|
|
||||||
ops['tunnel'] = str(n); n += 1
|
|
||||||
|
|
||||||
if c == ops.get('edit') and deployed:
|
|
||||||
edit_nodes()
|
edit_nodes()
|
||||||
elif c == ops.get('del') and deployed:
|
elif c == ops.get('del') and deployed:
|
||||||
remove_menu()
|
remove_menu()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue