From 50f2dd02b6bcbbe010b1c66cc8ced4192d5660b7 Mon Sep 17 00:00:00 2001 From: Lulzette Date: Fri, 22 Apr 2022 18:21:53 +0300 Subject: [PATCH] Readable DB types --- twvdscli.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/twvdscli.py b/twvdscli.py index 14481f4..1fd935f 100755 --- a/twvdscli.py +++ b/twvdscli.py @@ -391,6 +391,14 @@ def list_dbs(): # state = typer.style('Stopped', fg=typer.colors.RED) else: 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([ i['id'], state, @@ -398,7 +406,7 @@ def list_dbs(): i['ip'], i['local_ip'], i['password'], - i['type'] + type_of_db ]) print(x)