Readable DB types
This commit is contained in:
parent
2e66073479
commit
50f2dd02b6
10
twvdscli.py
10
twvdscli.py
@ -391,6 +391,14 @@ def list_dbs():
|
|||||||
# state = typer.style('Stopped', fg=typer.colors.RED)
|
# state = typer.style('Stopped', fg=typer.colors.RED)
|
||||||
else:
|
else:
|
||||||
state = i['status']
|
state = i['status']
|
||||||
|
if i['type'] == 'mysql':
|
||||||
|
type_of_db = 'MySQL 8'
|
||||||
|
elif i['type'] == 'mysql5':
|
||||||
|
type_of_db = 'MySQL 5.7'
|
||||||
|
elif i['type'] == 'postgres':
|
||||||
|
type_of_db = 'PostgreSQL 13'
|
||||||
|
else:
|
||||||
|
type_of_db = i['type']
|
||||||
x.add_row([
|
x.add_row([
|
||||||
i['id'],
|
i['id'],
|
||||||
state,
|
state,
|
||||||
@ -398,7 +406,7 @@ def list_dbs():
|
|||||||
i['ip'],
|
i['ip'],
|
||||||
i['local_ip'],
|
i['local_ip'],
|
||||||
i['password'],
|
i['password'],
|
||||||
i['type']
|
type_of_db
|
||||||
])
|
])
|
||||||
print(x)
|
print(x)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user